Thanks @Domsrx06
I have added a new decoder for the NodOn NIU buttons, and this is what it is publishing for your sample messages. So the clicks all look fine, the battery level also makes sense, and I hope you tested it with a Lagoon coloured NIU button
“servicedata”: “02599c37d90287a521520006635ab801” 1 short click
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"short click","color":"Lagoon","batt":99}
“servicedata”: “02599c37d90287a52152000663ee4b02” 1 double click
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"double click","color":"Lagoon","batt":99}
“servicedata”: “02599c37d90287a52152000660259003” 1 long press
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"long press","color":"Lagoon","batt":96}
“servicedata”: “02599c37d90287a521520006622b8104” button release
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"button release","color":"Lagoon","batt":98}
i also receive this which i am not able to associate to an action
“servicedata”: “02599c37d90287a5215200065f000004”
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"button release","color":"Lagoon","batt":95}
“servicedata”: “02599c37d90287a5215200065f95da03”
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"long press","color":"Lagoon","batt":95}
“servicedata”: “02599c37d90287a5215200065f4f2402”
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"double click","color":"Lagoon","batt":95}
“servicedata”: “02599c37d90287a521520006604e1201”
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"short click","color":"Lagoon","batt":96}
“servicedata”: “02599c37d90287a521520006625eb901”
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":"short click","color":"Lagoon","batt":98}
The button click options you haven’t tested are the triple, quadruple and quintuple click
This decoder will then be released with a next update of Theengs Decoder and Theengs Gateway, with the latter then also having the possibility to set the ble_time_between_scans to a decimal, which should be set to 0.1 to catch any and all button clicks.
One thing I couldn’t find though is the battery type which goes into the NIU buttons. Can you tell me what kind it is, possibly a CR2032?
Let me know what you think about the above results.
Thanks
ADDENDUM: We have decided to change the button press publishing as integers, and unified the results with the Shelly button, so that all current and future buttons will have the same result integer for easy and consistent integration in any controller:
- 1 - Short click
- 2 - Double click
- 3 - Triple click
- 4 - Quadruple click
- 5 - Quintuple click
- 6-8 - n click
- 9 - Long press
- 10 - Button release
e.g.
{"brand":"NodOn","model":"NIU smart button","model_id":"NodOnNIU","type":"BTN","acts":true,"cont":true,"track":true,"button":2,"color":"Lagoon","batt":99}