×
INDI Library v1.8.6 Released (21 Aug 2020)

August 2020 release of INDI Library v1.8.6 introduces new drivers while providing fixes and improvements to existing devices and core framework.

Tutorials for INDI Python programming

1 month 2 weeks ago
crw4096
Expert Boarder
Expert Boarder
Posts: 94
More
Topic Author
Tutorials for INDI Python programming #58030
In another thread, Jasem mentioned the need for new documentation for using PyIndinew documentation for using PyIndi . I've been searching around myself and stumbled across two links to indi.org tutorials that do not seem to be accessible in the obvious way:

INDI Python Programming
Also, this one, same title: INDI Python Programming

These appear to be nearly identical and not reachable from an obvious point, like Community->Tutorials. I only reached them accidentally through a search of the whole web. Also, it could use some more detailed (for the novice) explanations.

Here are some other questions that keep popping up for me in my quest to control a filter wheel and a camera:
  1. When I use sendNewNumber() to change the filter, how do I know when this operation is complete? Is there some other indicator in the device that I can check?
  2. In the list of standard properties for filter wheels, there is FILTER_SLOT and FILTER_NAME. The first is a number and you write to it to change the filter. The second is a list of all filter names for the filter wheel - at least it is on my filter wheel. But the list says it's supposed to be the filter wheel's current slot name. Either the code is wrong or the docs are wrong. To be honest, I like the current behavior, but the doc needs to be corrected.
  3. What is the purpose of the call setBLOBMode(PyIndi.B_ALSO, name, "CCD1") in the example found in the INDI Python Programming links? I mean, I guess it sets the BLOB mode, but what other BLOB modes are there? And what is this function actually doing?

Thanks,

Charles

Ubuntu 18.04 and Raspbian Jessie; INDI 1.7.4
Mounts: CEM-60 chiefly; iEQ45
Cameras: Atik 383L+, QHY5-II-M
Focuser: Moonlite

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

1 month 2 weeks ago
knro
Administrator
Administrator
Posts: 8391
Karma: 51
Tutorials for INDI Python programming #58124
1. You monitor the property and check if it changed to the new filter number.
2. There is no current filter slot name text property.
3. There are 3 BLOB modes from the client point of view:
3.1 B_NEVER: Never send any binary data (default)
3.2 B_ALSO: Send binary along with regular INDI Messages.
3.2 B_ONLY: Only send binary object, no regular INDI messages are sent.

I added the python article to the tutorial. Do you think you have update it to clarify any issues? or write a new one based on it perhaps?

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 crw4096

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

1 month 2 weeks ago
crw4096
Expert Boarder
Expert Boarder
Posts: 94
More
Topic Author
Tutorials for INDI Python programming #58157
Thanks for the info.

Re: #2, I am referring to the text description for FILTER_NAME in the list of standard properties, which says, "The filter wheel's current slot name" (see attached), I think it needs to be corrected to say something like "A list of the names of the filter in each slot"

OK, I see the Python article link. The article is informative enough to get going, but I must say it's pretty terse. There is value in "unpacking" the details.

My thoughts were to keep the installation info, then give a very brief example so readers have some idea of what's involved. After that go into more details about retrieving and manipulating properties. Also, it would be good to know which of the fields in a property object are meant to be used, and what they contain. I will try to explain things that I ended up figuring out by trial and error, which I think is a good place to perhaps discuss the threading model.

Also, we should explain more how to use the class that inherits from PyIndi.BaseClient. I have only seen two examples, but I wonder how often I'm going to have to write something special for "newSwitch()", for example.

I think some device-type descriptions would be helpful. Filter wheels are pretty simple, but I can see the need for separate sections on cameras, streaming and definitely telescopes. I'm happy to try to start a framework for others to help fill in (!)

Charles

Ubuntu 18.04 and Raspbian Jessie; INDI 1.7.4
Mounts: CEM-60 chiefly; iEQ45
Cameras: Atik 383L+, QHY5-II-M
Focuser: Moonlite
Attachments:

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

Time to create page: 0.485 seconds