Debug NUT (Network UPS Tools) binding

Hello,

I’d like to debug the above mentioned binding. Therefor I changed the logback.xml like this:

After that an additional log entry will be created:
[DEBUG] [b.n.i.NetworkUpsToolsActivator] - NetworkUpsTools binding has been started

Unfortunately no Fürther Information will be logged. Is there any possibilty to get some more information which will be logged?
I tried to change the loglevel to TRACE but that didn’t change anything.

The problem I’m facing is the fact that I don’t get any information from my UPS (APC). The NUT Server is working correctly and is running on the same node as openHAB does.

Maybe someone can post a working configuration (I had a look at the documentation, but it’s not quiet clear how to setup the binding correctly)

Thanks in advance and best regards,

Geolin

There seems to be little to nothing debug/trace info coming from that binding. I was also having some problems configuring it and couldn’t get any error log from it.
Anywho, my problem was a typo between the openhab.cfg and items instance definition, as in the name of the “UPS”, so I would double check that first.

Example from my config:

Items:
Number B1_UpsInputVoltage “Volt in [%.1f Volt]” (gUps) { networkupstools=“bluewalker:input.voltage” }
Number B1_UpsLoad “Load [%d %%]” (gUps) { networkupstools=“bluewalker:ups.load” }
Number B1_UpsBatteryCharge “Charge [%d %%]” (gUps) { networkupstools=“bluewalker:battery.charge” }
Number B1_UpsBatteryVoltage “Battery volt [%.1f Volt]” (gUps) { networkupstools=“bluewalker:battery.voltage” }
Number B1_UpsInputFrequency “Freq in [%.1f Hz]” (gUps) { networkupstools=“bluewalker:input.frequency” }
String B1_UpsStatus “Status [MAP(ups_status.map):%s]” (gUps,gUpsState) { networkupstools=“bluewalker:ups.status” }

Openhab.cfg:
networkupstools:bluewalker.device=bluewalker
networkupstools:bluewalker.host=192.168.1.232
networkupstools:bluewalker.port=3493
networkupstools:bluewalker.login=myUserName
networkupstools:bluewalker.pass=myPassword

You should also check the output of "upsc " command in cli/shell to confirm you can get the correct info from upsd.

I have checked my configuration.

By checking with “upsc ups” I get a valid result. My Synology NAS is correctly connecting to the NUT Server as well.

My openHAB item definition is as follows:
Number Ups_Output_Voltage “UPS output voltage [%.1f V]” (KG_UPS) {networkupstools=“ups:input.voltage”}
String Ups_Status “UPS status [%s]” (KG_UPS) {networkupstools=“ups:ups.status”}

and openhab.cfg:

networkupstools:ups:refresh=60000
networkupstools:ups.device=ups
networkupstools:ups.host=localhost
networkupstools:ups.port=3493
networkupstools:ups.login=someuser
networkupstools:ups.pass=somepassword

Form my point of view nothing seems to be wrong. Maybe the binding has a problem with the device name “ups”?

Thanks for your help,
Geolin

Finally I found what was causing the problem:

You have to specify a IP address for networkupstools:ups.host=someIPAdress

My “localhost” config does not work.

Maybe someone can tell me how to open a bug for the NUT binding because I thínk the “localhost” entry should work.

Thanks,
Geolin