Scally-H / RedReactor

Sample code for the Raspberry Pi Red Reactor UPS and technical documentation
20 stars 1 forks source link

Making Web Monitor Run at start up #8

Closed emersonsc closed 1 year ago

emersonsc commented 1 year ago

Not a issue, but a feature request to have instructions added to have the Web Monitor run as a service or run automatically at start up like the other two add ons.

Scally-H commented 1 year ago

Sure - I'll update the GitHub soon. For now, you can re-use the CRON example by changing the paths to RR_WebMonitor.py, though it will run as root and you'll need to install matplotlib with sudo pip3 install matplotlib (I checked and this works fine).

emersonsc commented 1 year ago

The Pi Zero 2 W did not like running that sudo install, I had to put it in front of the AC to keep it cool so it would complete.

I went the route of the systemd like the other services so, like you said, if there was a failure, it would attempt to reload it.

Scally-H commented 1 year ago

A systemd service file (set to run as user 'pi', update as necessary) has been added to RR_WebMonitor, which has also been updated to provide a limited restart/shutdown web page in case of I2C access start-up errors. See the README file for install instructions.

emersonsc commented 1 year ago

Awesome I'll check it out, thank you!

On Sun, Jun 25, 2023, 6:12 PM Pascal @.***> wrote:

A systemd service file (set to run as user 'pi', update as necessary) has been added to RR_WebMonitor, which has also been updated to provide a limited restart/shutdown web page in case of I2C access start-up errors. See the README file for install instructions.

— Reply to this email directly, view it on GitHub https://github.com/Scally-H/RedReactor/issues/8#issuecomment-1606285204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQUVKSUC3GJNEEJ6TJUSIE3XNCZWJANCNFSM6AAAAAAZK7JG3A . You are receiving this because you authored the thread.Message ID: @.***>