Funny issue with that button-1
I did a little bit of testing now. Lets get to the data first, then my observations and last my speculations and questions ![]()
DATA
The collected data was once again posted to pastebin.com, as I’m still not allowed to post that much data right here. The pastes do not expire and do not need a password, so should be fine.
The of the binding I used were 2.5.11.202011291921 (referenced as ‘old’ or Nov 29) and 2.5.11.202012041416 (referenced as ‘new’ or Dec 04).
Comments on the data are inline.
Overview: Overview - Pastebin.com
Trace, old version, dups: Trace / with dup events - Pastebin.com
Trace, new version, no dups?: Trace, new version - Pastebin.com
Observations
That was fun. With the old version of the binding I always got the events two times if the button goes to sleep in between. If it is still awake only once. After upgrading to the new version things got a little bit strange. I sometimes saw duplications after the device was discovered but I was not able to catch that in a Trace. Other times the first press after discovery was not shown at all (only updates, no event).
After those initial hurdles it worked fine. One press → One event. I captured one of those series as a trace. No dups seen, but the initial keypress was missed. In the log you see the change from UNKNOWN to ONLINE. That was initiated by a keypress.
Sidenote: I do not see duplicate events on MQTT. But I do see the event-counter resetting:
12/07/2020 8:57:26 PM {“event”:“S”,“event_cnt”:1}
// Sleep
12/07/2020 8:57:56 PM {“event”:“S”,“event_cnt”:1}
12/07/2020 8:57:58 PM {“event”:“S”,“event_cnt”:2}
As expected button events for other devices (for example one of my SHSW-1) do work with the old version, but not the new one. For that reason I downgraded to the November version for the moment and will try to filter out the dup events by rules ![]()
Speculations
I have no proof for it but I suspect the strange behavior after initial discovery to also happen if the thing got into the UNKNOWN or OFFLINE state again. This happens with those buttons if not used for a longer while. That would explain why I was under the impression (yesterday) that your fix was not working.
Questions
Not sure if I really understood the problem (still trying to figure out your code; I’m not that much of a Java guy). You said that the serial is increased whenever there was a change to a ‘state’. So basically: First press → Serial 1 / Just a status update → Still serial 1 / Another press → Serial 2. It returns to serial 1 when sleeping.
So basically everthing sent by the Button-1 has serial 1, because it usually got to sleep in between? And sometimes it sends events more than once, right? In that case there is something seriously broken with that firmware ![]()
Completely different topic: You are aware that the 1L implementation is still lacking the second switch channel, right? ![]()
And the last question: Is there a useful way to catch CoIoT packets for debugging purposes? Haven’t found a tool yet.
Thanks,
Stefan

