Open nugget opened 7 years ago
@nugget Looking at this request has me thinking about my design descision to break complex devices (like FanLinc) into different devices at the Insteon level. I think the best way to accomplish this type of monitoring is to introduce a sensor to any battery operated device and allow that to publish it's status. However this would (if I put a HA hat on) look like a separate device. If we did that then everything would be a separate device. I don't think that is a good idea.
Here is my thought. In insteonplm we have multiple states (ie. sensorState, batteryLevel, fanSpeed) But all in one device. In HA we break any state we want to manage/monitor into a separate device. This way the battery level could be a sensor (or binary_sensor) in HA but not require complex coding in insteonplm. Thoughts?
Expose it as a sensor would work. Or it could be like the remotes and be an event upon low battery? (Not sure how Insteon reports the level)
(Relocated from Issue #1) from @rstanley75
Did a little investigation into the OpenHAB binding and I discovered something.
From src/main/resources/device_features.xml:
Then, from src/main/java/org/openhab/binding/insteonplm/internal/device/MessageHandler.java:
It looks like it's sending cmd 2e and then getting the battery level from the User Data 4 byte of the extended-length response.
On page 9 from the dev docs:
I had originally interpreted that little bit on page 9 as returning the level at which the low battery level alert is tripped, but since I get convincingly accurate battery level info from OpenHAB perhaps Data 4 is the actual battery level and Data 7 is actually the level where the alert gets tripped?
Edit: Finally read the docs on Markdown formatting.