batteryLevel gone?

Posted on
Tue Aug 11, 2015 5:39 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

batteryLevel gone?

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?

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Aug 12, 2015 9:35 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: batteryLevel gone?

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...

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Aug 12, 2015 9:59 am
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: batteryLevel gone?

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

Posted on
Wed Aug 12, 2015 10:14 am
lochnesz offline
Posts: 366
Joined: Oct 01, 2014
Location: Stockholm, Sweden

Re: batteryLevel gone?

This document might shed some light on the protocol.

http://wmrx00.sourceforge.net/Arduino/OregonScientific-RF-Protocols.pdf


Peter

Posted on
Thu Dec 10, 2015 5:21 pm
RJdeKok offline
Posts: 125
Joined: Mar 27, 2012

Re: batteryLevel gone?

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.

Posted on
Thu Dec 10, 2015 6:19 pm
matt (support) offline
Site Admin
User avatar
Posts: 21411
Joined: Jan 27, 2003
Location: Texas

Re: batteryLevel gone?

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.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests

cron