×

INDI Library v1.9.2 Released (14 Sep 2021)

Bimonthly Stable INDI Library release introduces new drivers and fixes for existing ones.

need some help on communicating with indiserver as a client

  • Posts: 11
  • Thank you received: 0
I am in a group doing a project using indiserver to connect to the telescope, and we have to customize our own client to communicate with the server. but we cant really find a good documentation of the commands for client. The only thing we can find is:
www.clearskyinstitute.com/INDI/INDI.pdf
and it does not show all the commands to communicate with indiserver.
Does anyone know if there's a newer / more complete documentation somewhere?
Thanks!
Last edit: 2 years 11 months ago by chang.
2 years 11 months ago #30057

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

  • Posts: 314
  • Thank you received: 94
Hello,
Welcome to the Developer Section!

Did you see the page about other INDI clients?
indilib.org/about/clients.html
You can try my open project Astronomy Linux
Last edit: 2 years 11 months ago by Oleg.
2 years 11 months ago #30059

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

  • Posts: 11
  • Thank you received: 0
Hi,
yes but we would like to implement something to directly talk to indiserver using probably socket to control our telescope, with the features we need and also without the unnecessary features we don't need.
Would be great if there is a list of commands for client to server communication!
2 years 11 months ago #30061

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

Here is a tutorial for writing a client: indilib.org/develop/tutorials/107-client...opment-tutorial.html
So basically you subclass INDI::BaseClient (INDI::BaseClientQt5) and you receive and send messages. There is no "commands" per se. What you do is read properties and set properties.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
2 years 11 months ago #30062

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

  • Posts: 11
  • Thank you received: 0
The thing is we can't necessarily use c++ but the tutorials are written in c++. By commands i meant the indi XML protocols from the pdf link I attached, where you can talk to indiserver by telnet or socket. I mean sure we can dig through the tutorial to find the functions that use those functions where the commands were called. But it would just be great if there is a list of them so we can just use them.
2 years 11 months ago #30064

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

Everything is documented in the INDI white paper. Let's take a simple example that uses telnet. In one terminal, run INDI server:
indiserver -v indi_simulator_telescope

Now on another terminal run telnet:
telnet localhost 7624

In the telnet window, just send this XML string:
<getProperties v="1.7"/>

And you receive a list of properties. To change a property value, use something like <newNumberVector ....> to change a number property. There are C++ and Python clients (pyindi) that you can use, or you can write your own client based on these principles.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
2 years 11 months ago #30066

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

  • Posts: 11
  • Thank you received: 0
Thanks. I'm still a little confused by how to change a property.
for example, after connecting to the server, if I do:
<getProperties device="Temma" version="1.7" name="CONNECTION"/>
it returns:
<setSwitchVector device="Temma" name="CONNECTION" state="Idle" timeout="60" timestamp="2018-10-04T19:12:47">
    <oneSwitch name="CONNECT">
Off
    </oneSwitch>
    <oneSwitch name="DISCONNECT">
On
    </oneSwitch>
</setSwitchVector>
Now if I wanna change, for example, the state from "Idle" to "OK", do I do:
<newSwitchVector device="Temma" name="CONNECTION"> <oneSwitch name="state">OK</oneSwitch> </newSwitchVector>
?
But the state properties does not change.
2 years 11 months ago #30068

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

  • Posts: 11
  • Thank you received: 0
Or is that "state" unchangable, and I can only change "CONNECT" and "DISCONNECT"?
I tried to change "CONNECT" to On too and now the state became "Alert"
:side:
2 years 11 months ago #30069

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

States are controlled by the driver, not the client. If you tried to set CONNECT and you got Alert state then it's working fine because it failed to connect to the mount. Unless you happen to have Temma connected and powered right now.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
2 years 11 months ago #30071

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

  • Posts: 11
  • Thank you received: 0
oh ok i see. So only stuff labeled as "oneVetor", "oneText" or "oneSwitch" can be changed by client, the other quantities are controlled by server or driver. Is that correct?
2 years 11 months ago #30072

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

You can change Switch, Number, Text, and Blob properties in the driver. The driver can set them, it can also define Light property. I think you should really go over INDI Developer's Manual to gain basic understanding of the architecture.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
The following user(s) said Thank You: chang
Last edit: 2 years 11 months ago by Jasem Mutlaq.
2 years 11 months ago #30073

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

  • Posts: 11
  • Thank you received: 0
OK thanks so much! and will do.
2 years 11 months ago #30074

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

Time to create page: 0.870 seconds