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

Allow manual callback ip setting #51

Closed
systemofapwne opened this issue Feb 2, 2020 · 2 comments
Closed

Allow manual callback ip setting #51

systemofapwne opened this issue Feb 2, 2020 · 2 comments

Comments

@systemofapwne
Copy link

When iobroker is running in a docker container, the default network is a docker-internal vlan like 172.21.0.2. This vlan and therefore that ip is not reachable outside of the docker container and is definitely not the same ip like the host ip (e.g. 192.168.0.100).

Problem
The routine for adding callbacks automatically derives the iobroker host ip via the ip package
https://github.com/Zefau/ioBroker.nuki-extended/blob/67462a540437d2bd5004a21e1d651b3dcbc463e6/nuki-extended.js#L8
https://github.com/Zefau/ioBroker.nuki-extended/blob/67462a540437d2bd5004a21e1d651b3dcbc463e6/nuki-extended.js#L426
and thus will always see the internal ip 172.21.0.2.
Thus callbacks will be added with an internal ip and will never reach their destination (here the host running docker: 192.168.0.100)

Callbacks will therefor simply not work.

Suggested fix
Add a setting for the adapter to set a custom ip for callbacks.

@Zefau
Copy link
Collaborator

Zefau commented Feb 3, 2020

Please try current Github version v2.1.0 as this introduces an option for a callback-ip.

@systemofapwne
Copy link
Author

I updated to 2.1.0 and your fix works as intended. Thank you very much for the fast reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants