Please post your upsc output.
ok so upsc outputā¦
upsc ups@localhost
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 20
battery.runtime: 3320
device.mfr: EATON
device.model: 5S 1000
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: MGE HID 1.39
driver.version.internal: 0.41
input.frequency: 50.5
input.voltage: 240.0
input.voltage.extended: no
outlet.1.desc: PowerShare Outlet 1
outlet.1.id: 2
outlet.1.status: on
outlet.desc: Main Outlet
outlet.id: 1
output.frequency: 50.0
output.voltage: 230.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 01.02.0011
ups.load: 0
ups.mfr: EATON
ups.model: 5S 1000
ups.power: 0
ups.power.nominal: 1000
ups.productid: ffff
ups.realpower: 0
ups.status: OL
ups.timer.shutdown: -1
ups.vendorid: 0463
Just to rule out anything with the UPS/driver I have a NUT server with a different UPS, so I pointed it at the IP instead of localhost. Same result, again the upsc can see the UPS and gets a good output. What can I try next?
add the following as the very first line in your networkupstools.cfg
pid:org.openhab.networkupstools
Awesome, that worked straight away! Thanks for your input.
On OpenHAB 2.4 on raspberry pi v3 the binding works correctly
The error that I reported was due to a spelling error: the binding works correctly.
Thanks to Rossko57 for pointing it out.
Begin of outdated message
On OpenHAB 2.4 on raspberry pi v3 the Number Items are not working
I revive this topic as I found that in OpenHAB 2.4 the binding only returns string items and not number items as described in the docs. I tried to increase the log level of this binding to TRACE but I found nothing.
I have installed NUT on my raspberry and properly configured. The output of the upsc command is behaving correctly.
These are the items, that I wrote based on the docs
String UPS_State "UPS Status [%s]" <battery> { networkupstools="ups1:ups.status" }
Number Ups_Runtime "Battery Runtime [%d]" <time> { networkupstool="ups1:battery.runtime", expire="2m" }
The String items gets regularly updated, while the number item does not.
If I change the second item to string, as follows, the items gets regularly updated
String Ups_Runtime "Battery Runtime [%d]" <time> (gUPSConvert) { networkupstool="ups1:battery.runtime", expire="2m" }
I therefore implemented a rule that convert the string item to a number item by using groups as suggested by a Design Pattern (many thanks to rlkoshak!)
String nUps_Runtime "Battery Runtime [%d]" <time> (gUPSnum){ networkupstool="ups1:battery.runtime", expire="2m" }
rule "UPS Convert"
when
Member of gUPSConvert changed
then
val itm=triggeringItem // oggetto predefinito
val NumItem = gUPSnum.members.findFirst[i | i.name == "n"+itm.name]
val result=Float::parseFloat( itm.state.toString)
NumItem.postUpdate( result )
end
Is this a bug of the binding? Or is it something concerning my installation? Is there a more concise way to perform such a conversion?
Thank you for your attention
LionHe
Itās not just a bit of confusion creeping in because of typos, is it? ( networkupstools )