Please note that the systemd service file does not work. It runs but there is problem reading from sqlite3 database, I think it's probably something to do with running location of some sort. If you start it directly, no issues.
nice shoot knro !
I will try this code on my raspberry as soon as possible for testing and feed back.
Ok i did a quick shoot.
You got a typo in drivermanager.py when saving Simulators.
It work nicely in command line, but only when it started from the install directory
/usr/share/indi/servermanager in my case.
It failed when it try to list available profiles in the sqlite db, when started as a daemon or launch from another directory.
Traceback (most recent call last):
File "/usr/share/indi/servermanager/bottle.py", line 996, in _inner_handle
File "/usr/share/indi/servermanager/bottle.py", line 1954, in wrapper
rv = callback(*a, **ka)
File "/usr/share/indi/servermanager/drivermanager.py", line 34, in form
allProfiles = get_profiles()
File "/usr/share/indi/servermanager/drivermanager.py", line 41, in get_profiles
File "/usr/share/indi/servermanager/db.py", line 14, in get_profiles
cursor = conn.execute("SELECT * FROM profile")
Sqlite database in the install directory is untouched by my saving when i started it in manual mode from the install directory:
root@piastro:/usr/share/indi/servermanager# sqlite3 profiles.db ".tables"
root@piastro:/usr/share/indi/servermanager# sqlite3 profiles.db "select * from profile"
or there is no action to save it.
So I resolved the sqlite3 issue due to path, but still have problems loading form.tpl if started from systemd, again due to path issues / working directory. I googled a bit for a solution and tried a couple of things but it didn't work. I'll look into it tomorro. If anyone knows how to resolve this it would be great.
i try to force the template lookup with
""" return template('form.tpl', allProfiles=allProfiles, allDrivers=allDrivers, port=port, saved_profile=saved_profile, template_lookup=[dirname+"/views",".","./views"]) """
Updated web manager to support custom drivers. Now you can start INDI server and chain it to other drivers. Also documenting the API since you can use tools like curl to control all aspects of the application which is useful in scripts.
I think i touch another bug related to path loading.
When i launch the indiserver via the webmanager (started as daemon) on the remote server,
the gphoto_ccd client cannot load the saved configuration.
As this is working when i launch the indiserver manually, i guess it's a path related issue in webmanager/indiserver launch command.
I will try to debug that but if you have any hints, it's welcome
hmmm most likely because it is run as root, it tries to load config from ~/.indi which would be /root/.indi but for a normal user it is loaded from /home/username/.indi which is where you had all your previous configs.