×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

PyIndi/C++ client, how to send text/text vector to indi server

  • Posts: 102
  • Thank you received: 13
Dear all,
I am trying to setup a python script to acquire multiple images from my Canon DSLR EOS350D.
I am able to get images in bulb mode through a usb cable on ttyUSB0 using the gui included in kstars.
However, I cannot find in the PyIndi client or C++ command to send this kind of information.

There are still many things that I don't understand about indi drivers, I would be really happy if someone could tell me a bit more about those property/text/ ??? from indi/3rdparty/indi-gphoto/gphoto_ccd.cpp:

IUFillText(&mPortT[0], "PORT", "Port", "");
IUFillTextVector(&PortTP, mPortT, NARRAY(mPortT), getDeviceName(), "DEVICE_PORT", "Shutter Release",
MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);
6 years 8 months ago #17828

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

  • Posts: 102
  • Thank you received: 13
Update wit logs on my problem:

Hi everybody,

First of all, thank you for this client, it is exactly what I needed for my experiments, being able to script everything, especially the CCD acquisition.

Unfortunately, I have trouble understanding how the indi client works, and how the python/c++ wrapper shoud be used.

Here is my specific usecase: I want to control a DSLR that uses an external serial shutter. This works when using the gui from kstars.

Unfortunately, I don't understand how I should set up the serial shutter port through PyIndi client.

The driver code that sends the text I want to modify looks like that:

IUFillText(&mPortT[0], "PORT", "Port", "");
IUFillTextVector(&PortTP, mPortT, NARRAY(mPortT), getDeviceName(), "DEVICE_PORT", "Shutter Release", MAIN_CONTROL_TAB, IP_RW, 0, IPS_IDLE);

And the Indi logs when I set the valuethrought the Gui look like that:
2017-07-17T17:09:31: Client 0: read <newTextVector device='Canon DSLR Digital Rebel XT (normal mode)' name='DEVICE_PORT'>
2017-07-17T17:09:31: Driver indi_canon_ccd: queuing responsible for <newTextVector device='Canon DSLR Digital Rebel XT (normal mode)' name='DEVICE_PORT'>
2017-07-17T17:09:31: Driver indi_canon_ccd: sending <newTextVector device="Canon DSLR Digital Rebel XT
2017-07-17T17:09:31: Driver indi_canon_ccd: read <setTextVector device='Canon DSLR Digital Rebel XT (normal mode)' name='DEVICE_PORT'>
2017-07-17T17:09:31: Client 0: queuing <setTextVector device='Canon DSLR Digital Rebel XT (normal mode)' name='DEVICE_PORT'>
2017-07-17T17:09:31: Client 0: sending <setTextVector device="Canon DSLR Digital Rebel XT

It looks like the client is sending a new text, ie (setTextVector), this is why, I tried the following code in my client:

self.sendNewText(Canon DSLR Digital Rebel XT (normal mode),"DEVICE_PORT","Shutter Release","/dev/ttyUSB0")

Unfortunately, the above line result in the following error:
No IText 'Shutter Release' in Canon DSLR Digital Rebel XT (normal mode).DEVICE_PORT

I would be extremely happy to know more about Indi, and the PyIndi client, to interact with this middleware in the general case.

Thank you in advance for your help
Last edit: 6 years 8 months ago by dolguldur.
6 years 8 months ago #17928

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

  • Posts: 102
  • Thank you received: 13
Just a small up to know if someone can help me with that problem, or at leat give me hints about how to translate what we see from indi gui to PyIndi or even C++ client code.

Thank you in advance
6 years 6 months ago #19343

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

Take a look at INDI Standard properties here: indilib.org/develop/developer-manual/101...ties.html#h2-general

DEVICE_PORT has one member "PORT", so you might want to use this:
self.sendNewText(Canon DSLR Digital Rebel XT (normal mode),"DEVICE_PORT","PORT","/dev/ttyUSB0")
The following user(s) said Thank You: dolguldur
6 years 6 months ago #19349

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

  • Posts: 102
  • Thank you received: 13
Thank you very much Jaseem !
Worked like a charm, I can know make my old EOS350D to make long exposure shot (I just need to disable automounting of the DSLR as a disk).
Very first step of my automatic acquisition setup is made, there are so many experiments I can do now :)

Thank you again for your precious help.
6 years 6 months ago #19381

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

Time to create page: 0.238 seconds