-
Notifications
You must be signed in to change notification settings - Fork 73
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]: Gen 2 HTTP communication error behind reverse proxy #1088
Comments
Thanks for reporting a new issue @uthmanna! Important: Ensure that you use the latest available beta version of this adapter (not the current stable version!): 8.4.0
Otherwise this issue will be closed! |
In the meantime, I have also tested it with the latest 8.4.0 version. Same behavior. |
Hello, |
Hello, yes it could be. I also tried the “force” of the hostname, but it either didn't last long or didn't work at all |
Is there anything new here? |
Hello, I think it worked in your docker env. because of #607, #783 with the workaround in Line ioBroker.shelly/lib/protocol/mqtt.js Line 408 in 1a3ed2b
I changed the line to the specific end IP of my local network bridge, wich i'm sure will stay static, and restarted the adapter. |
Hey, sorry für den switch habs gerade eilig. Das würde bei mir nicht funktionieren, da die IP die K3s interne IP ist die sich ändern kann. Ich hab zur Zeit nen Script laufen, was die IP bei Änderung des Datenpunkts wieder automatisch setzt, "forced" sozusagen. Das führt zwar dazu das die meisten als Online angezeigt werden, aber leider nicht alle? Es werden auch einige der Datenpunkte aktualisiert aber bei weitem nicht alle. Auch der Shelly "Type" z.B. Shutter wird nicht erkannt, was dazu führt, dass der Shelly2.5 im Grunde gar nicht funktioniert. Mir ist auch noch aufgefallen, dass der Shelly Connected und relativ bald wieder Disconnected ohne ersichtlichen Grund (nach paar Sekunden). @klein0r Hast du ne Idee? |
I'm sure that
Shelly device
Gen2 Devices
Shelly firmware version
Different, e.g. latest
Protocol
MQTT
The problem
Hello everyone, First of all, I would like to thank you for your work! Unfortunately, I don't really find the time to program in my free time besides work. Respect :).
So, that brings us to my problem. I use the IOBroker in a not necessarily everyday setup. I run the IOB in a K3s cluster behind a reverse proxy (Traefik).
All Gen1 devices work perfectly via MQTT and Http. The MQTT communication also works for the Gen2 devices, but the HTTP requests do not.
In my opinion, this is because the “hostname” is initialized with the internal IP from K3s (see log), but then no longer updated with the real IP via MQTT. This host name is used for the request, as far as I know. The mechanism for “updating” the IP is done via a question and answer from the adapter and Shelly. '/rpc' -method MQTTShelly.GetDeviceInfo see Request: Line 435
Response: Line 542
This is also sent, see log. However, the response is not received (not subscribed?) The rest, so if an answer came, it looks right to me again in the code (i.e. structure of the Json message, etc.)
I also tested it without an adapter, just with an MqttBroker, and a response was received there. That's why I would exclude the Shellys as problem.
Next step in my analysis. I ran the IOBroker in a single Docker container, without Kubernetes, proxies, etc. I saw the same behavior there, i.e. the message/response was never received. However, the Shellies work here because the “hostname” IP initial was of course initialized with the correct IP.
iobroker.current.log (in debug mode!)
Version of nodejs
v20.18.0
Version of ioBroker js-controller
6.0.11
Version of adapter
8.4.0
The text was updated successfully, but these errors were encountered: