Git Product home page Git Product logo

indiwebmanager's People

Contributors

aaronwmorris avatar agners avatar chris-rowland avatar chrysikos avatar dencoded avatar gnthibault avatar hoxca avatar jochym avatar jrhuerta avatar juanmb avatar kecsap avatar knro avatar maxkreja avatar ppapadeas avatar rkaczorek avatar sterne-jaeger avatar wgauvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indiwebmanager's Issues

Moving bottle out - requirements.txt

I suggest we move bottle.py out of the directory and call it in as a requirement to be installed through a requirements.txt and pip.

@knro let me know if you want me to open the PR, creating the requirements.txt and updating the readme.

Does not display the 3rd party app indi_rpicam

The web manager does not display all of the drivers installed. I can run this driver command line indi_rpicam, but it does not display in the web manager.

So in Ekos if i pick this driver indi_rpicam and try to send it to the web manger it does not work.

indi-web hangs when indiserver can't start due to port conflict

Indi-web will hang if indiserver fails to start due a port conflict. I found this out the hard way when I had an SSH session open with port fowarding to a remote telescope and then attempted to start a local indiserver with some simulators. It would be good if indi-web didn't hang and instead propagated the error.

2019-10-04T21:35:40: bind: Address already in use
2019-10-04T21:35:40: good bye

--conf option for Indiserver does not load expected config

Pretty self explanatory from the title.
I tried the option with my profiles.db files + some xml config for my pegasus upb driver.
The profiles.db is well loaded, but I noticed that the pegasus upb driver did loaded another (default ?) xml, until I restarted indiwebmanager with the driver xml located in ~/.indi

Same goes for Losmandy Gemini driver, and maybo some other as well. I am not sure who sets the driver config location for those.

I am not sure if this is related to indiwebmanager or the driver itself ? Is there a way to force config lookup for all drivers using the --conf option of indiwebmanager ?

Thank you for your help

hardcoded INDI_DATA_DIR variable

I have submitted pull request #43 to allow the current hardcoded INDI_DATA_DIR to be overridden by an environment variable.

This should have no impact to existing installations.

Weird install of indiwebmanager

This is the result of the installation by "sudo pip install indiweb"

The directory '/home/nafa/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nafa/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: indiweb in ./.local/lib/python2.7/site-packages
Requirement already satisfied: psutil in ./.local/lib/python2.7/site-packages (from indiweb)
Requirement already satisfied: requests in ./.local/lib/python2.7/site-packages (from indiweb)
Requirement already satisfied: bottle in ./.local/lib/python2.7/site-packages (from indiweb)
Requirement already satisfied: idna<2.7,>=2.5 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
The directory '/home/nafa/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/nafa/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: indiweb in ./.local/lib/python2.7/site-packages
Requirement already satisfied: psutil in ./.local/lib/python2.7/site-packages (from indiweb)
Requirement already satisfied: requests in ./.local/lib/python2.7/site-packages (from indiweb)
Requirement already satisfied: bottle in ./.local/lib/python2.7/site-packages (from indiweb)
Requirement already satisfied: idna<2.7,>=2.5 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
Requirement already satisfied: certifi>=2017.4.17 in ./.local/lib/python2.7/site-packages (from requests->indiweb)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./.local/lib/python2.7/site-packages (from requests->indiweb)

**I add a link to indi-web under /usr/bin: sudo ln -sf /home/nafa/.local/bin/indi-web /usr/bin/indi-web

And the service doesn't start and stay hang in activating:**

sudo systemctl status indiwebmanager-pi.service
\u25cf indiwebmanager-pi.service - INDI Web Manager
Loaded: loaded (/etc/systemd/system/indiwebmanager-pi.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since jeu. 2017-08-24 11:58:42 CEST; 3s ago
Process: 4190 ExecStart=/usr/local/bin/indi-web -v (code=exited, status=217/USER)
Main PID: 4190 (code=exited, status=217/USER)

ao\Uffffffff 11:58:42 nafa-desktop systemd[1]: indiwebmanager-pi.service: Main process exited, code=exited, status=217/USER
ao\Uffffffff 11:58:42 nafa-desktop systemd[1]: indiwebmanager-pi.service: Unit entered failed state.
ao\Uffffffff 11:58:42 nafa-desktop systemd[1]: indiwebmanager-pi.service: Failed with result 'exit-code'.

Log of systemctl:

journalctl -u indiwebmanager-pi
-- Logs begin at jeu. 2016-02-11 17:28:01 CET, end at jeu. 2017-08-24 12:07:35 CEST. --
ao\Uffffffff 11:57:56 nafa-desktop systemd[1]: Started INDI Web Manager.
ao\Uffffffff 11:58:01 nafa-desktop systemd[1]: indiwebmanager-pi.service: Main process exited, code=exited, status=217/USER
ao\Uffffffff 11:58:01 nafa-desktop systemd[1]: indiwebmanager-pi.service: Unit entered failed state.
ao\Uffffffff 11:58:01 nafa-desktop systemd[1]: indiwebmanager-pi.service: Failed with result 'exit-code'.
ao\Uffffffff 11:58:06 nafa-desktop systemd[1]: indiwebmanager-pi.service: Service hold-off time over, scheduling restart.
ao\Uffffffff 11:58:06 nafa-desktop systemd[1]: Stopped INDI Web Manager.
ao\Uffffffff 11:58:07 nafa-desktop systemd[1]: Started INDI Web Manager.
ao\Uffffffff 11:58:12 nafa-desktop systemd[1]: indiwebmanager-pi.service: Main process exited, code=exited, status=217/USER
ao\Uffffffff 11:58:12 nafa-desktop systemd[1]: indiwebmanager-pi.service: Unit entered failed state.
ao\Uffffffff 11:58:12 nafa-desktop systemd[1]: indiwebmanager-pi.service: Failed with result 'exit-code'.
ao\Uffffffff 11:58:17 nafa-desktop systemd[1]: indiwebmanager-pi.service: Service hold-off time over, scheduling restart.
ao\Uffffffff 11:58:17 nafa-desktop systemd[1]: Stopped INDI Web Manager.
ao\Uffffffff 11:58:17 nafa-desktop systemd[1]: Started INDI Web Manager.
ao\Uffffffff 11:58:22 nafa-desktop systemd[1]: indiwebmanager-pi.service: Main process exited, code=exited, status=217/USER
ao\Uffffffff 11:58:22 nafa-desktop systemd[1]: indiwebmanager-pi.service: Unit entered failed state.
ao\Uffffffff 11:58:22 nafa-desktop systemd[1]: indiwebmanager-pi.service: Failed with result 'exit-code'.
ao\Uffffffff 11:58:27 nafa-desktop systemd[1]: indiwebmanager-pi.service: Service hold-off time over, scheduling restart.
ao\Uffffffff 11:58:27 nafa-desktop systemd[1]: Stopped INDI Web Manager.
ao\Uffffffff 11:58:27 nafa-desktop systemd[1]: Started INDI Web Manager.
ao\Uffffffff 11:58:32 nafa-desktop systemd[1]: indiwebmanager-pi.service: Main process exited, code=exited, status=217/USER
ao\Uffffffff 11:58:32 nafa-desktop systemd[1]: indiwebmanager-pi.service: Unit entered failed state.
lines 1-22

Errror: Failed to start profile on remote INDI Web Manager (cannot start profile)

Thanks for making this useful software!

We have sucessfully used INDI Web Manager with our NUC and telescopes in the past. I have recently updated the NUC to Fedora 36 and the most recent version of the indi libraries (v1.9.8). I installed indiwebmanager with pip-install.

Unfortunately, I am now unable to start new profiles via kstars (version 3.5.7 linux or 3.6.1 mac os x). The server starts normally, without problems, but errors are present after trying to start a profile.

In the debug logs I always see the same message:

INDI: Error communicating with INDI Web Manager:  "Error transferring http://pctpmaster:8624/api/server/start/pctpmaster-2022 - server replied: Internal Server Error"
 org.kde.kstars.ekos: "Failed to start profile on remote INDI Web Manager."

when I look on the server-side I see this


[root@localhost ~]# service indiwebmanager status
Redirecting to /bin/systemctl status indiwebmanager.service
* indiwebmanager.service - INDI Web Manager
     Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2022-11-29 11:30:38 CET; 1h 43min ago
   Main PID: 3219 (indi-web)
      Tasks: 1 (limit: 9319)
     Memory: 17.1M
        CPU: 1.704s
     CGroup: /system.slice/indiwebmanager.service
             `- 3219 /usr/bin/python2 /usr/bin/indi-web -v

Nov 29 11:36:04 localhost.localdomain indi-web[3219]:     rv = callback(*a, **ka)
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:   File "/usr/lib/python2.7/site-packages/indiweb/main.py", line 254, in start_server
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:     start_profile(profile)
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:   File "/usr/lib/python2.7/site-packages/indiweb/main.py", line 108, in start_profile
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:     indi_server.start(info['port'], all_drivers)
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:   File "/usr/lib/python2.7/site-packages/indiweb/indi_server.py", line 70, in start
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:     self.start_driver(driver)
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:   File "/usr/lib/python2.7/site-packages/indiweb/indi_server.py", line 37, in start_driver
Nov 29 11:36:04 localhost.localdomain indi-web[3219]:     cmd = 'start %s' % driver.binary
Nov 29 11:36:04 localhost.localdomain indi-web[3219]: AttributeError: 'NoneType' object has no attribute 'binary'

I read that this can be caused by a corrupt profile database, but I have tried removing completely the ~/.indi directory and starting again, and I get the same error.

Interestingly, I note that old profiles in Kstars still seem to work. I just cannot create new ones. And I notice that the profiles are not correctly saved on indiwebmanager.

Is there anything else I can do to diagnose and fix this problem?

Many thanks!
Henry

Issue with Auto start (Raspbian)

Hi,

I installed this new version of indiwebmanager. It manually works (indi-web -v), but not with Auto Start :
`pi@raspberrypi:~ $ sudo systemctl status indiwebmanager.service
● indiwebmanager.service - INDI Web Manager
Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled)
Active: activating (auto-restart) (Result: exit-code) since dim. 2017-08-06 22:41:48 CEST; 3s ago
Process: 1213 ExecStart=/usr/bin/indi-web -v -c /usr/share/indi/config (code=exited, status=203/EXEC)
Process: 1210 ExecStartPre=/bin/mkdir -p /usr/share/indi/config (code=exited, status=0/SUCCESS)
Main PID: 1213 (code=exited, status=203/EXEC)

août 06 22:41:48 raspberrypi systemd[1]: Unit indiwebmanager.service entere....
Hint: Some lines were ellipsized, use -l to show in full.
pi@raspberrypi:~ $`
Thanks for your help,
Olivier

Running indilib with default configuration

When running INDI server via indiwebmanager, INDI server loads default configuration only (/usr/share/indi/ instead of /root/.indi/). I am running it as root via systemd. This way no option set in indi control panel could be saved - they persist as long as single session lasts).

Python module "requests" is required

Hello,

On a new Ubuntu installation, the python package "requests" is a prerequisite but is not installed. I suggest to add the following to the installation instructions:

sudo apt-get install python-pip
pip install --upgrade pip
pip install requests

Driver Aliases

Right now, the manager can only start drivers after parsing the drivers list. But there is no ability to specify an alias for the driver. For example, suppose I want to create a profile with 2 SBIG cameras: "SBIG FOO" and "SBIG BAR". There is no way to do this now.

So what would the best solution to approach this? Any thoughts? @juanmb @sterne-jaeger would appreciate your input on this!

indiweb not starting

Hello,

I have a thread opened but I cannot solve it, so I'm opening up a bug report.
http://indilib.org/forum/embedded-indi/2947-indi-web-v-not-starting.html

root@heidenrod-obs:/# indi-web Traceback (most recent call last): File "/usr/local/bin/indi-web", line 7, in <module> from indiweb.main import main File "/usr/local/lib/python3.5/dist-packages/indiweb/main.py", line 49, in <module> collection = DriverCollection(args.xmldir) File "/usr/local/lib/python3.5/dist-packages/indiweb/driver.py", line 30, in __init__ self.parse_drivers() File "/usr/local/lib/python3.5/dist-packages/indiweb/driver.py", line 43, in parse_drivers family = group.attrib['group'] KeyError: 'group' root@heidenrod-obs:/#

I've tried under python 2.7 too, same issue.

thanks

No handle for MDPD case

Some drivers are MDPD = Multiple Devices Per Drivers, so when starting the driver for them, only one driver must be started uniquely even if we have multiples specified. MDPD flag is specified in the driver XML file.

Fails to install

Hi

I just installed INDI, and triend to install indiewebmanager, but I get the following message after performing the instructions of this git page:

pi@OPiPlus:~$ sudo pip install indiweb
[sudo] password for pi:
Collecting indiweb
  Using cached https://files.pythonhosted.org/packages/5e/02/fe856b871718b42a902f853c4d70e4f6968337803044fba585a555e5f0c8/indiweb-0.1.7.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ImportError: No module named setuptools

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-uAE08Q/indiweb/

Device recognition

Device recognition is bad?

Why all canon is recognized and use only one type of xml config file?
"Canon DSLR_config.xml"
and not ( for example )
"Canon DSLR EOS 500D_config.xml"
or
"Canon DSLR EOS 1000D_config.xml"

In this way ONLY one xml config file is created for all Canon Model ( And as you know, they are not all the same ..resolution dimension ecc.. )

Solved : command 'arm-linux-gnueabihf-gcc' failed with exit status 1

Hi Jasem,
I'm using indi, ekos and kstar since many years, so many thanks for ur great work.
I tried to install indiwebmanager to avoid connecting on SSH to my Pi and I got this error : error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

It comes from the C compilation with arm-linux-gnueabihf-gcc of sutil/_psutil_common.c, look


psutil/_psutil_common.c:9:20: fatal error: Python.h: Aucun fichier ou dossier de ce type
#include <Python.h>
^
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

In order to avoid that, I needed to install python-dev (apt install python-dev).

I will not open a PR for that ;)
Hope it could help others people,
And great job again !

If u need some help for the future, will be a pleasure to help u and the team,
Vincent

Custom drivers registered with KStars 3.6.1 do not appear in the indiwebserver driver list.

Several drivers are duplicated in the driver list.
Even if I select one of them, both are checked when I reload web manager.

To Reproduce

  1. install astroberry-diy. see detail at https://github.com/rkaczorek/astroberry-diy
  2. start indi web manager.
  3. create new profile
  4. check one of "astroberry system" in drivers list.
  5. save profile.
  6. reload indi web manager.
  7. select created profile at step 3.
  8. both "astroberry system" have been checked.

Screenshot
image

File list in /usr/share/indi
ls.txt

drivers.xml and indi_astroberry_system.xml
drivers.zip

Test & Release v0.1.6 on pip

I added a new feature to auto connect devices after starting them. @juanmb Can you please test and release for pip? The only thing I don't like about this is that I "arbitrary" decided to wait for 3 seconds before calling indi_getprop to find the started devices, and then called indi_setprop to turn them on. If you have a better solution, let me know but this pretty much works now.

Add support for ser2net

For mounts which use serial port it would be a nice addition to enable ser2net. This can be useful e.g. for firmware upgrade or to support application which connect directly to a Celestron mount.

Reboot and PowerOff options in indi-web

Could web options be added to reboot and power off the system running indi-web.

At present full set up and configuration can be done from indi-web but at the end of the evening the only way to shut down is to use ssh to shut down. Options in indi-web to do this would be very useful. It would help to automate the system shut down from Ekos.

I'll have a look but my Python is minimal.

Chris

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.