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] Camera event not systematically updated #12699

Closed
lolodomo opened this issue May 7, 2022 · 2 comments · Fixed by #12701
Closed

[netatmo] Camera event not systematically updated #12699

lolodomo opened this issue May 7, 2022 · 2 comments · Fixed by #12701
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@lolodomo
Copy link
Contributor

lolodomo commented May 7, 2022

While testing #12698 I encountered the case where the last event was not updated.
First the channels were updates while the video was recording. At next poll, the event was unchanged in UI (video recording) while the API returned the event with video status being now available. Even after another poll, the channels were not updated.
I was even able to reproduce it.
@clinique: any idea ?

@lolodomo lolodomo added the bug An unexpected problem or unintended behavior of an add-on label May 7, 2022
@lolodomo lolodomo changed the title [netatmo] Camera event not systamatically updated [netatmo] Camera event not systematically updated May 7, 2022
@lolodomo
Copy link
Contributor Author

lolodomo commented May 7, 2022

@clinique : thiis might be the code you added to filter already handled events?
I have not checked if the two events have the same timestamp but it is probable.

@lolodomo
Copy link
Contributor Author

lolodomo commented May 8, 2022

Looking at the logs, I can see that the last event was updated (video status) but keeping the same timestamp:

2022-05-07 20:25:23.018 [TRACE] [mo.internal.handler.ApiBridgeHandler] - executeUri returned : code [200 OK] body {"body":{"home":{"id":"xxxxx","events":[{"id":"yyyyy","type":"human","time":1651947874,"module_id":"zzzzz","snapshot":{"url":"https:\/\/netatmocameraimage.blob.core.windows.net\/production\/aaaaa"},"vignette":{"url":"https:\/\/netatmocameraimage.blob.core.windows.net\/production\/bbbbb"},"video_id":"ccccc","video_status":"recording","message":"<b>Mouvement<\/b> d\u00e9tect\u00e9"}]}},"status":"ok","time_exec":0.04108715057373047,"time_server":1651947922}

2022-05-07 20:27:54.622 [TRACE] [mo.internal.handler.ApiBridgeHandler] - executeUri returned : code [200 OK] body {"body":{"home":{"id":"xxxxx","events":[{"id":"yyyyy","type":"human","time":1651947874,"module_id":"zzzzz","snapshot":{"url":"https:\/\/netatmocameraimage.blob.core.windows.net\/production\/aaaaa"},"vignette":{"url":"https:\/\/netatmocameraimage.blob.core.windows.net\/production\/bbbbb"},"video_id":"ccccc","video_status":"available","message":"<b>Mouvement<\/b> d\u00e9tect\u00e9"}]}},"status":"ok","time_exec":0.021176815032958984,"time_server":1651948074}

I think the bug is at this line (updated events are ignored):
https://github.com/openhab/openhab-addons/blob/main/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/handler/channelhelper/EventChannelHelper.java#L69
@clinique : I suggest to remove the stuff with lastEventTime, are you ok ?

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue May 8, 2022
Fix openhab#12699

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
jlaur pushed a commit that referenced this issue May 8, 2022
Fix #12699

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this issue May 16, 2022
Fix openhab#12699

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Marc Fischer <marc.fischer2@bosch.io>
andan67 pushed a commit to andan67/openhab-addons that referenced this issue Nov 6, 2022
andrasU pushed a commit to andrasU/openhab-addons that referenced this issue Nov 12, 2022
Fix openhab#12699

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
psmedley pushed a commit to psmedley/openhab-addons that referenced this issue Feb 23, 2023
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 a pull request may close this issue.

1 participant