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
hm-rpc im Docker-Container #37
Comments
I also have a similar issue since: I also run iobroker as docker container but in my case the ccu is also a docker container. In my case the problem is that docker services does not allow me to set a fix IP address (I use docker swarm/stack to deploy all my house automation with fail-over capabilities), only the hostname. So my proposal is to use 0.0.0.0 for the bind so we listen in all ports and use the menu to select the callback IP. For the callback I would allow to enter hostnames such as "iobroker" and see if the CCU is able to resolve them. I will work in a PR at least that @GermanBluefox would like a different design. |
You can enter everything manually in object itself. system.adapter.hm-rpc.0
10 Июн 2017 г. 12:53 пользователь "Vegetto" <notifications@github.com>
написал:
… I also have a similar issue since: I also run iobroker as docker container
but in my case the ccu is also a docker container. In my case the problem
is that docker services does not allow me to set a fix IP address (I use
docker swarm/stack to deploy all my house automation with fail-over
capabilities), only the hostname.
So my proposal is to use 0.0.0.0 for the bind so we listen in all ports
and use the menu to select the callback IP. For the callback I would allow
to enter hostnames such as "iobroker" and see if the CCU is able to resolve
them.
I will work in a PR at least that @GermanBluefox
<https://github.com/germanbluefox> would like a different design.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEXqgDhiBAyOgP70lag2zdHsUIGK2hugks5sCnWTgaJpZM4NNzKh>
.
|
@GermanBluefox we would need two different IP addresses: one to start the RPC server and another external one that is sent to the CCU. I also checked that CCU is able to take a URL such as "http://iobroker:3000". I opened #40 with a proposal that it is working for my setup. Please check the translations. I am wondering if there is any reason to set up the RPC server address or if it would be good enough to always use 0.0.0.0. The important address is the one we send to the CCU... |
Thanks @GermanBluefox - I re-installed from your git repo and it is working find with Docker! Please notice that you might want to fix the translations for the "Callback Adapter Address" and "Listen to all IPs". |
Hallo,
wenn ich iobroker im Docker-Container laufen lasse, funktioniert der Callback der CCU nicht. Grund dafür ist, dass ich im Konfigurations-Dialog von hm-rpc lediglich die Netzwerk-Interfaces des Containers aufgelistet bekomme. Hierbei handelt es sich aber um ein Docker-internes Netzwerk, welches von aussen so nicht erreichbar ist.
Um den Container von aussen erreichbar zu machen, kann ich beim Start des Docker-Containers ein Port-Mapping (zum Bsp. für Port 2001) definieren. Der Dienst im Docker-Container ist dann über die IP des Docker-Hosts erreichbar. Ich müsste hier also in der Lage sein, die IP-Adresse für den HM-RPC-Callback frei setzen zu können. Dass allein reicht allerdings noch nicht, da die derzeitige Implementierung diese IP gleichtig verwendet, um den Socket entsprechend zu binden. Das geht natürlich nicht, da der Docker-Container mit der IP des Docker-Hosts nichts anfangen kann.
Es müsste also eigentlich 2 Eingabefelder für die IP geben:
Viele Grüße
Jan
The text was updated successfully, but these errors were encountered: