×

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

Bi-monthly release with minor bug fixes and improvements

INDI Web Manager

Here is the first alpha release of INDI Web Manager where you can start/stop INDI drivers. It's now on GitHub, any feedback appreciated:

github.com/knro/indiwebmanager

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.

The following user(s) said Thank You: Gonzothegreat, Clément
7 years 11 months ago #7854
Attachments:

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

  • Posts: 18
  • Thank you received: 3

Replied by hugues obolonsky on topic INDI Web Manager

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
return route.call(**args)
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
return db.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"
driver profile
root@piastro:/usr/share/indi/servermanager# sqlite3 profiles.db "select * from profile"
1|Simulators
or there is no action to save it.
Last edit: 7 years 11 months ago by hugues obolonsky.
7 years 11 months ago #7858

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

Replied by Jasem Mutlaq on topic INDI Web Manager

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.

Btw, what's the typo exactly?
7 years 11 months ago #7862

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

  • Posts: 18
  • Thank you received: 3

Replied by hugues obolonsky on topic INDI Web Manager

typo was there:
saved_profile = "Simualtors"
7 years 11 months ago #7868

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

  • Posts: 643
  • Thank you received: 62

Replied by Magnus Larsson on topic INDI Web Manager

Hi!

I've tried on my remote Pi. Downloaded, moved servermanager to /home/pi, and tried starting:

pi@raspberrypi:~/servermanager $ python drivermanager.py
/usr/share/indi/indi_fishcamp.xml
/usr/share/indi/indi_fli.xml
/usr/share/indi/indi_gphoto.xml
/usr/share/indi/indi_aagcloudwatcher.xml
/usr/share/indi/indi_duino.xml
/usr/share/indi/indi_asiccd.xml
/usr/share/indi/indi_qsi.xml
/usr/share/indi/drivers.xml
/usr/share/indi/indi_apogee.xml
/usr/share/indi/indi_dsi.xml
/usr/share/indi/indi_usbfocus.xml
/usr/share/indi/indi_eqmod.xml
/usr/share/indi/indi_maxdomeii.xml
/usr/share/indi/indi_qhy.xml
/usr/share/indi/indi_sx.xml
/usr/share/indi/indi_gpsd.xml
/usr/share/indi/indi_ffmv.xml
/usr/share/indi/indi_atik.xml
/usr/share/indi/indi_shoestring.xml
/usr/share/indi/indi_sbig.xml
Parsing XML file: /usr/share/indi/indi_fishcamp.xml
Traceback (most recent call last):
File "drivermanager.py", line 4, in <module>
from parsedrivers import driversList, findDriverByLabel
File "/home/pi/servermanager/parsedrivers.py", line 35, in <module>
family = group.attrib
KeyError: 'group'


Any ideas about this?

Magnus
7 years 11 months ago #7879

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

  • Posts: 18
  • Thank you received: 3

Replied by hugues obolonsky on topic INDI Web Manager

hello knro,

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"]) """

it work but in this case, we loose tw bootstrap.

So i finally end up with a more ugly
os.chdir

will send you a pull request
--
Regards
Hoxca
The following user(s) said Thank You: Jasem Mutlaq
7 years 11 months ago #7883

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

Replied by Jasem Mutlaq on topic INDI Web Manager

Thanks, this seems to work for now. I'm sure there are more bugs here and there so let's see how it goes.

Make sure your Raspberry PI INDI package is updated to the latest release.
7 years 11 months ago #7884

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

  • Posts: 643
  • Thank you received: 62

Replied by Magnus Larsson on topic INDI Web Manager

OK, great. Working after update of indi on the Pi.

Magnus
7 years 11 months ago #7893

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

Replied by Jasem Mutlaq on topic INDI Web Manager

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.
7 years 11 months ago #7896

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

  • Posts: 18
  • Thank you received: 3

Replied by hugues obolonsky on topic INDI Web Manager

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 ;)
7 years 11 months ago #7911

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

Replied by Jasem Mutlaq on topic INDI Web Manager

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.
7 years 11 months ago #7912

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

  • Posts: 18
  • Thank you received: 3

Replied by hugues obolonsky on topic INDI Web Manager

Nope !
As far as the gphoto_cdd driver is only working as root,
i was launching the indiserver manually as root...

Config saves are allready in /root/.indi
Last edit: 7 years 11 months ago by hugues obolonsky.
7 years 11 months ago #7914

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

Time to create page: 0.462 seconds