Hi,
I've set up NUT to feed into a couple of virtual devices in HS representing current status, battery charge, load etc. This seems to work nice so far, but there's one issue I still haven't managed to overcome:
I'm using a line like this to push the current load of a UPS into HS
This results in a log entry like this:
Unfortunately the device doesn't show any change at all. The device is not configured "Status Only" and has one value range from 0-100, which is set to "Both", allowing control & status. I have to use another JSON line to make the device pick up the change:
When I do this the device looks all right, displaying the value I want. Only "Last Change" is never updated and events on value change don't trigger. To be clear: right now I'm using both commands, ControlDeviceByValue first, then SetDeviceProperty.
A script command like these (which is supposed to do the exact same thing) works fine (set device value and trigger event):
Any idea what I'm doing wrong?
Cheers,
Alex
I've set up NUT to feed into a couple of virtual devices in HS representing current status, battery charge, load etc. This seems to work nice so far, but there's one issue I still haven't managed to overcome:
I'm using a line like this to push the current load of a UPS into HS
Code:
response=$(curl "http://192.168.123.209:8080/JSON?request=controldevicebyvalue&ref=1909&value=${batterycharge}")
Code:
Jun-26 15:40:03 Device Control Device: Monitoring vUPS UPS Load to 27 @S@ (27) by/from: CAPI Control Handler
Code:
response=$(curl "http://192.168.123.209:8080/JSON?request=setdeviceproperty&property=NewDevValue&ref=1909&value=${batterycharge}")
A script command like these (which is supposed to do the exact same thing) works fine (set device value and trigger event):
Code:
hs.SetDeviceValueByRef(1909, 27, True)
Cheers,
Alex
Comment