I'm trying to better understand this sensor before using it anywhere important.
Currently the device is sitting on a shelf, open (i.e. no magnet nearby) and about 10 feet from my Hub.
My first concern is the absence of switch status. If my communications were marginal I suspect the contact could change state and be missed by the Hub. I would never be notified.
My second question: in the logs, the battery is shown every 30 minutes. The part I don't understand is the "isStateChanged:true" attribute when nothing has changed.
Is there some basic concept I am missing?
Thanks
John
AqaraContact(test): Creating event [name:battery, value:100, unit:%, isStateChange:true, descriptionText:Battery level 152 is 100% (3.015 Volts)]
BTW the "152" was added to the text description in the driver to be sure I know which line was creating the report.
Switch status? Why would this device has a switch status? It's a contact sensor so it won't have the switch capability.
That is a parameter. "contact" and "battery" are attributes of the device/driver. isStateChange is a parameter of the event.
Typically, for battery events, i don't believe you want to have the isStateChange: true for the event. With that you will get an event every time a battery report is sent from the device rather than just when the value changes.
Since this is not a built-in driver, it's up to the developer to decide how the device will be implemented. With logging turned on, you will see an entry in the logs whenever you receive information from the device but debug logging will turn out after 30 minutes.
I'm not a developer, but from a user standpoint, your logs look normal.
Your battery reports are being received at the 50 min interval, like I see on all 12 of mine, indicating good communications. The open/close status is only broadcast when it changes, not with the battery report. I think the "isStateChanged:true" comes from the fact that the lastCheckin time (attribute) changes with each battery report.
Don't you mean "...... you are probably mixing contact with switch. In Z-wave jargon they are different but I understand that you mean contact when you said switch..."