I haven openhab 3.4.0 on a windows 10 machine. I am trying to get information from apcupsd. It’s an ups where the information is send to the computer through an USB cable.
As far as I can see there is no binding for that.
The deamon is running. The data are also available in a tekst file.
Can anyone tell me how to get the data from the deamon (apcupsd@:3551 does not work)? Or how I can read the data from the tekst file in to an item or so?
I would love to help as I have an old APC BACK-UPS ES 700 lying around that I have always wanted to integrate with openHAB. The first thing I need to do is find the RJ45 USB cable …
Please identify your UPS (manufacturer, model no.) and describe your setup in more detail.
In the meantime, the following way might be possible (but quite complex and probably overkill):
UPS <-> apcupsd <-> apcups-mqtt <-> MQTT Broker <-> MQTT Binding <-> openHAB
Cable found - it’s really amazing how many cables I own …
Edit #2: apcupsd is up and running on my Windows 10 machine. apcupsd comes with apcaccess:
APC : 001,034,0841
DATE : 2022-12-27 20:18:25 +0100
HOSTNAME : DESKTOP-UQDUKRR
VERSION : 3.14.14 (31 May 2016) mingw
UPSNAME : ES700
CABLE : USB Cable
DRIVER : USB UPS Driver
UPSMODE : Stand Alone
STARTTIME: 2022-12-27 20:07:37 +0100
MODEL : Back-UPS ES 700G
STATUS : ONLINE
LINEV : 230.0 Volts
LOADPCT : 0.0 Percent
BCHARGE : 100.0 Percent
TIMELEFT : 43.8 Minutes
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME : 0 Seconds
SENSE : Medium
LOTRANS : 180.0 Volts
HITRANS : 266.0 Volts
ALARMDEL : 30 Seconds
BATTV : 13.6 Volts
LASTXFER : Automatic or explicit self test
NUMXFERS : 0
TONBATT : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000008
SERIALNO : 5BXXXXXXXXX
BATTDATE : 2011-05-18
NOMINV : 230 Volts
NOMBATTV : 12.0 Volts
FIRMWARE : 871.O2 .I USB FW:O2
END APC : 2022-12-27 20:18:48 +0100
Use the Exec Binding to transfer a specific parameter into an openHAB Thing:
Exec Command: apcaccess -p TIMELEFT
Drawback: only one parameter per Exec Thing (limitation of the Exec Binding).
Going NUTs seems to be the better way.
openhabian@openhabian:~ $ nmap -p3493 192.168.1.178
Starting Nmap 7.80 ( https://nmap.org ) at 2022-12-28 00:13 CET
Nmap scan report for DESKTOP-XXXXXXX (192.168.1.178)
Host is up (0.0027s latency).
PORT STATE SERVICE
3493/tcp closed nut
Nmap done: 1 IP address (1 host up) scanned in 0.17 seconds
Unfortunately, the driver apcupsd-ups is missing from the Windows binaries. So it looks like it is not possible to use apcupsdandNUT (standalone, netserver modes) in parallel on a Windows machine.