Welcome, Guest
Username: Password: Remember me
14 Nov 2018
Glad to announce of release of INDI Library v1.7.5 on 2018-11-14. A few drivers were added in this release as we continue to improve & stabilize existing drivers.
Read More...
  • Page:
  • 1
  • 2

TOPIC: New version of INDI Web Manager

New version of INDI Web Manager 1 year 4 months ago #18296

  • juanmb
  • juanmb's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 18
I am new in the INDI community, so hi everybody!

I just made a bunch of improvements to the indiwebmanager project that Jasem kindly merged into his Github repository.
Some of the changes are:
  • "indiweb" is now a standard Python package, so the installation procedure is much simpler.
  • There is a command-line interface, called indi-web, that accepts multiple configuration flags and provides inline help.
  • The profiles.db database is automatically created at start, if it doesn't exist.
  • The profiles.db is now stored in /home/USER/.indi by default.
  • The path of the driver configuration files is now configurable.
  • The "skel" XML property is parsed and passed to the drivers.
  • Autostart does not require any additional configuration.
  • Logging verbosity can be selectable with the "-v" flag.
If you are already using the INDI web manager, please update to the new version in https://github.com/knro/indiwebmanager and let me know your impressions.
Thank you!
The following user(s) said Thank You: knro, Gilles, pcxz, xsnrg

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

Last Edit: by juanmb.

New version of INDI Web Manager 1 year 4 months ago #18298

  • maudy
  • moustickk's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 353
  • Karma: 2
  • Thank you received: 25
Before updating, can this new version still run as a service as the ROOT user?

The only reason my ZWO cameras and filters wheels are working on my RPI3 is because I can run the INDI Web Manager as USER, and then KStars can run as the USER. Running KStars as root is not good or performance, and running imdi-server as USER prevents the ASI224 and EFW from connecting.

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

New version of INDI Web Manager 1 year 4 months ago #18303

Have you tried running ASI224 and EFW recently user USER permissions? You don't need root permissions.

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

Jasem Mutlaq
Support INDI & Ekos; Get StellarMate Astrophotography Gadget.
How to Submit Logs when you have problems?
Add your observatory info

New version of INDI Web Manager 1 year 4 months ago #18304

  • maudy
  • moustickk's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 353
  • Karma: 2
  • Thank you received: 25
I tried this about 3 weeks ago setting up a RPI3 for my daughter. I can test again. I will report back in a different thread and not this one.

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

New version of INDI Web Manager 1 year 4 months ago #18307

  • juanmb
  • juanmb's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 18
The indi-web command can be run as root or any other user.
By default the configuration directory is /home/USER/.indi. If you run it as root, you should select a different path with the "-c" flag. The root user does not usually have his home directory under /home.

In the example systemd service file I show how to run indi-web as root and store the configuration files under /usr/share/indi/config.

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

New version of INDI Web Manager 1 year 4 months ago #18330

  • maudy
  • moustickk's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 353
  • Karma: 2
  • Thank you received: 25
Hi,

I hope you can help.

On the RPI3 i have run into some trouble with the update. I resolved a few differences and it seems to be related to access permissions.

Symptom: rebooting the RPI3, the indiwebmanager.service fails to execute. The start was the file specified: The status of the service is below.

The install process was followed and worked great:
sudo pip install https://github.com/juanmb/indiwebmanager/archive/master.zip

The service file needed a change in the indi-web location for the RPI3, and I am assuming there is an issue with the user permissions on the created directory. The changes made are also listed in the status put below:

1. /usr/local/share/bin/indi-web
2. my attempts to allow the service to start up by adding: -m ugo=rwx

I also tried removing the -c so that the default was used, which did not work.

ssh'ing to the RPI3 as user astroberry and executing this command manually works: /usr/local/bin/indi-web -v -c /usr/share/indi/config

The service is creating the file with root:root ownership; I am assuming this is the issue.

This is the output of the service status.

● indiwebmanager.service - INDI Web Manager
Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2016-02-11 12:29:02 AST; 1s ago
Process: 2009 ExecStart=/usr/local/bin/indi-web -v -c /usr/share/indi/config (code=exited, status=1/FAILURE)
Process: 2006 ExecStartPre=/bin/mkdir -p -m ugo=rwx /usr/share/indi/config (code=exited, status=0/SUCCESS)
Main PID: 2009 (code=exited, status=1/FAILURE)
CGroup: /system.slice/indiwebmanager.service

Feb 11 12:29:02 astroberry.local systemd[1]: indiwebmanager.service: Unit entered failed state.
Feb 11 12:29:02 astroberry.local systemd[1]: indiwebmanager.service: Failed with result 'exit-code'
The following user(s) said Thank You: juanmb

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

New version of INDI Web Manager 1 year 4 months ago #18333

  • juanmb
  • juanmb's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 18
I have tried it and yes, there is a problem when you run indi-web as root in Ubuntu.

By default in Ubuntu pip installs executable scripts and "entry points" in /usr/local/bin when you run it with "sudo". Different distros may install them in different locations.
It seems that even though the configuration path is passed to the drivers, indiserver still tries to store things in $HOME/.indi, so the "-c" flag is somewhat useless.
When a process runs under systemd with root user, it does not receive a HOME environment variable, and that is the cause of the crash.
You can fix it by specifying HOME (and creating $HOME/.indi) in the indiwebmanager.service file, like this:
[Unit]
Description=INDI Web Manager
After=multi-user.target

[Service]
Type=idle
Environment=HOME=/root
ExecStartPre=/bin/mkdir -p /root/.indi
ExecStart=/usr/local/bin/indi-web -v -c /root/.indi
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

If you want to run indi-web as "pi" user, the indiwebmanager.service could be something like this:
[Unit]
Description=INDI Web Manager
After=multi-user.target

[Service]
Type=idle
User=pi
ExecStart=/usr/local/bin/indi-web -v
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

I will update the code and send Jasem a pull request.
The following user(s) said Thank You: maudy, Olivier-40

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

Last Edit: by juanmb.

New version of INDI Web Manager 1 year 4 months ago #18335

Thanks a lot juanmb,

It works on my Raspbian fresh install !!

Olivier

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

Last Edit: by Olivier-40.

New version of INDI Web Manager 1 year 4 months ago #18337

  • maudy
  • moustickk's Avatar
  • Away
  • Platinum Boarder
  • Platinum Boarder
  • Posts: 353
  • Karma: 2
  • Thank you received: 25
The revised service file worked! Thank you.

Once the -c is corrected, does this mean the original file will work to run as something other than root? It is not clear if the intent is to run as root or not: I am still learning linux/ubuntu-mate.

I may need to force root user for other reasons and if so, then I will use the service file you posted above.

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

New version of INDI Web Manager 1 year 4 months ago #18338

  • juanmb
  • juanmb's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 18
In general, web servers should run as non-root user for security reasons. But INDI web manager is intended as a "local" web server that should not be reachable from the Internet, so this security considerations might be non applicable here.
You might prefer to run indi-web as root, because it can be difficult to configure the permissions of your devices for non-root access.
In my case, I wrote some udev rules in order to make all my devices accessible as a non-privileged user.
The following user(s) said Thank You: knro

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

New version of INDI Web Manager 1 year 3 months ago #19257

Hello, I installed indiweb manager successfully with a script that I attached. Everything works fine except saving a profile. It returns an error "error add new profile failed".

OS: MATE 16.04.03LTS

Here are the lines in the ubuntu console:

Attachments:
The following user(s) said Thank You: juanmb

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

Last Edit: by moustickk.

New version of INDI Web Manager 1 year 3 months ago #19259

  • kengs
  • kengs's Avatar
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 125
  • Karma: 2
  • Thank you received: 30
The web manger needs some tidying up. The profile is created when you click the + button. All other settings are saved automatically after that. If you click the save button it tries to create a new profile with the same name which is not allowed. So avoid clicking the save button and it should work.
The following user(s) said Thank You: Cyranogp, juanmb, moustickk

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

Ubuntu 16.04 AMD64 VM, RPi3 Ubuntu Mate 16.04, Windows 10 AMD64, Ubuntu 16.04 AAEON UP Core
Avalon M-Uno, EQ6 Pro, Atik420, ASI1600MM-C, ASI120MM-S, DBK21AU04, ZWO EFW, Optec TCFSi
Vixen R150S, GSO RC8, ST80
  • Page:
  • 1
  • 2
Time to create page: 0.509 seconds

Login



3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!


Gallery

Replica

Why INDI

Replica