UPS APC Smart Ups 3000 i Aplikacja NUT (d. Dodatek NUT)

To może by nie zakładać nowego tematu.
Mój UPS to APC Smart Ups 3000. Podłączony przez adapter serial-USB do HAOS.
W HA zainstalowany NUT

driver: snmp-ups

adapter wykrywa się tak:
Bus 002 Device 003: ID 067b:2303 Prolific Technology Inc. USB-Serial Controller
Port USB:
ls/dev ➜ ttyUSB0
niestety log z NUT:

Created directory: /var/lib/snmp/cert_indexes

[APC-SU3000] nut_snmp_init: snmp_open: Unknown host (/dev/ttyUSB0) (Connection refused)

Unable to establish communication

Kabelek RS oryginalny od UPSa działał mi kiedyś z serwerem na Debianie ale bez przejściówki USB.
Może komuś działa na takiej kombinacji?

edit: chyba jednak driver: snmp-ups nie zadziała szukam dalej.

Próbujesz użyć sterownika SNMP, który służy do komunikacji przez sieć (Ethernet), do obsługi fizycznego połączenia szeregowego (USB-Serial).

Sterownik snmp-ups oczekuje adresu IP, a nie ścieżki do urządzenia /dev/ttyUSB0. Ponieważ podłączyłeś swój UPS przez adapter Prolific (serial), musisz użyć sterownika dedykowanego dla protokołu APC Smart np. apcsmart, coś w ten deseń spróbuj

devices:
  - name: apc
    driver: apcsmart
    port: /dev/ttyUSB0
1 polubienie

Dzięki sugerowałem się linkiem z opisem tego upsa ale doczytałem, że to sterownik do karty sieciowej.
Z apcsmart jest postęp:

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
[19:59:57] 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
[19:59:58] INFO: Setting mode to netserver...
[19:59:58] INFO: Generating /etc/nut/upsd.users...
[19:59:58] INFO: Configuring user: Wojtek
[19:59:58] INFO: Password is NOT in the Have I Been Pwned database! Nice!
[19:59:59] INFO: Configuring Device named APC-SU3000...
[19:59:59] INFO: Starting the UPS drivers...
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/apcsmart-APC-SU3000
Network UPS Tools - UPS driver controller 2.8.1
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
[20:00:07] INFO: Starting the UPS information server...
   0.000002	fopen /run/nut/upsd.pid: No such file or directory
   0.000037	Could not find PID file '/run/nut/upsd.pid' to see if previous upsd instance is already running!
   0.000460	[D1] debug level is '1'
   0.000599	listening on 0.0.0.0 port 3493
   0.000782	[D1] Succeeded to become_user(root): now UID=0 GID=0
   0.000828	[D1] chdired into statepath /run/nut for driver sockets
   0.001015	Connected to UPS [APC-SU3000]: apcsmart-APC-SU3000
   0.001066	Found 1 UPS defined in ups.conf
   0.002391	Running as foreground process, not saving a PID file
   0.002440	upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
   0.002473	upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   0.002507	upsnotify: logged the systemd watchdog situation once, will not spam more about it
[20:00:07] INFO: Starting the UPS monitor and shutdown controller...
   0.000003	fopen /run/nut/upsmon.pid: No such file or directory
   0.000060	Could not find PID file to see if previous upsmon instance is already running!
   0.000632	Using power down flag file /etc/killpower
   0.000961	UPS: APC-SU3000@localhost (primary) (power value 1)
   0.001035	[D1] debug level is '1'
   0.001144	Warning: running as one big root process by request (upsmon -p)
   0.001377	[D1] Saving PID 325 into /run/nut/upsmon.pid
Init SSL without certificate database
   0.008670	upsnotify: notify about state 2 with libsystemd: was requested, but not running as a service unit now, will not spam more about it
   0.008733	upsnotify: failed to notify about state 2: no notification tech defined, will not spam more about it
   0.008751	upsnotify: logged the systemd watchdog situation once, will not spam more about it
   0.008767	[D1] Trying to connect to UPS [APC-SU3000@localhost]
   0.535912	User upsmonmaster@127.0.0.1 logged into UPS [APC-SU3000]
   0.011275	[D1] Logged into UPS APC-SU3000@localhost

Rozumiem, że mam mieć Mode: netserver?
Dodaje integrację NUT i konfiguruję użytkownika,hasło i powinienem zobaczyć dane z UPSa a niestety wyskakuje błąd logowania:
Błąd połączenia: [Errno 111] Connect call failed ('192.168.1.253', 3493)

Przeoczyłem

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

więc chyba jednak nie hula

Skoro uruchamiasz Dodatek/Aplikację (czyli w postaci dedykowanego kontenera dla HAOS) NUT jako serwer NUT (który ma fizyczne połączenie z UPS), to ma być skonfigurowany jako serwer…

Klient, którym jest integracja łączy się z nim po sieci (wewnętrznej sieci Dockera lub dowolnej innej, która lata na tym localhost, ba możesz w Integracji użyć jako adresu wprost localhost).

Pokaż (czyli wklej jako kod, a nie obrazek…) swoją konfigurację w trybie YAML
Hasło ma być “nie do złamania”, czyli takie które przechodzi sprawdzenie

Kluczowe jest też uruchomienie dostępu do portu 3493 Dodatku/Aplikacji

Dzięki za pomoc.
Działa.
Configure the network ports that this app uses.
Sądziłem, że port domyślny uruchamia się automagicznie a tam konfiguruję swój gdybym chciał go zmienić.