yi-hack-Allwinner icon indicating copy to clipboard operation
yi-hack-Allwinner copied to clipboard

ONVIF watermark not working

Open McGiverGim opened this issue 5 years ago • 12 comments

Maybe there is something I'm missing, but the ONVIF watermark switch does nothing for me.

I use the ONVIF integration in Home Assistant, neither the video or the snapshot are different with this switch enabled/disabled. I suppose it must add the date/time to the image?

McGiverGim avatar Aug 13 '20 07:08 McGiverGim

Yes, but only in the snapshot, not in the stream. Check if ha is using correctly onvif protocol. If ha doesn't use onvif, it saves the snapshot with ffmpeg through the stream and watermark doesn't appear.

roleoroleo avatar Aug 13 '20 18:08 roleoroleo

In theory I'm using Onvif, but I've seen messages that if something goes wrong, it changes to ffmpeg. Do you know how can I verify?

McGiverGim avatar Aug 13 '20 19:08 McGiverGim

Try onvif device manager.

roleoroleo avatar Aug 13 '20 19:08 roleoroleo

I think I can see in the little snapshot that Onvif device manager shows the watermark.... so is clear that is a Home Assistant issue. Sorry for spending your time and thanks for your help! I will try to find the problem.

McGiverGim avatar Aug 14 '20 06:08 McGiverGim

@roleoroleo I reopen this again because I've been investigating, and I've found the problem, maybe you want to fix it if possible.

The problem is that the authentication for the snapshot (and in general in the camera) is only of type BASIC and the ONVIF integration in Home Assistant uses DIGEST.

I have made a DIGEST authentication using CURL and I get a 401 unauthorized, but with BASIC it works perfectly. I've verified it too capturing the Chrome requests to the camera interface and I see the authentication used is BASIC too.

Is not a big problem, a PR is on the way to fallback to BASIC in Home Assistant: https://github.com/home-assistant/core/pull/38729

But I think it can be a good idea to support DIGEST, specially because the connection is HTTP only and it will increase a little more the security.

McGiverGim avatar Aug 17 '20 07:08 McGiverGim

Which version of HA are you using? I'm using it every day and lovelace works correctly.

roleoroleo avatar Aug 17 '20 08:08 roleoroleo

I'm on the latest one, 114.1, using the ONVIF flow integration. It works, but I don't get the ONVIF snapshot, I only get the ffmpeg snapshot. Does your hack support DIGEST and maybe I've something configured wrong?

McGiverGim avatar Aug 17 '20 08:08 McGiverGim

Ok, I never user onvif with auth enabled. How did you configure authentication?

roleoroleo avatar Aug 17 '20 13:08 roleoroleo

I'm not too sure, I don't remember. Maybe with the official yi app?

McGiverGim avatar Aug 17 '20 17:08 McGiverGim

I mean inside home assistant.

roleoroleo avatar Aug 18 '20 16:08 roleoroleo

When you execute the onvif flow integration it asks for user and password.

McGiverGim avatar Aug 18 '20 16:08 McGiverGim

In HA the digest authentication still doesn't work.

I have solved it by changing in core.config_entries, the value of the onvif integration:

"snapshot_auth": "basic"

Save the file

Restart HA

jumate avatar Feb 21 '22 11:02 jumate

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 10 '24 02:04 github-actions[bot]