A MQTT client to send pi system status periodically through MQTT. The following system stats are published:
- CPU Temparature
- GPU Temparature
- Voltages: Core, SDRAM_C, SDRAM_I, SDRAM_P
- Clone this repository.
- Open
config.json
and set the broker options. - In
config.json
, changetopic.base
to the first part of the of topic, common to all published message topics. - Optinally you can edit
topic.*
to customize the topic to which you want to publish
You can also update the configurations online by sending messages to specific topics. The following configurations can be updated online:
Setting | Topic | Example Payload |
---|---|---|
Update Interval | topic.base+"/config/interval" |
Send 10 to set update interval to 10 seconds |
You can use systemd to start this node program.
- Create a systemd file by
sudo nano /lib/systemd/system/pisystem-bridge.service
- Put the contents as
[Unit]
Description=Pi System Monitor Bridge Service
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/local/bin/node <path-to-this-folder>
[Install]
WantedBy=multi-user.target
- Execute the following commands
sudo chmod 644 /lib/systemd/system/pisystem-bridge.service
sudo systemctl daemon-reload
sudo systemctl enable pisystem-bridge.service
- Reboot your system/raspberry pi.
- To check status
systemctl status pisystem-bridge.service