UPS 850 micro (Volt Polska) - NUT (HAOS 17) na RPi4

,

Dzień dobry, próbuje podłączyć UPS 850 micro (Volt Polska) przez NUT do HA. Mój konfig (tylko na tym “łączy” się z NUT:

users:
  - username: nut
    password: *************
    instcmds:
      - all
    actions:
      - set
devices:
  - name: ups850micro
    driver: usbhid-ups
    port: auto
    config:
      - vendorid=ffff
      - productid=0000
      - explore
mode: netserver
shutdown_host: true

otrzymuję wówczas log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.17.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 17.0  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2026.2.1
 Home Assistant Supervisor: 2026.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[14:01:41] INFO: Configuring timezone (Europe/Warsaw)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[14:01:43] INFO: Setting mode to netserver...
[14:01:43] INFO: Generating /etc/nut/upsd.users...
[14:01:43] INFO: Configuring user: nut
[14:01:43] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[14:01:44] INFO: Configuring Device named ups850micro...
[14:01:44] INFO: Starting the UPS drivers...
Using subdriver: EXPLORE HID 0.2
Network UPS Tools - Generic HID driver 0.52 (2.8.1)
USB communication driver (libusb 1.0) 0.46
WARNING: Needed to fix group access to filesystem socket of this driver, but failed; run the driver with more debugging to see how exactly.
Consumers of the socket, such as upsd data server, can fail to interact with the driver and represent the device: /run/nut/usbhid-ups-ups850micro
Network UPS Tools - UPS driver controller 2.8.1
[14:01:45] WARNING: UPS Shutdown will shutdown the host
cont-init: info: /etc/cont-init.d/nut.sh exited 0
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun upsd (no readiness notification)
services-up: info: copying legacy longrun upsmon (no readiness notification)
s6-rc: info: service legacy-services successfully started
[14:01:45] INFO: Starting the UPS information server...
   0.000000	fopen /run/nut/upsd.pid: No such file or directory
   0.000058	Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!
   0.000869	[D1] debug level is '1'
   0.001215	listening on 0.0.0.0 port 3493
   0.001595	[D1] Succeeded to become_user(root): now UID=0 GID=0
   0.001713	[D1] chdired into statepath /run/nut for driver sockets
   0.002099	Connected to UPS [ups850micro]: usbhid-ups-ups850micro
   0.002236	Found 1 UPS defined in ups.conf
   0.004417	Running as foreground process, not saving a PID file
   0.004567	upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
   0.004654	upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   0.004706	upsnotify: logged the systemd watchdog situation once, will not spam more about it
[14:01:45] INFO: Starting the UPS monitor and shutdown controller...
   0.000000	fopen /run/nut/upsmon.pid: No such file or directory
   0.000054	Could not find PID file to see if previous upsmon instance is already running!
   0.000536	Using power down flag file /etc/killpower
   0.000852	UPS: ups850micro@localhost (primary) (power value 1)
   0.000929	[D1] debug level is '1'
   0.001045	Warning: running as one big root process by request (upsmon -p)
   0.001264	[D1] Saving PID 322 into /run/nut/upsmon.pid
Init SSL without certificate database
   0.008467	upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
   0.008511	upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   0.008519	upsnotify: logged the systemd watchdog situation once, will not spam more about it
   0.008528	[D1] Trying to connect to UPS [ups850micro@localhost]
   0.543615	User upsmonmaster@127.0.0.1 logged into UPS [ups850micro]
   0.011140	[D1] Logged into UPS ups850micro@localhost
{"message":"Event nut.ups_event fired."}Network UPS Tools upsmon 2.8.1

Mam tylko dwie encje: “Dane stanu” i “Stan”, z wartościami odpowiednio: “OB” i “On Battery” (z zasilaniem UPS 230V lub odłączonego od zasilania). Jak naprawić ten stan?

A czy mógłbyś podać wynik komendy lsusb

Modele Volt Polska Micro 850 występowały w dwóch wersjach sprzętowych:

  1. Starsza/Tańsza: Wymaga sterownika blazer_usb (protokół Megatec/Q1).
  2. Nowsza: Współpracuje z usbhid-ups, ale wymaga specyficznych flag (tzw. pollinterval lub desc), ponieważ bez nich zawiesza komunikację i zostaje na ostatnim odczytanym stanie (w Twoim przypadku “On Battery”).

Próbowałeś inne sterowniki niż usbhid-ups?

Na moje oko jakieś nadzieje daje blazer_usb
(raczej niczego innego niż ten lub obecny się nie spodziewam, że mogłoby pasować)

➜  ~ lsusb                     
Bus 002 Device 002: ID 152d:0562 USB3.0  Super Speed USB3.0  Super Speed
Bus 001 Device 001: ID 1d6b:0002 Linux 6.12.47-haos-raspi xhci-hcd xHCI Host Controller
Bus 001 Device 003: ID ffff:0000 
Bus 001 Device 002: ID 2109:3431 USB2.0 Hub
Bus 002 Device 003: ID 7825:a2a4 JMS578-A Best USB Device
Bus 002 Device 001: ID 1d6b:0003 Linux 6.12.47-haos-raspi xhci-hcd xHCI Host Controller
Bus 001 Device 004: ID 346d:5678 USB Disk 2.0

przy:

devices:
  - name: ups850micro
    driver: blazer_usb
    port: auto
    config:
      - vendorid=ffff
      - productid=0000

mam

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.17.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 17.0  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2026.2.1
 Home Assistant Supervisor: 2026.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[14:16:13] INFO: Configuring timezone (Europe/Warsaw)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[14:16:15] INFO: Setting mode to netserver...
[14:16:15] INFO: Generating /etc/nut/upsd.users...
[14:16:15] INFO: Configuring user: nut
[14:16:16] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[14:16:16] INFO: Configuring Device named ups850micro...
[14:16:16] INFO: Starting the UPS drivers...
Please note that this driver is deprecated and will not receive
new development. If it works for managing your devices - fine,
but if you are running it to try setting up a new device, please
consider the newer nutdrv_qx instead, which should handle all 'Qx'
protocol variants for NUT. (Please also report if your device works
with this driver, but nutdrv_qx would not actually support it with
any subdriver!)
No supported UPS detected
upsnotify: notify about state 4 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it
Network UPS Tools - Megatec/Q1 protocol USB driver 0.17 (2.8.1)
Driver failed to start (exit status=1)
Network UPS Tools - UPS driver controller 2.8.1
cont-init: info: /etc/cont-init.d/nut.sh exited 1
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
cont-init: warning: some scripts exited nonzero
s6-rc: warning: unable to start service legacy-cont-init: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-timezone: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-timezone successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

a przy

devices:
  - name: ups850micro
    driver: blazer_usb
    port: auto
    config:
      - vendorid=ffff
      - productid=0000
      - explore

mam

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service base-addon-banner: starting
-----------------------------------------------------------
 Add-on: Network UPS Tools
 Manage battery backup (UPS) devices
-----------------------------------------------------------
 Add-on version: 0.17.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 17.0  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2026.2.1
 Home Assistant Supervisor: 2026.01.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[14:20:26] INFO: Configuring timezone (Europe/Warsaw)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/nut.sh
[14:20:27] INFO: Setting mode to netserver...
[14:20:27] INFO: Generating /etc/nut/upsd.users...
[14:20:27] INFO: Configuring user: nut
[14:20:28] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[14:20:28] INFO: Configuring Device named ups850micro...
[14:20:28] INFO: Starting the UPS drivers...
upsnotify: notify about state 4 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it
Network UPS Tools - Megatec/Q1 protocol USB driver 0.17 (2.8.1)
Fatal error: 'explore' is not a valid flag for this driver.
Look in the man page or call this driver with -h for a list of
valid variable names and flags.
Network UPS Tools - UPS driver controller 2.8.1
[14:20:28] WARNING: UPS Shutdown will shutdown the host
cont-init: info: /etc/cont-init.d/nut.sh exited 0
cont-init: info: running /etc/cont-init.d/nutclient.sh
cont-init: info: /etc/cont-init.d/nutclient.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun upsd (no readiness notification)
services-up: info: copying legacy longrun upsmon (no readiness notification)
s6-rc: info: service legacy-services successfully started
[14:20:29] INFO: Starting the UPS information server...
   0.000000	fopen /run/nut/upsd.pid: No such file or directory
   0.000051	Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!
   0.001004	[D1] debug level is '1'
   0.001439	listening on 0.0.0.0 port 3493
   0.001997	[D1] Succeeded to become_user(root): now UID=0 GID=0
   0.002099	[D1] chdired into statepath /run/nut for driver sockets
   0.002610	Can't connect to UPS [ups850micro] (blazer_usb-ups850micro): No such file or directory
   0.002777	Found 1 UPS defined in ups.conf
   0.005173	Running as foreground process, not saving a PID file
   0.005340	upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
   0.005429	upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   0.005486	upsnotify: logged the systemd watchdog situation once, will not spam more about it
   0.005541	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.005636	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.025157	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.025354	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.025637	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.025791	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.025895	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.025990	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
[14:20:29] INFO: Starting the UPS monitor and shutdown controller...
   0.000000	fopen /run/nut/upsmon.pid: No such file or directory
   0.000049	Could not find PID file to see if previous upsmon instance is already running!
   0.002206	Using power down flag file /etc/killpower
   0.002551	UPS: ups850micro@localhost (primary) (power value 1)
   0.002614	[D1] debug level is '1'
   0.002731	Warning: running as one big root process by request (upsmon -p)
   0.006195	[D1] Saving PID 319 into /run/nut/upsmon.pid
Init SSL without certificate database
   0.021485	upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
   0.021532	upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   0.021541	upsnotify: logged the systemd watchdog situation once, will not spam more about it
   0.021550	[D1] Trying to connect to UPS [ups850micro@localhost]
   0.102353	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.102581	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.102835	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.102976	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.103135	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.103264	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.104386	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.104907	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.105740	User upsmonmaster@127.0.0.1 logged into UPS [ups850micro]
   0.106299	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.030242	[D1] Logged into UPS ups850micro@localhost
   0.107580	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.108331	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.108491	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   0.108647	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   0.032482	Poll UPS [ups850micro@localhost] failed - Driver not connected
   0.108765	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   2.110404	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   2.110834	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
{"message":"Event nut.ups_event fired."}Network UPS Tools upsmon 2.8.1
   4.113974	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   4.114220	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   4.478247	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   4.478620	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   4.480994	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   4.481236	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   4.482384	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   4.482593	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   4.485049	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   4.485258	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   5.110032	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   5.033838	Poll UPS [ups850micro@localhost] failed - Driver not connected
   5.110268	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
{"message":"Event nut.ups_event fired."}Network UPS Tools upsmon 2.8.1
   7.112479	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   7.112852	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
   9.114978	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
   9.115215	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)
  10.111235	[D1] mainloop: UPS [ups850micro] is not currently connected, trying to reconnect
  10.035041	Poll UPS [ups850micro@localhost] failed - Driver not connected
  10.111520	[D1] mainloop: UPS [ups850micro] is still not connected (FD -1)

i cały czas aż do zatrzymania dodatku: UPS [ups850micro] is not currently connected, trying to reconnect

Raczej coś jest nie tak, skoro niby to UPS tak się przedstawia na magistrali.
Bus 001 Device 003: ID ffff:0000

Nic z NUT się nie wskóra, bo na USB jest modbus. Pośrednio wynika to z instrukcji programu do monitoringu tego upsa.
Chyba, że któryś ze sterowników takowy obsługuje.

…ps. to może być jeszcze protokół Voltronic.
To można łatwo sprawdzìć z doqolnego terminala wpisując komendy ręcznie.

2 polubienia

Skoro jest szansa na voltronic to driver nutdrv_qx z odpowiednio wybranym protokołem
https://manpages.ubuntu.com/manpages/jammy/man8/nutdrv_qx.8.html

1 polubienie

Można prosić o podpowiedź jak ? Nie jestem silny w w tym temacie :(.
Wiem co terminal, ale jakie komendy wpisać - czytałem “…man8/nutdrv_qx.8.html”, ale nie za bardzo znalazłem jakich komend mogę użyć aby sprawdzić czy “dogada” się z tym UPS-em)

Chętnie bym Ci pomógl ale ze smartfoma będzie trudno.
Uzyj np. Putty i ustaw polaczenie serial 4800N8,1. Wpisz z kalwiatury zapytanie o status QGS
Network UPS Tools - Voltronic Power UPS Protocol.
Próbuj różne prędkości 2400, 9600 … jeśli to jest właściwy protokól powinienieś otrzymac odpowiedź otwartym tekstem.
To może nie być możliwe bo ups może być rozpoznamy przez system inaczej niż serial (uart). To są spekulacje bo nie mam jak tego sprawdzić. Nie wiem co docelowo chcesz osiągnąć ale ostatecznie może byc to możliwe przez PowerView. Jest na forum mój wpis gdzie robiłem fikołki z moim niepasującym upsem.

Nie rozumiem, dlaczego mam użyć putty, nie mogę użyć terminala w HA? Jeżeli jednak to ma być putty (np. w Windows) to jaki podać adres? IP RPi na którym jest HA i do którego jest podłączony UPS?

Musisz ograniczyć liczbe niewiadomych i chwilowo podłaczyć np. do kompa z widows🙂

Do komputera mam podłączony drugi taki sam, ale ViewPower/View Point go nie widzi (mam zainstalowane delivery do ch340, ale po podłączeniu nie dodaje żadnego portu com)

A dlaczego założyłeś, że masz mieć drivery do CH340?

Sprzęt QinHeng Electronics ma VID 1a86 (np. CH340 z PID 7523 lub 7522)
a tymczasem twój UPS przedstawia się nielegalnym VID ffff z równie mało legalnym PID 0000

Przeoczyłem info, że jednak się łaczy przy usbhid-ups.
Jest tak, że nie każdy ups podaje wszystkie parametry i funkcje przewidziane przez dany protokół a sam NUT nic nie oblicza.
Dostajesz tylko to co przewidział producent.
W Twoim przypadku (przy posiadanej baterii) posiadasz niezbędne informacje aby przy zaniku napięcia natychmiast rozpocząć proces wyłączania maszyn.
Najlepiej w tej sprawie napisz do “producenta”.
Zapoznaj się z:
https://networkupstools.org/docs/man/usbhid-ups.html