Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ble-pasv-mqtt-gw.js not working with Shelly BLU Wall Switch 4 #123

Open
adude00 opened this issue Nov 25, 2024 · 0 comments
Open

ble-pasv-mqtt-gw.js not working with Shelly BLU Wall Switch 4 #123

adude00 opened this issue Nov 25, 2024 · 0 comments

Comments

@adude00
Copy link

adude00 commented Nov 25, 2024

Describe the bug
The ble-pasv-mqtt-gw.js script is not working properly with the Shelly BLU Wall Switch 4.

Only button 4 is working, button 1, 2 and 3 are not.

To Reproduce
Steps to reproduce the behavior:

  1. install the script
  2. run the script
  3. click the button
  4. see mqtt messages

Button 4 (working as expected) click:

blegateway/94b21609a73e/telemetry {"pid":96,"battery":100,"button":254,"rssi":-64}
blegateway/94b21609a73e/telemetry {"pid":97,"battery":100,"button":1,"rssi":-82}

Button 3 click

blegateway/94b21609a73e/telemetry {"pid":98,"battery":100,"button":0,"rssi":-66}
blegateway/94b21609a73e/telemetry {"pid":99,"battery":100,"button":0,"rssi":-68}

Button 2 click

blegateway/94b21609a73e/telemetry {"pid":110,"battery":100,"button":0,"rssi":-76}
blegateway/94b21609a73e/telemetry {"pid":111,"battery":100,"button":0,"rssi":-65}

Button 1 click:

blegateway/94b21609a73e/telemetry {"pid":112,"battery":100,"button":0,"rssi":-67}
blegateway/94b21609a73e/telemetry {"pid":113,"battery":100,"button":0,"rssi":-64}

Button 1-3 double click example

blegateway/94b21609a73e/telemetry {"pid":105,"battery":100,"button":0,"rssi":-67}
blegateway/94b21609a73e/telemetry {"pid":106,"battery":100,"button":0,"rssi":-76}
blegateway/94b21609a73e/telemetry {"pid":107,"battery":100,"button":0,"rssi":-74}

Expected behavior
I would expect to have another item called maybe button_1 properly reacting to click events

Screenshots

I hope it might help debugging this, here are one click events from the console for all 4 buttons of the device

In the console, button 4 is:

shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB2AWQ6ADoAOgA6/g=="} 10:29:50
shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB3AWQ6ADoAOgA6AQ=="} 10:29:50 

button 3 is:

shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB4AWQ6ADoAOv46AA=="} 10:29:52
shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB5AWQ6ADoAOgE6AA=="} 10:29:52 

button 2 is:

shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB6AWQ6ADr+OgA6AA=="} 10:31:08
shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB7AWQ6ADoBOgA6AA=="} 10:31:09 

button 1 is:

shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB8AWQ6/joAOgA6AA=="} 10:31:32
shelly_bluetooth_rel:80 ADV 94:b2:16:09:a7:3e: mfd={}, svc={"fcd2":"RAB9AWQ6AToAOgA6AA=="} 10:31:33 

Device and script details (please complete the following information):

Additional context
None that I can think of

pytekmobile added a commit to pytekmobile/shelly-script-examples that referenced this issue Dec 4, 2024
…O#123

Added support for repeating datatype occurrences. The first occurrence get the normal name. The other occurrences are appended with a number. i.e. button, button1, button2, etc.

This adds support for Shelly BLU Buttons with more than one button. (i.e. Wall Switch 4, RC Button 4)

Additionally I've added map_btn_click_values to the CONFIG variable. If this is set, the mqtt button field contains the button state as text (single, double, triple, long, hold or null) and not as number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant