×

INDI Library v1.9.8 Released (29 Sep 2022)

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

Best way to run indi_setprop to automaticaly configure a device (focuser) ?

  • Posts: 4
  • Thank you received: 0
What would be the best/easiest way to run indi_setprop to configure a device (a Moonlite focuser).?

When my Astroberry boots up I have the drivers to Start automatically. I would like to the drivers to load, then automatically run a script using indi_setprop to send specific config settings to the focuser (and other devices?).

Thank you!
2 years 3 months ago #57798

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

  • Posts: 983
  • Thank you received: 375
Rub indi_setprop without any options and you get al available options.
--
Radek Kaczorek
Astroberry Server | Orion CT8 | Askar FRA 400 | NEQ6 (hypermod) | Atik 460EX | ASI 1600 | ASI 120MM | Atik EFW2
2 years 3 months ago #57886

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

  • Posts: 4
  • Thank you received: 0
Sorry, I probably wasn't clear about what I'd like to do. I'd like to have an automatic process that sends settings to my focuser in the boot process.

I was thinking about adding something in crontab, so when I boot the AstoBerry it will start the INDI server, then pass the settings with indi_setptop. My concern is if I add a crontab line running a script with the indi_setprop command and parameters and the INDI server has not started yet, then the settings will not apply ?

I guess I'm asking is there a way to boot up the AstroBerry server and after the INDI server is running, somehow automatically run something (a shell script?) that sends settings to a device?

Hope this is clear, sorry for the confusion.
Thank You.
2 years 3 months ago #57889

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

  • Posts: 213
  • Thank you received: 118
If you start your indi server using a systemd service, you can create a second service that depends on the first.

Running a service with systemd only once, you'd need to add
Type=oneshot

You would also need to add
[Unit]
Requires=indiserver.service
After=indiserver.service

You need both Requires and After. Otherwise systemd will start the second service at the same time as indiserver, and you want

More info on writing systemd unit files:

wiki.archlinux.org/index.php/Systemd#Writing_unit_files

If you really want it like cron, see using systemd as a cron replacement:
wiki.archlinux.org/index.php/Systemd/Timers
Gayle H Riggsbee Observatory - Charlotte Amateur Astronomers Club
CEM120 - TMB 100/800 - AT72EDII w/Homemade Moonlite Compatible Arduino Focuser - AT8RC w/Moonlite CSL 2.5" w/Moonlite Stepper v3
ZWO ASI2600MC-Pro - ZWO ASI2600MM-Pro - ZWO ASI174MM-Mini - ZWO OAG - ZWO EFW
AT2FF - CCDT67 - RIRED-M63
Last edit: 2 years 3 months ago by Rick Bassham.
2 years 3 months ago #57892

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

Moderators: Radek Kaczorek
Time to create page: 0.514 seconds