Anyone know how to do this?
I would try this method:
- Create a cron task that calls the chosen solution from the above link with a periodicity of your liking
- Store the result in a file on your machine running HASS.
- Create a sensor based on platform: file
I would submit your system resources to a MQTT broker. You could do so with a cron.
I created a cron reading out my Pi’s temperature to test my broker/sensor setup.
A remote Pi can easily submit to your semi-/public broker.
Yes, and if the mqtt sensor hasn’t been updated for some time consider the process dead.
Another alternative is to use ssh in a command line sensor to get the data directly into HA.
Just remember to add the public ssh key for the homeassistant user to the remote pi.
Could you please elaborate a bit more on how to solve it with SNMP?
You may install SNMP on pi
You may monitor in home Assistant with snmp component
Finally I got around to get this sorted. Did it without SNMP, that became just to complicated.
First, make sure you can ssh into the remote server without password: https://www.raspberrypi.org/documentation/remote-access/ssh/passwordless.md
and since HASS uses the username “homeassistant” (at least for me) make sure you have the right files in /home/homeassistant/.ssh
Then create a script with the correct username and ip-adress i.e checkDB.sh:
ssh [email protected] “sudo ps cax | grep mysqld > /dev/null”
if [ $? -eq 0 ]
make it executable: chmod 755
Then create a sensor:
> - platform: command_line > command: "/home/homeassistant/.homeassistant/checkDB.sh" > name: BerryDB
i have 2 raspberry pi
i would like to monitor 1st on 2nd pi with HA.
my pi ask for password once rebooted,
it doenst remember passphrase
can somebody guide,
I just use glances and ha-dockermon. Covers everything I’m interested in monitoring.
Also check this small python deamon out:
This is how I do it using the API interface to HA