shelly-script-examples icon indicating copy to clipboard operation
shelly-script-examples copied to clipboard

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

Open adude00 opened this issue 1 year ago • 0 comments

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):

  • Firmware version: latest, 1.4.4
  • Shelly model: Shelly Plus2PM C049EF867E3C| 1.4.4| 679fcca9
  • Script running: https://github.com/ALLTERCO/shelly-script-examples/blob/main/ble-pasv-mqtt-gw.js

Additional context None that I can think of

adude00 avatar Nov 25 '24 09:11 adude00