Bluetooth-Devices / bthome-ble

Parser for BTHome BLE devices
https://bthome.io/
MIT License
67 stars 12 forks source link

Continuous Events in Home Assistant for Shelly Blu Button 1 #75

Closed incaqueen closed 1 year ago

incaqueen commented 1 year ago

Started setting up BLU Button automation in Home Assistant to trigger actions based on different button presses.

I setup the automation using trigger device, and selected one of the triggers (in this case Button "Press").

When I press the button, the automation is triggered, however, after 20 seconds, it is triggered again. Then it enters a loop of continuous triggering every 7-8 seconds. The only thing that stops the loop is to send another type of button press, however the loop restarts.

I listened to the events in developer tools, and I see the above pattern regardless of the type of button press. Below is an example.

I'm using recently purchased Shelly Blu Button, updated the firmware with the Shelly BLE app (from ios) and the firmware showing is 20230606-05508/v1.0.7-rc3@99932126.

I will try again using another Shelly Blu Button 1, but this time I won't connect using the Shelly App to update the firmware.

Event 113 fired 10:12 AM: event_type: bthome_ble_event data: device_id: 2bec9ad5887a1f916473e5c55f9b39a2 address: 5C:C7:C1:F4:0A:27 event_class: button event_type: triple_press event_properties: null origin: LOCAL time_fired: "2023-06-11T17:12:29.687951+00:00" context: id: 01H2NQ3TQQMBAHBB62TN2AQ7N0 parent_id: null user_id: null

Event 112 fired 10:12 AM: event_type: bthome_ble_event data: device_id: 2bec9ad5887a1f916473e5c55f9b39a2 address: 5C:C7:C1:F4:0A:27 event_class: button event_type: triple_press event_properties: null origin: LOCAL time_fired: "2023-06-11T17:12:21.683723+00:00" context: id: 01H2NQ3JXKXGV113HW5Z257W22 parent_id: null user_id: null

Event 111 fired 10:12 AM: event_type: bthome_ble_event data: device_id: 2bec9ad5887a1f916473e5c55f9b39a2 address: 5C:C7:C1:F4:0A:27 event_class: button event_type: triple_press event_properties: null origin: LOCAL time_fired: "2023-06-11T17:12:13.684400+00:00" context: id: 01H2NQ3B3M6TM5FF5EYBNSZHMK parent_id: null user_id: null

Event 110 fired 10:12 AM: event_type: bthome_ble_event data: device_id: 2bec9ad5887a1f916473e5c55f9b39a2 address: 5C:C7:C1:F4:0A:27 event_class: button event_type: triple_press event_properties: null origin: LOCAL time_fired: "2023-06-11T17:12:05.686712+00:00" context: id: 01H2NQ339PHJKTZKWTB2C3S0MW parent_id: null user_id: null

Event 109 fired 10:11 AM: event_type: bthome_ble_event data: device_id: 2bec9ad5887a1f916473e5c55f9b39a2 address: 5C:C7:C1:F4:0A:27 event_class: button event_type: triple_press event_properties: null origin: LOCAL time_fired: "2023-06-11T17:11:57.716096+00:00" context: id: 01H2NQ2VGMQ0XY027F9EPZ4R8F parent_id: null user_id: null

incaqueen commented 1 year ago

Quick update - issue does not exist if I do not upgrade the firmware using the Shelly BLE App. I just pulled another button fresh from the box, and this issue does not appear.

I'll try upgrading this one to see if the previous button was just a fluke, or if the issue replicates.

incaqueen commented 1 year ago

I figured out the issue. In the Shelly BLE Debug app, there is a setting called "Beacon ON". It is off be default. I turned it on to see if I could use it for presence. When I turned it back off, the repeating events stopped. I guess Beacon mode just continuously sends the last button press?

For now I'll leave Beacon mode as off and just use the button functionality. I look forward to future enhancements that allow for presence (and maybe trigger "locate" from home assistant).

At the very least if someone lese runs into this issue, they will find this post.