Network UPS binding - fate of this OH1 binding?

I just purchased a APC UPS. I made sure to get one that had a data cable and was capable of being monitored and controlled with NUT.
Went to load up the binding and saw it was an OpenHAB1 binding. I know I’ve heard Rich state he uses it and I am wondering what is to be the fate of this useful binding when OH1 support ends?

Also any help getting the binding set up would be most welcome, I’ve never set up an OH1 binding. I need to create a .cfg file? and items files. Off to search the forum thanks andy

oh and sorry… dedicated pc w/ i3 8Gbs & spinny 1Tb h/d running Debian9

update:
here is my items file (its in the same file with OH2 items. OK?)

String UPS_Status "UPS status [%s]" <none>  (ghome) {networkupstools="ups:ups.status"}
Number UPS_Voltage "UPS Voltage [%.1f V]"   <none>  (ghome) {networkupstools="ups:output.voltage"}

everything look OK? I plugged the data cable into the host and restarted the bundle. Anything else?

1 Like

I do use this binding and its one of the last 1.x bindings I have left.

The status is pretty straight forward. Unless and until someone volunteers to rewrite the binding as a2.x version binding it’s days are numbered. But all is not completely lost.

Should the OH 1.x compatibility layer be removed in oh 3, the stated goal is to have a way to federate an older OH instance that runs the 1.x version bindings with OH 3. Think of it kind of like a zigbee2mqtt for OH 1.x bindings. There will be something separate we need to run but using mqtt or something else we will still be able to use the data and activate them from OH 3.

But even if that isn’t an option, this binding is super basic. If you install the NUT client or server on the same machine as OH, which you should anyway, then it’s a simple call with the Exec binding and some simple regex transforms to get the data back into OH.

Well, you need to install the and configure the NUT server software.

Then you need to configure the binding by populating networkupstool.cfg.

# Refresh interval for state updates in milliseconds (optional)
#refresh=60000

# UPS device name
ups1.device=ups

# UPS server hostname (optional)
ups1.host=host.where.nut.server.runs

# UPS server port (optional)
#ups1.port=3493

# UPS server login (optional)
ups1.login=userSetUpOnNUTServer

# UPS server pass (optional)
ups1.pass=passwordSetUpOnNUTServer

If you run upsc user@server where user is the NUT user and host is where the NUT server is running. This will show all the available pieces of info. If you put ups:parameter where parameter is exactly the part of any line of the output up to the : then the Item will be set to that value.

You can define Items bound to any 1.x binding or linked to any 2 x Channel in the same .items file.

1 Like

Well,that isn’t to good but being an old school sys admin from way back, I’m familiar with NUT and figured I could hack something if the binding dies. Thanks for config tips Rich