I installed NUT into my OMV machine, and have it working and configured as a server.
I have HA as a VM in the OMV machine, I installed the plugin configured it like this:
- username: ha
password: Ha
instcmds:
- all
actions: []
- name: myups
driver: usbhid-ups
port: auto
config: []
mode netclient
remote ups name the same as the one in OMV
remote ups host the IP from the OMV machine
remote ups password password in OMV
remote ups user the same as in OMV
In the network section at the bottom I added the port 3493, the same as OMV.
When I start the addon it throws [D1] Trying to connect to UPS and connect failed: Connection failure: No route to host
When I try in the integration part of HA I get an error and it doesnt connect.
In HA logs I get Failure getting NUT ups alias, Socket error.
Dont really know how to fix this, anyone has any ideas?
Your post is not completely clear, but if you already have a NUT server, you don’t need the addon, which is doing exactly that.
You now just have to configure the integration to point to your server
As a reminder, you have:
Addons: a server software running as a docker container inside a HA OS or HA Supervised installation. E.g Mysql, Duckdns, NUT server, …
Integrations: an HA python component enabling communication between HA and the external world. E.g. Integrations - Home Assistant
Custom component: a non-official integration; Is usually installed through HACS (https://hacs.xyz/)
There is no notion of “plugin” in the HA ecosystem.
Thanks for the answer.
Tried the integration and it throws failed to connect and in logs it shows Failure getting NUT ups alias, Socket error.
Tried also uninstalling the addon as well and its the same error.
Dont really evaen know how to test tao see where the problem is.
Its a netserver on the omv machine and I want it to comunnicate with HA which is in a vm on that same machime.
Please if theres any info I forgot to add please tell me.
I searched how to ping and added to configuration.yaml
binary_sensor:
- platform: ping
host: my nut server ip, no port or anything 192.168.0.xx
scan_interval: 60
Added the sensor to the dashboard and it says disconnected and hasnt changed from that. So likely it cant communicate with the server.
How would I go troubleshooting this?
Did just that, was a lot easier than adding a sensor and more useful.
I cant ping the pc running the vm with ha, it just hangs there waiting, I can ping google though.
I believe so, the ip from both is 192.168.0.xx when checked from ifconfig or ip addr, both appear normally in the router as separate machines. Also the OMV machine is running kvm as the vm thingy, its set to bridge mode
Ok so this was the problem and how I fixed it if anyone has a similar problem.
I didnt have the network interface as bridge, only the vm one and that didnt work.
So followed this guide omv6:omv6_plugins:kvm [omv-extras.org] and after a reboot I had the bridge network interface working.
Went back to the vms, removed old networks and added a bridge network with the new device name.
Waited a couple minutes and HA came back online and could ping with no problem, could also finally add the nut integration to HA, just have to find out how to create a new sensor that calculates power usage from the ups with the load% and nominal power.
I solved it by adding the IP to /etc/nut/upsd.conf
…
LISTEN localhost 3493 LISTEN 192.168.0.50 3493 ← I added my ip address
…
Home Assistant OS 2024.3.1 Supervisor in Proxmox VM 8.1.4
How do you do it through the yaml configuration of the addon?
I want it to listen on 0.0.0.0 as I have a remote client on Windows that I also want it connected.
I know I can get into the docker conatiner and make the changes but that will disappear on next update, and I don’t want to play with it on every update.
config:
- LISTEN 0.0.0.0 3493
this seems to make the config changes
0.000429 [D1] debug level is '1'
0.000632 listening on 0.0.0.0 port 3493
however the remote client still cannot connect that’s probably because the container port is not exposed.