OpenMarine

Full Version: Terminal command to restart sensors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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