×

INDI Library v1.9.8 Released (29 Sep 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Per driver configurable delay?

Been thinking of scenarios where a user need to power on some devices before they can be used. The power up is also done by another driver, but if all drivers are powered on the same time, it does not give enough time for the drivers to establish communication. Sometimes it may take a couple of seconds before we should try a handshake.

I think we can add a configurable delays in seconds to INDI server parameters for each driver. By default it's zero unless overridden by the user. This would require many changes at INDI server level and also INDI Web Manager and KStars, so not exactly very easy to do. But it's certainly a nice feature for these use-cases.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
4 months 2 days ago #83352

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

  • Posts: 130
  • Thank you received: 14
Jasem,

There have been many times that I could use something like that. Like for Arduino based projects, which reset when the port is opened, then haven't finished initializing before the driver sends a software handshake. Twice I've had to modify hardware to compensate for that.

I have an LX600 with a bad GPS. When it boots, it is set to go to the daylight savings prompt and wait for the date and time. That takes 20 to 30 seconds. The lx200autostar knows nothing about this process, so I can't load indi until after I have powered on, and run a program to initialize the date and time on the scope. It would be really nice to have a driver that could power up a device, delay some amount (like the 20-30 second initialization time of an unattended LX600), and run a script to initiailize it correctly before the LX200driver attaches and hogs the port.

I built an 8-port switchable power box that is used for that now, but I have a separate python app that has checkboxes to power on each port. I would much rather have a driver that I could interface the box with that would do what you have suggested. Or can that be accomplished with current power box interfaces?

Thanks,
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
Last edit: 3 months 2 weeks ago by David Allmon.
3 months 2 weeks ago #83641

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

So each driver may have something like this:

Pre Start Delay --> Pre-Start Script --> Post-Start Delay --> Post-Start Script

Would this be sufficient to cover all cases? Another challenge as well is that this must be supported locally and also remotely.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 months 2 weeks ago #83643

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

  • Posts: 380
  • Thank you received: 27
I'm in favor of incorporating it into the server as an automated script if the driver doesn't work, but I'm against adding the driver's parameters.

Even if you add a driver parameter, the problem will not be solved if the initial value is 0, and it will always cause a problem if the setting is initialized by a user who has not set it or an update.

The INDI driver has many problems with user settings being initialized on update.

I think that the user prefers a state where it works properly without setting the parameters of the control panel.
3 months 2 weeks ago #83647

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

  • Posts: 130
  • Thank you received: 14
Jasem,

That would cover all of my use cases. I'm not familiar enough with the code to say where I think it should live.

Thanks,
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
3 months 2 weeks ago #83651

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

It's implemented in GIT now. Please test.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 months 6 days ago #83958

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

  • Posts: 130
  • Thank you received: 14
Jasem,

I pulled the source and compiled libev, indi, indi-3rdparty, and kstars. Everything seems to run, but I don't see where the config for the delay is.
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
3 months 2 days ago #84054

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

Edit your equipment profile ---> Scripts
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 months 2 days ago #84056

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

  • Posts: 130
  • Thank you received: 14
Jasem,

Sorry it took so long, but I I had to build Kstars, indi, and the 3rd party drivers. It takes a while on the Raspberry Pi.

Editing the lx200autostar, I put a 30 second pre delay, then a bash script, with no post delay. It seems by the log file that it waited 30 seconds and then loaded the lx200autostar and the other 7 drivers. I'm not sure if that is what it is supposed to do.

Then I added a 10 second delay with no script to the pegasus_flatmaster driver, leaving the 30 second delay in the lx200autostar. That changed the load order, but not the behavior. It loaded the pegasus_flatmaster driver after 10 seconds, but also loaded the other drivers in the same second. It was as if the only delay it was seeing was the shortest one. I'm going by the log file - I can't actually verify that the 30 second delay did or did not happen. I also can't verify that the script actually ran. Does it wait until the script finishes before loading the driver?

I have attached the log file from the run where the Raspberry Pi was running Kstars and the indiserver.

File Attachment:

File Name: log_15-31-41.txt
File Size:27 KB
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
3 months 23 hours ago #84090
Attachments:

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

I just tested again and it works fine. Did you save the profile after you made the changes in the script? You must save the profile otherwise the changes will not be saved. The logs show no delays nor logs at all. I just pushed a change to GIT to add more logs.
Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info
3 months 14 hours ago #84101

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

  • Posts: 130
  • Thank you received: 14
Jasem,

It was "Auto Connect". I had it turned off because I normally need to initialize the LX600. It worked perfectly. It ran the script and initialized the scope, then attached tthe driver.

Thank you for your work on this. I think it is a worthwhile addition. I've attached the log file in case you want to look it over after your additional logging.

File Attachment:

File Name: log_07-16-38.txt
File Size:70 KB
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
3 months 8 hours ago #84128
Attachments:

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

  • Posts: 130
  • Thank you received: 14
Jasem,

One question...If it is indiserver doing this, is it reading the local database, and does that mean if I set it up on the Raspberry Pi it will still work if I connect remotely?
Dave Allmon

Meade 12" LX600, William Optics GT81 IV, Stellarvue F080M3 (guidescope)
SBIG STF-8300EN, ASI 290mm mini (guide camera)
Raspberry Pi 4B 8GB w/Stellarmate out on the scope, Raspberry Pi 4B 4GB test server
Linux client
3 months 8 hours ago #84129

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

Time to create page: 0.621 seconds