Beiträge von kw123

    just one last comment from my side: mine works now fine for rotation, with the packet analysis shown above.

    My rotation level when correct is never 0.0. The lowest value correct value I saw is 0.2. - "0.0" was only seen when event open/closed happened. - and then 20+ messages with the same contents (packet id stayed constant) -- >1 message to make sure that the recipient receives the event .. so I am fine now. thanks for the discussion.

    I actually like these shelly beacons. And that they have published data types in a very clear way. There are already some other companies using these types : https://bthome.io/format/

    Especially the button type. The second best button device are iTrack types especially the musegear., They can be beeped, but only have one event type, so no doubt/tripple/long press. And the battery info is not in the BC, but has to read through a GATT session. I have >10 RPi in my house to cover all areas. I am using them for presence detection and to open door/ garage...

    I guess you don't look at the BLE direct messages but after it gets to mqtt in the cloud? this device has no mqtt direct connection, it just sends BLE packets

    like this:

    Code
    15      02  01 06    11  16 D2 FC   44      00 F1    01 64   05 B0 04 00   2D 00     3F 00 00   
    
    totlen  len flags    len tp uuid    Flag    packtId  battry  illuminance   open/cl   rotation

    see https://bthome.io/format/

    in these packets: the 3F is always 00 00 if 2D = open/close value changes state from 00 to 01 or visa versa

    if packetId ( id = 00, here packetId = F1 ) changes and open/close value (id = 2D) stays the same then rotation becomes non 00 00 as 2 byte signed integer *0.1

    id 05 is illuminance that is ok (hex 40400 is unsigned integer value of illuminance)

    id 01 is battery, hex 64 = 100%

    the flags show if encrypted, broadcast on etc ..

    all data in little endian format = least significant byte is first

    I am using an RPi to listen directly to the BLE messages

    Karl

    I have a shelly BLU door/window beacon. the listening to the BC is working fine. I get all parameters like battery, open/close/ illumination/button

    Also rotation w tag = 0x3F is received. But the numbers are mostly 0,. after some minutes it sometimes show a value !=0 and then next packages it goes back to 0.

    I tried all positions, flat, inverse flat, on all 4 sides. it mostly returns 3F0000. = rotation = 0

    is this a bug?

    Karl

    on and RPI:

    I can read the BC messages, get the button press type, counter, and battery level. That works fine.

    Now I would like to be able to send a beep command to the shelly button 1 with gatttool or equiv.

    Looking at the BLE traces ( tracking iPhone packages to the shelly button) on a MAC I can see that the connection to the button is encrypted

    How do I do that on an RPI w/o the shelly debug app?

    Thanks so much .

    Karl