I know this is old but I wanted to throw my own “bash-my-head-against-the-wall” experience.
I followed all of the info I could find from here first (before I found this thread):
(NOTE: you will get an error after you install the “nut” package when the service starts because there is no config yet. Just ignore it and continue on with editing the config files.)
then when I finally ran the “upsc myups” command to test it all out I kept getting a “network unreachable” error.
I then came upon this thread and edited the config files as described above (thanks @jdm12989!).
But I still got the same error and I wasn’t able to reach it via HA when setting up the integration in the HA UI either.
Then after googling the error I found this website (in Russian so you’ll need to translate) that said that they needed to restart the nut service:
By running (may need sudo, I did):
service nut-server restart
After I did that and then checked the nut service status:
service nut-server status
The result was that the service was running fine.
Then I was able to enter in the info on the integration UI (using “localhost”) and everything worked. Yay!