OpenMarine
Terminal command to restart sensors - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2)
+--- Thread: Terminal command to restart sensors (/showthread.php?tid=2404)



Terminal command to restart sensors - jamos.tan@gmail.com - 2020-03-07

In the GPIO tab within openplotter, there is a restart button.
I'd like to know if it is possible to do exactly the same with a terminal command like the one I am doing for SignalK
Code:
sudo systemctl restart signalk.service

Openplotter doesn't seem to be a systemctl service, and I don't want to restart the entire openplotter bootup sequence, just the sensors.

I am mapping a gpio button to reset some services on a headless system, don't want to reboot the entire system or log-in through vnc, open openplotter and then restart the service that is giving me trouble.

In the openplotter code I see that this command is assigned to the restart buttons:
Code:
self.reset_sensors

Realizing this is Python code the way to go ahead is probably to call a python script that restarts the sensors.
I don't know how such a script would look like standalone, hope someone can help.

Kind regards,

Jamos