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

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

Open
3 tasks done
jenbenn opened this issue Oct 14, 2024 · 3 comments
Open
3 tasks done

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

jenbenn opened this issue Oct 14, 2024 · 3 comments
Labels
bug Something isn't working question Further information is requested

Comments

@jenbenn
Copy link

jenbenn commented Oct 14, 2024

I'm sure that

  • This issue is still present in the current beta version of this adapter
  • There is no other (open) issue with the same topic (use the search!)
  • This issue is not described in the adapter documentation / FAQ (read the docs!)

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 herunterladen

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

@jenbenn jenbenn added the bug Something isn't working label Oct 14, 2024
Copy link

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.

@mcm1957 mcm1957 changed the title [Bug]: [Bug]: iobroker does not permanently store the names of blu buttons Oct 14, 2024
@klein0r
Copy link
Contributor

klein0r commented Oct 15, 2024

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:

ioBroker.shelly/main.js

Lines 358 to 365 in 76b8ad2

await this.extendObjectAsync(`ble.${val.srcBle.mac}`, {
type: 'device',
common: {
name: val.srcBle.mac,
icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjAgNTEyIj48IS0tISBGb250IEF3ZXNvbWUgUHJvIDYuNC4yIGJ5IEBmb250YXdlc29tZSAtIGh0dHBzOi8vZm9udGF3ZXNvbWUuY29tIExpY2Vuc2UgLSBodHRwczovL2ZvbnRhd2Vzb21lLmNvbS9saWNlbnNlIChDb21tZXJjaWFsIExpY2Vuc2UpIENvcHlyaWdodCAyMDIzIEZvbnRpY29ucywgSW5jLiAtLT48cGF0aCBkPSJNMTk2LjQ4IDI2MC4wMjNsOTIuNjI2LTEwMy4zMzNMMTQzLjEyNSAwdjIwNi4zM2wtODYuMTExLTg2LjExMS0zMS40MDYgMzEuNDA1IDEwOC4wNjEgMTA4LjM5OUwyNS42MDggMzY4LjQyMmwzMS40MDYgMzEuNDA1IDg2LjExMS04Ni4xMTFMMTQ1Ljg0IDUxMmwxNDguNTUyLTE0OC42NDQtOTcuOTEyLTEwMy4zMzN6bTQwLjg2LTEwMi45OTZsLTQ5Ljk3NyA0OS45NzgtLjMzOC0xMDAuMjk1IDUwLjMxNSA1MC4zMTd6TTE4Ny4zNjMgMzEzLjA0bDQ5Ljk3NyA0OS45NzgtNTAuMzE1IDUwLjMxNi4zMzgtMTAwLjI5NHoiLz48L3N2Zz4=',
},
native: {},
}, { preserve: { common: ['name'] } });

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
Copy link
Contributor

klein0r commented Oct 15, 2024

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

@klein0r klein0r added the question Further information is requested label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants