ioBroker.shelly
ioBroker.shelly copied to clipboard
Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined)
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 2 PM, Shelly Plus 1 PM, Shelly Motion, Shelly TRV
Protocol (CoAP / MQTT)
MQTT
The problem
The adapter spams my log files with the error messages shown below:
The first issue is the error message itself because a Shelly Plus is a 2. generation device. But the error log shows an error message about a "Gen 1" device.
Version of nodejs
v16.20.2
Version of ioBroker js-controller
5.0.12
Version of Adapter
6.4.1
Operating system running ioBroker
Linux
Checklist of files to include below
- [X] iobroker.current.log (Please share the logs in debug mode)
- [ ] Contents of the JavaScript browser console (always include in cases of issues with the user interface)
Additional information & file uploads
No response
Thanks for reporting @hgschwibbe!
- Check if this topic is not covered in the documentation
- Ensure that you use the latest beta version:
- Attach all necessary log files in debug mode, screenshots and other information to reproduce this issue
- Search for the issue topic in other/closed issues to avoid duplicates!
Same for me with adapter version 6.4.5.
My log is spammed with messages like this:
2023-10-30 16:10:14.147 - info: shelly.0 (3080711) [MQTT] Device with client id "shellyplug-s-C11A20" connected!
2023-10-30 16:10:18.455 - error: shelly.0 (3080711) [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
2023-10-30 16:10:18.456 - error: shelly.0 (3080711) [MQTT] Unable to get mqttprefix of client with id "shellyplug-s-C11A20"
Downgraded to 6.4.1 and the error messages are gone.
Hi ich bekomme auch mit der neusten Adapter Version diese Meldung nach dem Neustart.Alle Shelly sind auf stable und neuster Firmware.Es ist auch alles angeschaltet so wie es die Doku sagt.
Ich habe das gleiche Problem.
Ich habe augenscheinlich leider das gleiche Problem
selber in grün mit der shelly 6.6.1 `
shelly.0 | 2023-11-11 16:17:20.799 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
---|---|---|---|
shelly.0 | 2023-11-11 16:17:20.798 | error | [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace') |
shelly.0 | 2023-11-11 16:17:20.001 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:17:19.999 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:17:19.998 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:17:19.997 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:17:19.996 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:17:19.995 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:17:19.960 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:17:19.959 | error | [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace') |
shelly.0 | 2023-11-11 16:17:19.953 | warn | State "shelly.0.undefined.hostname" has no existing object, this might lead to an error in future versions |
shelly.0 | 2023-11-11 16:17:19.635 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:17:19.633 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:17:18.726 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:16:13.628 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:16:13.627 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:16:13.575 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:16:13.543 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:16:13.543 | error | [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace') |
shelly.0 | 2023-11-11 16:16:13.532 | warn | State "shelly.0.undefined.hostname" has no existing object, this might lead to an error in future versions |
shelly.0 | 2023-11-11 16:16:13.503 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:16:13.498 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:16:13.496 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:16:13.495 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:16:13.453 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:16:12.925 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:16:12.491 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:15:07.127 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:15:07.073 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:15:07.072 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:15:07.071 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:15:06.862 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:15:06.861 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:15:06.654 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:15:06.653 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:15:06.652 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:15:06.651 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:15:06.644 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:14:00.103 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:14:00.102 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:14:00.101 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:14:00.094 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:14:00.093 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:14:00.092 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:14:00.091 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:14:00.090 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:13:59.882 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:13:59.881 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:13:59.876 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:12:51.763 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:12:51.753 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:12:51.752 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:12:51.751 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:12:51.710 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:12:51.648 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:12:51.343 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:12:51.217 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:12:51.212 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:12:51.211 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:12:51.209 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:11:54.748 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:11:54.747 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:11:54.746 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:11:54.745 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:11:53.950 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:11:53.949 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:11:52.852 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:11:52.851 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:11:52.848 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:11:52.095 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:11:52.087 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:11:11.195 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:11:11.178 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:11:11.150 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:11:11.149 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-ec626089a2bc" |
shelly.0 | 2023-11-11 16:11:11.148 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:11:11.146 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce6597e8" |
shelly.0 | 2023-11-11 16:11:11.139 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:11:11.035 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:11:11.034 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83b434" |
shelly.0 | 2023-11-11 16:11:11.021 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:11:11.014 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
shelly.0 | 2023-11-11 16:11:11.013 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-30c6f784f43c" |
shelly.0 | 2023-11-11 16:11:11.012 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:11:11.010 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:11:11.008 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:11:10.964 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-a8032abe1f14" |
shelly.0 | 2023-11-11 16:11:10.894 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88b778" |
shelly.0 | 2023-11-11 16:11:10.860 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-441793a4f16c" |
shelly.0 | 2023-11-11 16:11:10.858 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e88a5d8" |
shelly.0 | 2023-11-11 16:11:10.856 | error | [MQTT] Unable to get mqttprefix of client with id "shellypro4pm-c8f09e83ee7c" |
shelly.0 | 2023-11-11 16:11:10.849 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-44179394f5e0" |
shelly.0 | 2023-11-11 16:11:10.804 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1pm-7c87ce65becc" |
`
Was können wir dazu beitragen, diesen Fehler zu finden? Können wir irgendwelche Logs ziehen? (Wenn ja wie???)
I had the same problem after upgrading my 4 Plus Plug S to latest firmware and version 6.6.1 of the adapter. Downgrading to 6.4.1 solved this for me. I guess this is a minor bug.
@ffienegit : Well, this might be a minor bug, but it has a major consequences to me. Most of my shelly i4 aren't able to send their commands to the iobroker (or the mqtt server of the shelly adapter isn't receiving those telegrams). I don't have a direct wired power connection to my lamps or roller shutters, so no information that a lamp should be switched on, no light switching.
I'm happy to hear that downgrading to 6.4.1 solved the problem for you. Unfourtunately solved this doing not my problem.
In between I programmed some actions on my shellies. Now i can switch some light or my roller shutter. But this should not be the final solution. It worked perfect for about 6 month, but something changed and now i have these massiv problems.
Once again my question to the developers: What can I do to help investigating this issue?
@DonPosei Since nobody shared a log in debug mode so far, ... that would be a good start. I'm not able to reproduce that issue with the latest firmware versions in 6.6.1
@DonPoseiDa bisher niemand ein Protokoll im Debug-Modus geteilt hat, ... wäre das ein guter Anfang. Ich kann dieses Problem nicht mit den neuesten Firmware-Versionen in 6.6.1 reproduzieren Buchstabe l
eider kam bis jetzt auch nicht mehr der Fehler aber ein anderer den ich auch schon immer mal hatte.Ich hänge mal das debug log hier dran. iobroker.2023-11-13.log
Zeitmarke 14:34:19 Shelly Adapter wird aktviert Zeitmarke 14:44:14 erstes Auftreten der Meldung "unable to get.........."
Ich hoffe das hilft ein bisschen.
Ist jetzt alles geliefert, damit eine qualifizierte Analyse stattfinden kann?
Wird / Werden noch irgendwelche weiteren Daten benötigt?
Ist jetzt alles geliefert, damit eine qualifizierte Analyse stattfinden kann?
Ich denke schon, muss ich mir in Ruhe angucken - momentan keine Zeit für den Shelly-Adapter übrig.
Alles gut, wollte nur keine Information schuldig bleiben.
Moin, ich habe das Problem mittlerweile recht häufig. Ich kann es nicht mit 100% Sicherheit sagen, aber es scheint so, als wenn der Auslöser ein oder mehrere Shelly mit Verbindungsabbruch sind. Ein Neustart meiner UDM sorgt z.B. für die beschriebenen Fehlermeldungen. Die CPU von meiner Proxmox VM geht von 20-30% auf 50-60%. Innerhalb der VM geht der JS-Controller 100% CPU, Shelly und Device-Watcher sind auch sehr auffällig. Die GUI baut sich dann nur sehr langsam auf und Zigbee-Geräte brauchen ca. 10 Sekunden zum schalten. Nur durch einen Neustart der VM lässt sich das Problem lösen.
Anbei ein Log. Um 22:28 startet der Shelly-Adapter mit Version 6.6.1 im Debug-Modus: iobroker.2023-12-29.log.gz
Any solution available, yet? I have two shellys witch make problems! Both are connected via Fritzbox Repeater to the fritzbox. IoBroker is runnig on Synology NAS Could this be a problem?
Ich hab das gleiche Problem. Allerdings nur mit einem einzigen Shelly Plus1PMMini. Gibt es eine Lösung?
Moin, ich habe das Problem mittlerweile recht häufig. Ich kann es nicht mit 100% Sicherheit sagen, aber es scheint so, als wenn der Auslöser ein oder mehrere Shelly mit Verbindungsabbruch sind. Ein Neustart meiner UDM sorgt z.B. für die beschriebenen Fehlermeldungen. Die CPU von meiner Proxmox VM geht von 20-30% auf 50-60%. Innerhalb der VM geht der JS-Controller 100% CPU, Shelly und Device-Watcher sind auch sehr auffällig. Die GUI baut sich dann nur sehr langsam auf und Zigbee-Geräte brauchen ca. 10 Sekunden zum schalten. Nur durch einen Neustart der VM lässt sich das Problem lösen.
Anbei ein Log. Um 22:28 startet der Shelly-Adapter mit Version 6.6.1 im Debug-Modus: iobroker.2023-12-29.log.gz
Ich habe den device-watcher vor 2 Wochen aktualisiert. Seit dem keine Problem mehr mit dem Shelly-Adapter...
Downgrade von 6.7.0 auf 6.4.1 hat das Problem für mich auch gelöst. "device-watcher" habe ich gar nicht installiert.
Ich hatte das Problem nur mit Gen2-Devices. Gen1-Devices im selben Adapter, die ebenfalls über MQTT angebunden waren, haben diesen Fehler bei mir nicht hervorgerufen.
Bestätige, Downgrade von 6.6.1 auf 6.4.1 hat das Problem behoben. Hatte es bei 23 shellys: Plus 1 PlugS 1PM
Bei den UNIs und 3EMs kam der Fehler nicht.
Das wirft bei mir jetzt eher Fragen auf, da ich den Bug mit 6.4.1 erstellt hatte. Welche Shelly Firmware Versionen betreibt Ihr?
1PM
3EM
PLUG S
Plus 1
UNI
Ich habe das Problem auch, allerdings nur wenn die shelly per gl.inet Router aus die MQTT Daten sendet - sobald ich ins Local WLAN switche funktioniert alles einwandfrei. Kann es sein, das das MQTT Paket nicht vollständig ankommt? Kann man da eventuell ein log einschalten, das die eingehenden Pakete protokolliert?
wenn die shelly per gl.inet Router aus die MQTT Daten sendet
Was meinst Du damit?
Oh sorry, :-) Ich habe einen Router von gl.inet der dient als Repeater, weil das lokale WLAN da nicht hinkommt. Wenn ich den Shelly Plus 1 im selben WLAN wie den iobroker habe, klappt MQTT. Wenn ich im Repeater netz bin, bekomme ich die Fehlermeldungen
shelly.1 | 2024-01-30 14:14:48.909 | error | [MQTT] Unable to get mqttprefix of client with id "shellyplus1-xxx" shelly.1 | 2024-01-30 14:14:48.908 | error | [MQTT] Error in function setMqttPrefixHttp (Gen 1) for (undefined / undefined / undefined): TypeError: Cannot read properties of undefined (reading 'replace')
Ich habe eine 7490, bei der ich allerdings das WLAN ausgeschaltet habe. Dann kommt ein Netgear Switch und 4 Access Points von Netgear (WAX610), die mir dann mein WLAN im Haus aufspannen.
Das könnte eine ähnliche Konstellation sein, wie von Izimmermann berichtet. Der Iobroker hängt per LAN an der FritzBox. Ich werde mal versuchen den Iobroker an den Switch anzuschalten. Vielleicht bringts was.
Ich habe eine "Fritz!Box 7490 AX" und zwei "FRITZ!Repeater 1200 AX".