×
INDI Library v1.8.1 Released (09 Sep 2019)

Monthly maintenance release INDI v1.8.1

need some help on communicating with indiserver as a client

1 year 1 month ago 1 year 1 month ago by xuchang970621.
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30057
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!

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

1 year 1 month ago 1 year 1 month ago by oleg.
oleg
Moderator
Moderator
Posts: 320
Karma: 5
More
need some help on communicating with indiserver as a client #30059
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

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

1 year 1 month ago
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30061
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!

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

1 year 1 month ago
knro
Administrator
Administrator
Posts: 7379
Karma: 51
need some help on communicating with indiserver as a client #30062
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

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

1 year 1 month ago
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30064
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.

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

1 year 1 month ago
knro
Administrator
Administrator
Posts: 7379
Karma: 51
need some help on communicating with indiserver as a client #30066
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

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

1 year 1 month ago
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30068
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.

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

1 year 1 month ago
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30069
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:

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

1 year 1 month ago
knro
Administrator
Administrator
Posts: 7379
Karma: 51
need some help on communicating with indiserver as a client #30071
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

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

1 year 1 month ago
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30072
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?

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

1 year 1 month ago 1 year 1 month ago by knro.
knro
Administrator
Administrator
Posts: 7379
Karma: 51
need some help on communicating with indiserver as a client #30073
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 xuchang970621

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

1 year 1 month ago
xuchang970621
Fresh Boarder
Fresh Boarder
Posts: 11
More
Topic Author
need some help on communicating with indiserver as a client #30074
OK thanks so much! and will do.

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

Time to create page: 0.903 seconds