-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[ipcamera] Fix Hikvision cameras stay offline when a 401 reply is given with no www-authenticate header #15613
Conversation
@Skinah : I let you check if that is fine for you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, especially as cameras often behave buggy and thus retrying is the best option.
FYI, there are some recent discussions/investigations in the linked issue. |
Ah, thanks @jlaur, I missed that discussion. |
da766da
to
13ffd5c
Compare
I have updated the MR according to the discussion here: #15413 (comment) |
bundles/org.openhab.binding.ipcamera/src/main/resources/OH-INF/thing/thing-types.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.ipcamera/src/main/resources/OH-INF/i18n/ipcamera.properties
Outdated
Show resolved
Hide resolved
@Skinah : please have a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
Please do not merge until this is discussed. This is what I would like to discuss before this is merged, is there a reason why another config is added that will cause a breaking change? I thank @t2000 very much for their testing and time taken making two lots of changes to address this, please do not feel disheartened by this comment as I appreciate your work, it is just that I would like to discuss this direction taken first before agreeing to the merge if there was a reason. |
Automatic behavior is nice and I am a fan of it if it works ;-)
It is certainly not breaking because of the new config parameter, as there is a default for that in case it is not set. However, I see the point that the default should probably be set to Would that be a solution (you could add the automatic detection later anyhow if you like and keep this override for faulty cameras)?
I absolutely don't feel like that. I am always in favor for the "right" solution. :-) |
Make a call to If it is zero like this one or it is missing, you know the camera has no IO outputs.
It is confusing as they have also posted the output of the |
It might happen that a IP camera (Hikvision) replies with HTTP 401 but does not add a WWW-Authenticate header for our reconnect logic while we request the status of it's I/O ports. This fix offers an advanced config option to deactivate requesting the I/O ports. Fixes openhab#15413 Signed-off-by: Stefan Triller <github@stefantriller.de>
Signed-off-by: Stefan Triller <github@stefantriller.de>
Signed-off-by: Stefan Triller <github@stefantriller.de>
Signed-off-by: Stefan Triller <github@stefantriller.de>
e515a0b
to
8343017
Compare
Reverted to reconnect, see discussion. |
Waiting for @Skinah approval to merge, we are still in time for 4.1... |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
…en with no www-authenticate header (openhab#15613) Signed-off-by: Stefan Triller <github@stefantriller.de> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
…en with no www-authenticate header (openhab#15613) Signed-off-by: Stefan Triller <github@stefantriller.de>
It might happen that a IP camera (Hikvision) replies with HTTP 401 but does not add a WWW-Authenticate header for our reconnect logic.
This fix reconnects the ThingHandler to the camera in such cases.
Fixes #15413