I am trying to see the best way to restart the Raspberry PI from Cumulocity, out of the box using PI agent.
This is a use case where the CPU temperature of PI goes up, Cumulocity will trigger a restart. So far the work I have done does the following
- Send measurements from PI via MQTT (python paho client). I can see them show up in Cumulocity
- Using Shell options in cumulocity UI, I send a manual a manual restart message
- Subscribe the restart message in python client and then issue a restart to PI
To summarize I would like to how to read the measurements received in Cumulocity and if it reaches above a certain value, trigger an automatic restart of the PI device. That is skip steps b and c above and make it automatic.
Thanks for your help, JM