ioBroker.shelly icon indicating copy to clipboard operation
ioBroker.shelly copied to clipboard

Shelly Plus H&T: Error [MQTT] Unable to get mqttprefix of client with id..........

Open Tom54497 opened this issue 1 year ago • 9 comments

I'm sure that

  • [X] This issue is still present in the current beta version of this adapter
  • [X] There is no other (open) issue with the same topic (used the search)
  • [X] This issue is not described in the adapter documentation / FAQ

Shelly device

Shelly Plus H&T latest firmware

Protocol

MQTT

The problem

MQTT prefix error ist stated in IObroker log. Can anyone explain why? Is it because H&T falls asleep regulary?

iobroker.current.log (in debug mode!)

No response

Version of nodejs

latest

Version of ioBroker js-controller

latest

Version of adapter

latest

Tom54497 avatar Nov 13 '23 06:11 Tom54497

Please share the log file

klein0r avatar Nov 13 '23 07:11 klein0r

Thanks for reporting a new issue @Tom54497!

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

Otherwise this issue will be closed.

github-actions[bot] avatar Nov 13 '23 10:11 github-actions[bot]

I have the same issue with Shelly Plug Plus firmware 20231219-134003/1.1.0-g34b5d4f but not with older firmware 20231106-160251/1.0.8-gdba0ee3.

Logfile from IOBroker:

`

shelly.0 2024-01-03 10:40:38.704 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:40:38.704 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:39:30.002 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:39:30.001 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:36:17.503 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:36:17.503 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:30:08.073 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:30:08.073 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:29:13.387 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:29:13.387 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:28:51.934 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:28:51.933 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:26:13.804 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:26:13.804 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
shelly.0 2024-01-03 10:21:22.342 error [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-e465b8b468c4"
shelly.0 2024-01-03 10:21:22.341 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
`

Thanks

JarlMorgennebel avatar Jan 03 '24 09:01 JarlMorgennebel

I have the same issue with two Plus1 devices. All my other Shelly devices (Gen1 and 2) are not showing this issue. Any idea why this error occurs and how to fix?

`

  [MQTT] Unable to get mqttprefix of client with id "shellyplus1-80646fc7f825"
`

pustelbaer avatar Jan 14 '24 16:01 pustelbaer

Hallo Matthias, ich habe das gleiche Problem mit einem Shelly Plug S und der aktuellen Shelly Stable. Uploading Screenshot 2024-02-06 204538.png…

JestfulW avatar Feb 06 '24 19:02 JestfulW

Selbes Problem mit Shelly 3EM Pro hier...

shelly.1 2024-03-08 23:32:11.936 error [MQTT] Unable to get mqttprefix of client with id "shellypro3em-34987a453838"
shelly.1 2024-03-08 23:32:11.930 error [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')

andiweli avatar Mar 08 '24 22:03 andiweli

Selbes Problem mit Shelly plug - nicht regelmäßig `

2024-03-12 18:00:58.347 - error: shelly.1 (1895) [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-d4d4daebcba4"

2024-03-12 18:01:01.598 - error: shelly.1 (1895) [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace') 2024-03-12 18:01:01.599 - error: shelly.1 (1895) [MQTT] Unable to get mqttprefix of client with id "shellyplusplugs-d4d4daebcba4"

`

huk13 avatar Mar 12 '24 17:03 huk13

Nachdem hier nun jeder einmal die gleiche Fehlermeldung geteilt hat, wäre es spannender wie man das Problem reproduzieren kann und wann genau das auftritt.

klein0r avatar Mar 13 '24 10:03 klein0r

Nun,

der einzige Unterschied ist die Firmware-Version. Vermutlich hat Shelly als Hersteller eine undokumentierte Änderung gemacht, die nun zu identifizieren und nachzubauen ist.

Besteht eine Möglichkeit, die ankommenden MQTT Nachrichten raw mitzuschneiden?

JarlMorgennebel avatar Mar 13 '24 18:03 JarlMorgennebel

Duplicate of #931 (sorry, der andere Issue ist zwar neuer als dieser, aber da ist mehr passiert)

klein0r avatar Apr 29 '24 11:04 klein0r