Bluetooth Specification questions

Hi Stephan,
that’s correct. However there must be some mechanism for the Smart Lock to signal that the internal state has changed. How does the bridge notice that the Smart Lock locked? The functionality is there via web hooks and I don’t think that the bridge is connected 100% of the time. My guess that it is somewhere hidden in the manufacturer data advertised, as this does change when the lock is engaged, but there is no documentation on that.

Edit: I now found out, that Nuki apparently sends a counter in the manufacturer data on advertisements.
There are two advertisements which are sent continuously. One, which is 25 bytes long and byte 4-20 contain the Nuki Service UUID. The other one (21 bytes) has a 8 bit unsigned integer counter (byte 14) which is incremented each time the door is locked/unlocked. I believe that’s also the way the Nuki Bridge finds out when the state changed, right? Although this works great it would be cool to also signal a change for the door sensor. It should also increase the counter. Although this behaviour already leaks some information (door state changed/someone at home) I recommend to increase the counter randomly throughout the day. The energy impact by the bridge retrieving a new state should be negligible but it prevents attackers from easily finding out when the lock was triggered.