Closed gnthibault closed 1 year ago
Why do you need multiple web managers on the same machine?
I am building a robotic observatory software platform, and while testing it with actual devices (not simulators) I realized that my device drivers were much much less stable than what I expected. I proceeded to setup separate indiserver/indiwebmanager pair for the problematic devices so that I could programmatically reset the server for the individual device that is causing issue without stopping other devices.
Simply stop the driver was not enough (as mentionned in issue https://github.com/knro/indiwebmanager/issues/55)
I will investigate #55 and see if I can replicate it.
Ok thank you very much for investigating. Just to make it clear, this is mostly likely and indiserver or even a driver issue, not a indiwebmanager issue (I will close the indiwebmanager issue).
I still think it can be valuable to restart individual indiserver remotely through API in order to make startup sequence fully reproducible. Also I have been facing issues on my camera driver that only show up when they are not ran individually on their own indiserver. All in all after I have cleaned the PR I still think it would be valuable.
Ok, I am almost there, I added support to load remote driver from API as well
Ok no there are plenty of other errors:
Aug 21 22:01:56 robot-scope indi-web[1622]: File "/home/gnthibault/.local/lib/python3.10/site-packages/indiweb-0.1.7-py3.10.egg/indiweb/main.py", line 16, in
Aug 22 23:17:59 robot-scope indi-web[4345]: Traceback (most recent call last):
Aug 22 23:17:59 robot-scope indi-web[4345]: File "/home/gnthibault/.local/bin/indi-web", line 33, in
Ok, finally fixed the nasty bug with remote driver stop mentionned here: https://github.com/indilib/indi/issues/1927 The whole indihub management still requires a somework unfortunately
Thank you, can you please summarize the changes?
Thank you, can you please summarize the changes?
Yes, sure, as mentionned earlier, I am not yet done, but currently, these are the main changes:
I still need to fix the indihub part, which might not be that easy, especially for indihub, because I don't know much about this topic yet.
Ok I am moving forward with indihub, which is actually even more simple to "pythonize" than the indi_server class. I still need to make sure there is no clash with the sqlite DB and do some additional tests, but I am getting there.
Now, I have a more general question for your @knro is there a chance that the PR will get accepted if the python2 compatibility is broken ? Thank you in advance for your help
We don't need to support Python2. I didn't have time yet to look at this PR in detail, hopefully over this weekend. Sorry for the delay.
Ok thank you for your feedback. No problem for the review, you are actually doing so much for the community already ! There is still a bit of testing I'd like to do (for feature I am not personally using on a daily basis) + hardening the sqlite support. Hopefully PR will be really ready for review before this weekend
Ok @knro I think this is ready for review. Squashed all commits, removed too verbose logging + proper commit message.
What's a good test scenario for this?
Good point, I will setup and describe a proper test with 2 servers running in parallel
I used the following lines to run two distinct instances of indiweb:
indi-web -v indi-web -v --fifo /tmp/indiFIFO_science_camera --indi-port 7626 --port 8625
Then go to your browser, (http://localhost:8624 and http://localhost:8625)and you should be able to see two separate instance of indiwebmanager, and play with them.
Thank you in advance for your review
Open for review, please let me know if there are any observations / suggestions ? @knro
Thank you so much @knro don't hesitate to ping me if there is a new issue related to this PR that I can help support or fix.
This PR is still a work in progress, but the basic set of features are needed are there and tested