GithubHelp home page GithubHelp logo

knro / indiwebmanager Goto Github PK

View Code? Open in Web Editor NEW
43.0 14.0 33.0 818 KB

Web Manager for INDI Server

Home Page: http://www.indilib.org

License: GNU Lesser General Public License v2.1

Python 58.04% Smarty 12.88% CSS 7.57% JavaScript 21.52%

indiwebmanager's Introduction

INDI Web Manager

INDI Web Manager is a simple Web Application to manage:

It supports multiple driver profiles along with optional custom remote drivers. It can be used to start INDI server locally, and also to connect or chain to remote INDI servers.

INDI Web Manager

The Web Application is based on Bottle Py micro-framework. It has a built-in webserver and by default listens on port 8624.

Installation

Before installing the indiweb package, make sure the INDI library is installed on the target system.

You can install the indiweb Python package using pip:

$ pip install indiweb

You may want to install it system-wide, only in your user account or even into a virtual environment (if you are a developer).

If you want to install it system-wide, you will have to invoke pip with superuser rights:

$ sudo pip install indiweb

Usage

After installing the indiweb package, the command indi-web will be available in your sytem PATH.

You can obtain help about the indi-web command by invoking:

$ indi-web -h

The INDI Web Manager runs as a standalone web server. It can be started manually by invoking:

$ indi-web -v

Then using your favorite web browser, go to http://localhost:8624 if the INDI Web Manager is running locally. If the INDI Web Manager is installed on a remote system, simply replace localhost with the hostname or IP address of the remote system.

Auto Start

If you selected any profile as Auto Start then the INDI server shall be automatically started when the service is executed at start up.

Auto Connect

Similary to Auto Start, Auto Connect would connect all the drivers after the server is up and running.

Start vs. Connect

What is the difference between starting a driver and connecting a driver?

  • Start: The INDI server executes the driver. The driver starts up and provide a list of properties. It does not establish connection with the physical device.
  • Connect: Establish connection to the physical device.

Systemd configuration

The provided file indiwebmanager.service is an example systemd service file that can be used to run indi-web at startup as pi user. If your username is different please edit the file and change the username first.

Indiwebmanager must be installed system-wide:

sudo pip install indiweb

Copy your preferred service file to /etc/systemd/system:

sudo cp indiwebmanager.service /etc/systemd/system/
sudo chmod 644 /etc/systemd/system/indiwebmanager.service

Now configure systemd to load the service file during boot:

sudo systemctl daemon-reload
sudo systemctl enable indiwebmanager.service

Finally, reboot the system for your changes to take effect:

sudo reboot

After startup, check the status of the INDI Web Manager service:

sudo systemctl status indiwebmanager.service

If all appears OK, you can start using the Web Application using any browser.

Profiles

The Web Application provides a default profile to run simulator drivers. To use a new profile, add the profile name and then click the plus button. Next, select which drivers to run under this particular profile. After selecting the drivers, click the Save icon to save all your changes. To enable automatic startup of INDI server for a particular profile when the device boots up or when invoked manually via the systemctl command, check the Auto Start checkbox.

API

INDI Web Manager provides a RESTful API to control all aspects of the application. Data communication is via JSON messages. All URLs are appended to the hostname:port running the INDI Web Manager.

INDI Server Methods

Get Server Status

URL Method Return Format
/api/server/status GET INDI server status (running or not) {'server': bool, 'active_profile': profile_name}

Example: curl http://localhost:8624/api/server/status Reply: [{"status": "False"}, {"active_profile": ""}]

Start Server

URL Method Return Format
/api/server/<name>/start POST None []

Where name is the equipment profile name to start.

Example: curl -X POST http://localhost:8624/api/server/start/Simulators Reply: None

Stop Server

URL Method Return Format
/api/server/stop POST None []

Get running drivers list

URL Method Return Format
/api/server/drivers GET Returns an array for all the locally running drivers

The format is as following:

  • Name: Driver name. If no label is specified, the driver uses this default name.
  • Label: If specified, set the driver name to this label.
  • Skeleton: XML Skeleton path which is used by some drivers (e.g. EQMod)
  • Version: Driver version.
  • Binary: Executable driver binary
  • Family: Category of driver (Telescopes, CCDs, Domes..etc)
  • Custom: True if the driver is custom, false otherwise

Example: curl http://localhost:8624/api/server/drivers Reply: [{"name": "Telescope Simulator", "label": "Telescope Simulator", "skeleton": null, "version": "1.0", "binary": "indi_simulator_telescope", "family": "Telescopes", "custom": false}, {"name": "CCD Simulator", "label": "CCD Simulator", "skeleton": null, "version": "1.0", "binary": "indi_simulator_ccd", "family": "CCDs", "custom": false}, {"name": "Focuser Simulator", "label": "Focuser Simulator", "skeleton": null, "version": "1.0", "binary": "indi_simulator_focus", "family": "Focusers", "custom": false}]

Profiles

Add new profile

URL Method Return Format
/api/profiles/<name> POST None None

To add a profile named foo:

curl -H "Content-Type: application/json" -X POST http://localhost:8624/api/profiles/foo

Delete profile

URL Method Return Format
/api/profiles/<name> DELETE None None

To delete a profile named foo:

curl -X DELETE http://localhost:8624/api/profiles/foo

Get All Profiles

URL Method Return Format
/api/profiles GET Returns all profiles [{"port": number, "id": ID, "autostart": number, "name": profile_name}, ...]

Example: curl http://localhost:8624/api/profiles Reply: [{"port": 7624, "id": 1, "autostart": 0, "autoconnect": 0, "name": "Simulators"}, {"port": 7624, "id": 2, "autostart": 0, "name": "EQ5"}]

Get One Profile

URL Method Return Format
/api/profiles/<name> GET Returns one Profile

Example: curl http://localhost:8624/api/profiles/Simulators Reply: {"id": 1, "name": "Simulators", "port": 7624, "autostart": 0, "autoconnect": 0}

Update One Profile

URL Method Return Format
/api/profiles/<name> PUT Update profile info (port, autostar, autoconnect)

Example: curl -H 'Content-Type: application/json' -X PUT -d '{"port":9000,"autostart":1,"autoconnect":0}' http://localhost:8624/api/profiles/Simulators Reply: None

Save drivers to profile

URL Method Return Format
/api/profiles/<name>/drivers POST Save local and remote drivers to a profile.
If profile does not exist, it is created. It expects an array of drivers.
  • Local drivers must define the label attribute.
  • Remote drivers must define the remote attribute.

For example: [{"label":"Pegasus UPB"},{"remote":"[email protected]"}]

To add the drivers above to a profile named My Obs, we call the following. Example: curl -H 'Content-Type: application/json' -X POST -d '[{"label":"Pegasus UPB"},{"remote":"[email protected]"}]' http://localhost:8624/api/profiles/My%20Obs/drivers Reply: None

Drivers

List all Groups

URL Method Return Format
/api/drivers/groups GET Get the driver categories

Example: curl http://localhost:8624/api/drivers/groups Reply: ["Adaptive Optics", "Agent", "Auxiliary", "CCDs", "Detectors", "Domes", "Filter Wheels", "Focusers", "Spectrographs", "Telescopes", "Weather"]

List all drivers

URL Method Return Format
/api/drivers GET Get all the drivers information

Example: curl http://localhost:8624/api/drivers Reply: [{"name": "AAG Cloud Watcher", "label": "AAG Cloud Watcher", "skeleton": null, "version": "1.4", "binary": "indi_aagcloudwatcher", "family": "Weather", "custom": false}, {"name": "ASI EFW", "label": "ASI EFW", "skeleton": null, "version": "0.9", "binary": "indi_asi_wheel", "family": "Filter Wheels", "custom": false}.....]

Start specific driver

URL Method Return Format
/api/drivers/start/<label> POST Start a specific driver if INDI server is already running.

All spaces must be encoded with %20 as per URI standards.

Example: http://localhost:8624/api/drivers/start/Pegasus%20UPB Reply: None

Stop specific driver

URL Method Return Format
/api/drivers/stop/<label> POST Stop a specific driver if INDI server is already running.

All spaces must be encoded with %20 as per URI standards.

Example: http://localhost:8624/api/drivers/stop/Pegasus%20UPB Reply: None

Restart specific driver

URL Method Return Format
/api/drivers/restart/<label> POST Restart a specific driver if INDI server is already running.

All spaces must be encoded with %20 as per URI standards.

Example: http://localhost:8624/api/drivers/restart/Pegasus%20UPB Reply: None

INDIHUB Agent Methods

Change indihub-agent current mode

You can launch indihub-agent in three different modes or stop it with using this endpoint.

URL Method Return Format
/api/indihub/mode/<mode> POST Change indihub-agent to run in a specific mode if INDI server is already running.

Possible values for URI-parameter mode:

  • solo
  • share
  • robotic
  • or off to stop indihub-agent process

Example: curl -X POST /api/indihub/mode/solo Reply: None

Get indihub-agent status

URL Method Return Format
/api/indihub/status GET Get status of indihub-agent

Example: curl /api/indihub/status

Reply: [{'status': 'True', 'mode': 'solo', 'active_profile': 'my-profile'}]

System Commands

Reboot the system

URL Method Return Format
/api/system/reboot POST Reboot the system on which the INDI server is running.

The driver and indi server are closed.

Example: http://localhost:8624/api/system/reboot Reply: None

Poweroff the system

URL Method Return Format
/api/system/poweroff POST powers off the system on which the INDI server is running.

The driver and indi server are closed.

Example: http://localhost:8624/api/system/poweroff Reply: None

Development

To run indiweb directly from the source directory make sure prerequisits are installed and use:

python3 -m indiweb.main

Authors

Jasem Mutlaq ([email protected])

Juan Menendez ([email protected])

indiwebmanager's People

Contributors

aaronwmorris avatar agners avatar chris-rowland avatar chrysikos avatar dencoded avatar dependabot[bot] avatar gnthibault avatar hoxca avatar jochym avatar jrhuerta avatar juanmb avatar kecsap avatar knro avatar maxkreja avatar onlinejudge95 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

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

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.. )

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

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

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!

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).

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

--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

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/

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.

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

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

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.

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.

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

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.

Internal Server Error when loading web manager

I have installed INDI server and related packages on my raspberry pi. I am successfully able to install the web manager and run it in standalone mode. When I open the URL in my browser I receive the following error.

Screenshot from 2024-09-23 11-33-12

On the terminal i receive the following logs

2024-09-23 11:35:28,346 - DEBUG: command line arguments: {'indi_port': 7624, 'port': 8624, 'host': '0.0.0.0', 'fifo': '/tmp/indiFIFO', 'conf': '/home/onlinejudge95/.indi', 'xmldir': '/usr/share/indi/', 'verbose': True, 'logfile': None, 'server': 'standalone'}
2024-09-23 11:35:28,358 - INFO: using Bottle as standalone server
Traceback (most recent call last):
  File "/home/onlinejudge95/.local/bin/bottle.py", line 994, in _handle
    out = route.call(**args)
  File "/home/onlinejudge95/.local/bin/bottle.py", line 2024, in wrapper
    rv = callback(*a, **ka)
  File "/home/onlinejudge95/.local/lib/python3.9/site-packages/indiweb/main.py", line 140, in main_form
    return template(os.path.join(views_path, 'form.tpl'), profiles=profiles,
  File "/home/onlinejudge95/.local/bin/bottle.py", line 4492, in template
    TEMPLATES[tplid] = adapter(name=tpl, lookup=lookup, **settings)
  File "/home/onlinejudge95/.local/bin/bottle.py", line 4075, in __init__
    self.filename = self.search(self.name, self.lookup)
  File "/home/onlinejudge95/.local/bin/bottle.py", line 4090, in search
    raise depr(0, 12, "Use of absolute path for template name.",
TypeError: exceptions must derive from BaseException

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.

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

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

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.

Installing on Ubuntu 24.04 ??

Hello

Wondering if you can help me get this installed on Ubuntu 24.04 please ?
I'm basically an end user of Linux and can't figure this out. It's probably really easy for those who understand the inner workings of Linux but I'm struggling....
Following the instructions for installation worked fine on 22.04 but i believe there's been a change with pip since version 23.04 that means they no longer work. see below...

~$ sudo pip install indiweb
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

I'm not sure how to proceed here as I know nothing about virtual environments or python in general. Any help to get indiweb installed greatly appreciated.
:-)

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.