NUT's Status: Online->Unknown->Online->Unknown; Battery: 100%->Unknown->100%->Unknown

I setup NUT yesterday and I ran into a problem. My NUT server is running in host 192.168.0.2 and my Home Assistant LXC container is in 192.168.0.22. My Ubiquiti EdgeRouter (192.168.0.1) is able to see the status of my UPS (CyberPower AVRG750LCD; alias named “AVRG750LCD” with no quotes). I am running Home Assistant 0.74. I could share my configuration, however I do wish to keep my username and password private. The host (192.168.0.2) and port (3439) is correct.

No changes were made to a NUT server today. What can I do to resolve the problem?

I solved a problem with the “unknown” state by adding this to crontab as root (sudo crontab -e):

*/15 * * * * killall usbhid-ups; sleep 1; systemctl restart nut-server

Why would I do that? Because if I don’t stop the usbhid-ups process but instead restart the nut-server, Home Assistant will still show unknown, so I stopped the usbhid-ups process first before I restart nut-server.