×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Celestron NexStar Evolution Mount + Python + Raspberry Pi

  • Posts: 12
  • Thank you received: 0
Hi Everyone,

I want to control a Celestron NexStart mount using Raspberry Pi 3 through WiFi connection.
Raspberry Pi comes with Python as the default programming tool.

I am new to INDI and I like to learn it to some extend. Please let me know where to begin and what to read.

Cheers.
6 years 8 months ago #18102

Please Log in or Create an account to join the conversation.

How do you connect to Celestron now? RS232->USB, WiFi, Bluetooth adapter?
6 years 8 months ago #18106

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
At the moment I am using "Celestron SkyPortal" mobile app and WiFi connection to control the mount.
Last edit: 6 years 8 months ago by Mojtaba Mansour Abadi.
6 years 8 months ago #18129

Please Log in or Create an account to join the conversation.

Then try to use the INDI Celestron driver but under connections select "Ethernet" instead of "Serial" and put the IP address and port of the mount (assuming it's on WiFi)
6 years 8 months ago #18130

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
Thank you for replying.

But your answer didn't help me at all. Like I said I am new to INDI. I've never used it. The website doesn't provide a useful document on how to use it.

I also tried to install "PyIndi-Client" module in my Raspberry Pi 3. But it exits with an error.

So basically I have no idea what to do and where to look for information.
6 years 8 months ago #18133

Please Log in or Create an account to join the conversation.

You need to use a client like KStars to connect to Raspberry pi. INDI server must be running on Raspberry PI with the celestron driver. From KStars, you connect to INDI and from INDI Control Panel, you make these changes.
6 years 8 months ago #18134

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
To make it clear what I want to do, let me put it in this way.

I need to write a simple client program. The client program simply tells the mount to rotate a specific angle.

The project is not related to astronomy so I don't want to use other clients softwares.

I can use both Python and C languages.

However for Raspberry Pi 3, I prefer to use Python.
6 years 8 months ago #18135

Please Log in or Create an account to join the conversation.

Follow PyINDI tutorial and then issue commands to the mount, there are Standard Properties to send motion/slew commands to mounts.

So it's Mount
> WiFi ----> INDI server running mount driver ----> PyINDI client code

Once you run INDI server with the mount driver, eg.
indiserver -v indi_celestron_gps

You can use Python to query properties and send commands. Before you connect to the mount, you need to set the conection switch to Ethernet and then fill in the required IP address and port of the WiFi mount and connect. More properties will be defined once the mount is connected, then you can use python to control it.
6 years 8 months ago #18136

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
Thanks a lot.
Your previous reply was really helpful. I can use Python code for the simulation drivers.

Now I have some other issues.
How can I find the IP address and port of the mount? I checked the specifications and datasheet. It gives no clue about it.

The mount I am using came as a part of the following setup:

www.celestron.com/browse-shop/astronomy/.../nexstar-evolution-8
6 years 8 months ago #18157

Please Log in or Create an account to join the conversation.

The manual says it can be in Access Mode (aka hotspot) or you can join it to your WiFi network. So the IP depends on how you connect it. There is no information on the port used, you have to ask Celestron or find it from another source.
6 years 8 months ago #18159

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
Thanks for the tips.
I realized the WiFi module has an IP address of 1.2.3.4
Using "nmap" tool in linux, I'm trying to find the available ports. I also asked the customer serive of Celestron.

Now in your previous reply, you talked about changing the connection to "Ethernet", It would be your kind if you can suggest an example of help page so that I can go though and learn about it.

Cheers.
6 years 8 months ago #18171

Please Log in or Create an account to join the conversation.

  • Posts: 12
  • Thank you received: 0
Hopefully, the people from Celestron were kind enough to give me detailed information on WiFi module.
If Direct connection method is used, the default IP address is "1.2.3.4" and port no is "2000".
So having this information, how can I change the connection method in INDI Python program.

I followed the second example in PyIndi , while setting the variable monitored to "Celestron GPS".
The code runs and shows some properties which I assume are the default properties.

Then, there is this part:
# if the monitored device is not connected, we do connect it
if not(dmonitor.isConnected()):
    # Property vectors are mapped to iterable Python objects
    # Hence we can access each element of the vector using Python indexing
    # each element of the "CONNECTION" vector is a ISwitch
    cmonitor[0].s=PyIndi.ISS_ON  # the "CONNECT" switch
    cmonitor[1].s=PyIndi.ISS_OFF # the "DISCONNECT" switch
    indiclient.sendNewSwitch(cmonitor) # send this new value to the device

Forgive my ignorance. But this code doesn't make sense to me.
the variable cmonitor is refering to a property named "CONNECTION".
why are we setting the member variable s to "CONNECT" and "DISCONNECT" at the same time?!?!?

Let's say I need to set the device IP and port, therefore I need to set the "DEVICE_PORT" property. This property has only one member. Then, how can I set both IP and port of the mount?

Cheers.
6 years 8 months ago #18180

Please Log in or Create an account to join the conversation.

Time to create page: 0.745 seconds