Page 1 of 1
batteryLevel gone?
Posted:
Tue Aug 11, 2015 5:39 pm
by jay (support)
I just had to replace the batteries in my outside OS temp sensor, and of course had to change the ID in the device config dialog. I noticed that since doing that, the "batteryLevel" state that used to be there is now gone. Using 1.6.3 - is there a newer version that I missed that had added it back?
Re: batteryLevel gone?
Posted:
Wed Aug 12, 2015 9:35 am
by jay (support)
Never mind - just figured out that it is still there, just not showing in the client UI's Custom States tile - we don't show it because it's what we use to represent the batteryLevel property of a device. A custom device that uses batteryLevel needs to set the SupportsBatteryLevel property on a device.
Next question: what is the range for batteryLevel on Oregon Scientific temp sensors? I replaced batteries yesterday when it showed 10 (and was clearly not working). It's now showing 10 again with new batteries, so I'm a bit confused...
Re: batteryLevel gone?
Posted:
Wed Aug 12, 2015 9:59 am
by lochnesz
Hi Jay,
AFAIK the Oregon sensors use one bit as a "battery low" bit, and that would be the only battery information available. (The same bit should trigger the battery icon in the sensor itself.) In RFXtrx I believe that 10 is when the bit is unset and 1 is when it is set. Those are the only values in RFXtrx for battery level (not so useful as one would like).
I have also seen that it never sets the bit to 1 before the sensor shuts down...
I could be wrong, but this is how I remember it from when I did some research about this some time ago and also posted in this forum, but I can't find my post now for some reason...
Peter
Re: batteryLevel gone?
Posted:
Wed Aug 12, 2015 10:14 am
by lochnesz
Re: batteryLevel gone?
Posted:
Thu Dec 10, 2015 5:21 pm
by RJdeKok
Hi Jay,
Can you explain me how the 'SupportsBatteryLevel' work and what the idea is?
I know I'm lazy and don't have the patience to try to find it. Sorry!
Thanks, Robert.
Re: batteryLevel gone?
Posted:
Thu Dec 10, 2015 6:19 pm
by matt (support)
Hi Robert,
Take a look
at this forum thread. I think it will get you started. Basically, once you device that property Indigo will automatically add the battery level state, which your plugin can then update for devices it owns.