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

[netatmo] Fix erroneous local URL handling #16492

Merged
merged 7 commits into from
Mar 15, 2024

Conversation

clinique
Copy link
Contributor

@clinique clinique commented Mar 6, 2024

While investigating issue #15883 I identified this issue.
I has also hit HA other extensions the same way.

Signed-off-by: clinique <gael@lhopital.org>
@clinique clinique requested a review from lolodomo as a code owner March 6, 2024 19:38
@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Mar 6, 2024
clinique added 3 commits March 7, 2024 01:00
…resence) so they remain reachable if API answer is in an incorrect network

Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
@clinique clinique self-assigned this Mar 7, 2024
@clinique
Copy link
Contributor Author

clinique commented Mar 7, 2024

This is a corner case. It does not happen all time (yesterday all day, this evening a part of my work session) where the vpnUrl returned by the API is not on the local network (http://169.254.xxx instead of http://192.168.xxxxx).
I added an optional configuration element to Camera things (Welcome, Doorbell,Presence) so the user can set a host name or IP of its camera that will be used to replace the wrong IP.

The other option was to use the vpn url as a fallback - losing ability of actions (e.g. lights on/off) that requires local access.

@clinique
Copy link
Contributor Author

clinique commented Mar 7, 2024

@jlaur , @lolodomo : ready for review.

@jlaur jlaur changed the title [netatmo] Erroneous local URL handling [netatmo] Fix erroneous local URL handling Mar 7, 2024
Doing a bit a cleansing. I know it is not bug directly connected to bug correction but when I see some opportunities to enhance code...

Signed-off-by: clinique <gael@lhopital.org>
…guration is not up-to-date

Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
@clinique clinique requested a review from lolodomo March 11, 2024 15:14
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@lolodomo lolodomo merged commit 03549dc into openhab:main Mar 15, 2024
3 checks passed
@lolodomo lolodomo added this to the 4.2 milestone Mar 15, 2024
@clinique clinique deleted the netatmo_15883 branch March 15, 2024 10:31
clinique added a commit to clinique/openhab-addons that referenced this pull request Mar 19, 2024
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
lolodomo pushed a commit that referenced this pull request Mar 21, 2024
…16546)

* Corrects and completes PR #16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
jlaur pushed a commit to jlaur/openhab-addons that referenced this pull request Mar 23, 2024
* Wrong local URL handling
* Adds configuration element ipAddress to Cameras (Welcome, Doorbell, Presence) so they remain reachable if API answer is in an incorrect network
* Removing CameraConfiguration so binding does not break if thing configuration is not up-to-date

---------

Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
jlaur pushed a commit to jlaur/openhab-addons that referenced this pull request Mar 23, 2024
…penhab#16546)

* Corrects and completes PR openhab#16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
magx2 pushed a commit to magx2/openhab2-addons that referenced this pull request Mar 24, 2024
…penhab#16546)

* Corrects and completes PR openhab#16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/netatmo-bridge-offline-99-of-time/149168/28

pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
* Wrong local URL handling
* Adds configuration element ipAddress to Cameras (Welcome, Doorbell, Presence) so they remain reachable if API answer is in an incorrect network
* Removing CameraConfiguration so binding does not break if thing configuration is not up-to-date

---------

Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
pgfeller pushed a commit to pgfeller/openhab-addons that referenced this pull request Sep 29, 2024
…penhab#16546)

* Corrects and completes PR openhab#16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
Signed-off-by: Patrik Gfeller <patrik.gfeller@proton.me>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
* Wrong local URL handling
* Adds configuration element ipAddress to Cameras (Welcome, Doorbell, Presence) so they remain reachable if API answer is in an incorrect network
* Removing CameraConfiguration so binding does not break if thing configuration is not up-to-date

---------

Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: gael@lhopital.org <gael@lhopital.org>
joni1993 pushed a commit to joni1993/openhab-addons that referenced this pull request Oct 15, 2024
…penhab#16546)

* Corrects and completes PR openhab#16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
matchews pushed a commit to matchews/openhab-addons that referenced this pull request Oct 18, 2024
…penhab#16546)

* Corrects and completes PR openhab#16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this pull request Jan 2, 2025
…penhab#16546)

* Corrects and completes PR openhab#16492

---------

Signed-off-by: gael@lhopital.org <gael@lhopital.org>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants