I like to use HA to monitor my solar inverter status to ensure it is online. Thinking using Ping the invertor to check if it is ok and report fault if it is offline.
My HA is HA core loaded on container at Qnap NAS with latest 2023.9.3
I added following at configuration.yaml to create binary_sensor ping
command_line:
- binary_sensor:
command: ‘ping -c 1 192.168.18.30 | grep “1 received” | wc -l’
name: “is_solaredge_online”
device_class: connectivity
payload_on: 1
payload_off: 0
after restart, I can see entity is_solaredge_online
in Automation, add trigger as show photo.
run the test. it sent notifcation ok. However, if I block invertor ip address or turn off invertor for more than 5 mins, it doesn’t trigger the event.
further I noticed in developer tools, state of entity “states. is_solaredge_online” is off.
Suspend binary.sensor ping I create doesn’t work. how to test and see result? And where did I go wrong?