Network UPS

Is this binding supported in some way in OH2? Can’t find any info

All OH 1 bindings are theoretically supported in OH 2. If it isn’t listed as officially supported all that means is it hasn’t been tested yet. Give it a try and report back whether it worked or not.

Well almost works

2016-06-09 22:11:41.392 [INFO ] [b.core.service.AbstractActiveService] - NetworkUpsTools Refresh Service has been started
2016-06-09 22:11:41.411 [INFO ] [b.core.service.AbstractActiveService] - NetworkUpsTools Refresh Service has been shut down

All the items get updated and that’s about it. Updates stop

I’ve been using it for some time now and it works for me. I’ve got mine Cyberpower UPS connected via USB to a Synology (Master) and OH2 on a RP3. OH can send commands to the UPS and read the stats.Need to test more but it seems ok so far.

Mine is on another machine.
So still the same it connects. Gets the data. Kills the refresh service for some reason and never restarts it…

Enabling the DEBUG console didn’t reveal anything.

the сfg is like


have you tried to setup the cfg with networkupstools: in front as in OH1?

Just did. Same problem

2016-06-17 22:48:35.937 [INFO ] [b.core.service.AbstractActiveService] - NetworkUpsTools Refresh Service has been started
2016-06-17 22:48:35.944 [INFO ] [b.core.service.AbstractActiveService] - NetworkUpsTools Refresh Service has been shut down

And receives the values only once (see the timestamp)

 2016-06-17 22:48:43.146 [INFO ] [ome.event.GroupItemStateChangedEvent] - g_UPS changed from 232 to 232 through z_ups_voltage
 2016-06-17 22:48:43.148 [INFO ] [marthome.event.ItemStateChangedEvent] - z_ups_voltage changed from NULL to 232
 2016-06-17 22:48:43.159 [INFO ] [ome.event.GroupItemStateChangedEvent] - g_UPS changed from 232 to UNDEF through z_ups_frquency
 2016-06-17 22:48:43.162 [INFO ] [marthome.event.ItemStateChangedEvent] - z_ups_frquency changed from NULL to 50
 2016-06-17 22:48:43.169 [INFO ] [marthome.event.ItemStateChangedEvent] - z_ups_status changed from NULL to OL
 2016-06-17 22:48:43.177 [INFO ] [marthome.event.ItemStateChangedEvent] - z_ups_load changed from NULL to 10
 2016-06-17 22:48:43.184 [INFO ] [marthome.event.ItemStateChangedEvent] - z_ups_charge changed from NULL to 100
 2016-06-17 22:48:43.192 [INFO ] [marthome.event.ItemStateChangedEvent] - z_ups_runtime changed from NULL to 65535

after some fiddling networkupstools works for me using a 1.9.0 snapshot under OH2. I had to add the “networkupstools:” prefix in the config file for the binding to get it to start.

Okkkkkety. Thanks for the head up i really don’t know how i missed that topic. Indeed i had 1.8.3 binding wgetted into the addons dir. But now i have stopped the OH2, removed the file, wgetted the snapshot form your link but it seems not enough to get rid of? Do i need to run OH2 bundle commands as it seems the problem is the same

See the thread that watou linked. Run bundle:list on the openhab console. If you see the 1.8.3. binding listed as active, you need to run bundle:uninstall.

If you’re running openhab as a service, you can run “./client” in the karaf bin directory to open a console. In my install, this lives in “/usr/share/openhab2/runtime/karaf/bin”.


1 Like

Done. Everything is woking now as it should.
Thanks for the help


I have plugged an APC Back UPS Pro 900VA to my Synology DS415+. I would like to use the OpenHAB Network UPS plugin with my UPS.
Is it possible ? What are the parameter values ?

OpenHab has nothing to do with UPS. The network ups binding is just an interface for NUT - network ups tools. So you have to figure them our first.

Has there been a regression in this binding? I’m running a recent snapshot and the refresh service shuts down even with networkupstools: prefix in the config

2017-06-24 10:48:31.873 [INFO ] [b.core.service.AbstractActiveService] - NetworkUpsTools Refresh Service has been started
2017-06-24 10:48:53.119 [INFO ] [b.core.service.AbstractActiveService] - NetworkUpsTools Refresh Service has been shut down

199 | Active | 80 | | openHAB NetworkUpsTools Binding

[edit] scratch that, the real problem is that apcupsd hangs when collecting data from my APC Smart-UPS over Modbus USB. Seems like a common issue, I will try switching to RS232

Anyone using this successfully in 2.x? I have it working in OH1, but cannot get various versions of the plugin working in 2.x (either with or without the prefix).

[ERROR] [org.apache.felix.configadmin        ] - [org.osgi.service.event.EventHandler,, id=338, bundle=218/mvn:org.openhab.binding/org.openhab.binding.networkupstools/1.11.0-SNAPSHOT]: Unexpected problem updating configuration org.openhab.networkupstools
java.lang.ArrayIndexOutOfBoundsException: 1
        at org.openhab.binding.networkupstools.internal.NetworkUpsToolsBinding.updated([218:org.openhab.binding.networkupstools:]

Hi @herbus,
For me, everything works with OH 2.1.0 ! :slight_smile:

I have installed the last stable release of OH2 (version 2.1.0). From PaperUI, I have added the Network UPS Tools Binding (version 1.10.0). I have updated the networkupstools.cfg (conf/services/) file like that:

# Refresh interval for state updates in milliseconds (optional)

# UPS device name

# UPS server hostname (optional)<hostname of my UPS server, ie Synology NAS>

# UPS server port (optional)

# UPS server login (optional)

# UPS server pass (optional)

And my .item file:

String OnduleurAPC900G_Status "Status [%s]" (groupOnduleur) { networkupstools = "ups1:ups.status" }
Number OnduleurAPC900G_Battery_Runtime "Battery runtime [%.1f Sec]" <battery> (groupOnduleur) { networkupstools="ups1:battery.runtime" }
String OnduleurAPC900G_Load "Load [%s]" (groupOnduleur) { networkupstools = "ups1:ups.load" }
String OnduleurAPC900G_Device_Serial "Device serial [%s]" (groupOnduleur) { networkupstools = "ups1:device.serial" }
String OnduleurAPC900G_Device_Model "Model [%s]" (groupOnduleur) { networkupstools = "ups1:ups.model" }

Hey guys,
Has anything changed with the compatibility of this binding? I have set up a new OH2.3 install on Ubuntu. I have configured NUT and get a response back from upsc. I have configured the networkupstools.cfg file and items exactly as above but no luck.
I see some errors in the console but as a newbie I’m not sure what this means and how to debug further. Grateful for any help!

    20:53:27.741 [ERROR] [org.apache.felix.configadmin         ] - [org.osgi.service.event.EventHandler,, id=331, bundle=201/mvn:org.openhab.binding/org.openhab.binding.networkupstools/1.12.0]: Unexpected problem updating configuration org.openhab.networkupstools
    java.lang.ArrayIndexOutOfBoundsException: 1 at org.openhab.binding.networkupstools.internal.NetworkUpsToolsBinding.updated( [201:org.openhab.binding.networkupstools:1.12.0]

No, still running fine on my system.
Did you setup your networkups.cfg correct ?

I believe so…

networkupstools.cfg has minimal config:

# Refresh interval for state updates in milliseconds (optional)

# UPS device name

# UPS server hostname (optional)


Number Ups_Output_Voltage "UPS output voltage [%.1f V]" (Ups) {networkupstools="ups1:output.voltage"}
String Ups_Status "UPS status [%s]" (Ups) {networkupstools="ups1:ups.status"}