pirowflo
pirowflo copied to clipboard
Clean app stop and system shutdown
Is your feature request related to a problem? Please describe. 1-week WaterRower owner here, with some experience in Python / Linux / Coding. My kids are using the rowing machine, but I do not see me asking them to not forget to stop the running app and trigger the RPI clean shutdown using the web UI. I am wondering if this could be triggered automatically when disconnecting the USB cable from the S4?
Describe the solution you'd like when the USB cable is disconnected from the S4, a script is triggered to stop the current services and trigger a clean RPi shutdown.
Describe alternatives you've considered
Additional context I understand that some would like the Pi to stay always on, so this could be a configuration flag to be set on install
Im not sure if this has to be included in the program. I would suggest doing it yourself with a small bash script that gets executed when the usb connection is removed. See here how to trigger such a script: https://betterprogramming.pub/how-to-run-a-python-script-on-insertion-of-a-usb-device-2e86d38dcdb