iobroker-community-adapters / ioBroker.shelly

Integrate your Shelly devices into ioBroker via MQTT or CoIoT
Other
163 stars 66 forks source link

[Bug]: iobroker does not permanently store the names of blu buttons #1064

Open jenbenn opened 4 days ago

jenbenn commented 4 days ago

I'm sure that

Shelly device

Blu Button

Shelly firmware version

1.016

Protocol

MQTT

The problem

iobroker does not permanently store the names of blu buttons. I have manually changed the names (NOT the IDs) of my blu buttons in iobroker objects from the default names to sth identifiable. I.e. the name of the room the button is located in. While iobroker lets me changes the names at first, it only stores the new names until the buttons are activated the next time. Once the button is pressed after the name change the names of all button objectes are automatically reverted back to their default factory names. This behaviour is different to all other shelly wifi relays, which permanently store the names manually chosen.

iobroker.current.log (in debug mode!)

00

Log-Größe: 2.4 MB

Quelle | Zeit | debug |   -- | -- | -- | -- shelly.1 | 2024-10-14 19:51:30.681 | debug | [MQTT] State change 192.168.178.165 (shellyplus2pm / shellyplus2pm-80646fdc2c94 / shellyplus2pm#80646fdc2c94#1): shellyplus2pm-80646fdc2c94/events/ble -> state: shellyplus2pm#80646fdc2c94#1.BLE.Event, value: "{\n \"encryption\": false,\n \"BTHome_version\": 2,\n \"pid\": 80,\n \"battery\": 100,\n \"button_1\": 1,\n \"rssi\": -98,\n \"address\": \"38:39:8f:72:15:db\"\n}" shelly.1 | 2024-10-14 19:51:30.680 | debug | [processBleMessage] Received payload {"encryption":false,"BTHome_version":2,"pid":80,"battery":100,"button_1":1,"rssi":-98,"address":"38:39:8f:72:15:db"} from shellyplus2pm-80646fdc2c94 shelly.1 | 2024-10-14 19:51:30.680 | debug | [MQTT] Publish: 192.168.178.165 (shellyplus2pm / shellyplus2pm-80646fdc2c94 / shellyplus2pm#80646fdc2c94#1) - topic: shellyplus2pm-80646fdc2c94/events/ble, qos: 0, payload: {"scriptVersion":"0.4","src":"shellyplus2pm-80646fdc2c94","srcBle":{"mac":"38:39:8f:72:15:db"},"payload":{"encryption":false,"BTHome_version":2,"pid":80,"battery":100,"button_1":1,"rssi":-98,"address":"38:39:8f:72:15:db"}} shelly.1 | 2024-10-14 19:51:29.949 | debug | [MQTT] Publish: 192.168.178.129 (shellyplus1 / shellyplus1-441793cfa3d0 / shellyplus1#441793cfa3d0#1) - topic: shellyplus1-441793cfa3d0/events/rpc, qos: 1, payload: {"src":"shellyplus1-441793cfa3d0","dst":"shellyplus1-441793cfa3d0/events","method":"NotifyStatus","params":{"ts":1728928289.90,"switch:0":{"id":0,"output":false,"source":"MQTT"}}}

Version of nodejs

20.17.0

Version of ioBroker js-controller

6.0.11

Version of adapter

8.2.1

github-actions[bot] commented 4 days ago

Thanks for reporting a new issue @jenbenn!

  1. Please make sure your topic is not covered in the documentation
  2. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  3. Search for the issue topic in other/closed issues to avoid duplicates!
  4. Ensure that you use the latest available beta version of this adapter (not the current stable version): 8.3.0

    Otherwise this issue will be closed.

klein0r commented 4 days ago

iobroker does not permanently store the names of blu buttons.

The name is a preserved property on the device and it should not be overwritten:

https://github.com/iobroker-community-adapters/ioBroker.shelly/blob/76b8ad21f583cad5b0d0f1501e23741a81006f43/main.js#L358-L365

A better solution (like always) is to create an alias for all your devices.

I.e. the name of the room the button is located in.

You should use the room enum for that.

klein0r commented 4 days ago
  • Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue