Hi Everyone. Long time lurker, first time poster.
After a power failure while I was away from home today, I decided to take a look into what is available for monitoring power information on the main UPS that runs my home network. I’m already running NUT (Network UPS Tools) on a Linux server connected to the UPS, and I found someone had already written a DHT for NUT that uses a simple CGI proxy to get UPS values from the NUT command/response server.
Getting all of that setup and installed worked fine, although things needed some minor tweaks. Where my problem comes in is that I decided I wanted to add another tile to the details view for the UPS that would show estimated remaining runtime. It’s my hope that eventually I can get an alert when the estimated runtime is low.
I’ve added a new attribute for my tile:
attribute "remainingTime", "number"
…and the valueTile itself:
valueTile( "remainingTime", "device.remainingTime", decoration: "flat" )
{
state "default", label : '${currentValue} minutes'
}
…which is also added to the ‘details’ list:
details( "battery", "power", "voltage", "powerSource", "remainingTime" )
…and I’m sending an event after parsing the details:
private _sendEstRuntime( estRuntime )
{
// log.info "_sendEstRuntime(${estRuntime})"
def map = [
name : "remainingTime",
value : estRuntime,
descriptionText : device.displayName + " estimated runtime is ${estRuntime} minutes"
]
sendEvent( map )
}
The event seems to get thrown just fine, as in the web UI I can see the following:
But the tile just won’t show in the new app at all. I’ve published the new DHT, I’ve removed the device and re-installed it, have restarted the iOS app, tried it on another device – nothing.
The kicker is that it shows up just fine in the simulator, and is populated with the correct data. I’ve dug through the documentation and have searched the forums, but so far nothing has helped. There are no exceptions in the logs.
Any ideas? TIA!