Onvif error

Can you help me?
I configure correctly but doesnt works :frowning:

2018-03-23 22:08:33 WARNING (SyncWorker_10) [homeassistant.components.switch.tplink] Could not read state for TP-Link Switch: Communication error
2018-03-23 22:09:23 ERROR (SyncWorker_16) [homeassistant.components.camera.onvif] Unable to communicate with ONVIF Camera: The action requested requires authorization and the sender is not authorized
2018-03-23 22:09:23 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform onvif

But how can we be sure if it is correctly configured?

Post your config.

  • platform: onvif
    name: Entrance
    host: 192.168.1.xx
    port: 80
    username: admin

Password is blank.

Password is blank but the error says that the action requested requires authorization and the sender is not authorized…

I try ICAMviewer using this configuration, and works!

What camera are you using?

GUUDGO GD-SC03 Snowman 1080P

Using ONVIF firmware.

Did you try with ‘password: admin’

try it, but fails :frowning:

Try the ONVIF Device Manger, that will show if you need a password or not.

What version Onvif is the camera running?

I try everything… and now:

2018-03-30 20:44:23 WARNING (MainThread) [homeassistant.components.camera] Setup of platform onvif is taking over 10 seconds.

Using ONVIF Device Manger I can connect to every cam :frowning:

Regards.

Onvif version: 1.2

Using VLC for rtsp://admin:[email protected] works fine too.

Do you have ffmpeg in your config?

Yes!
I have a xiaomi can that I access using ffmpeg config.

Nothing!
I don’t know what’s the problem. Using OnVif Device Manager I can see the image, but HASS no!
Can I debug?
I’m using

logger:
default: critical
logs:
homeassistant.components.camera: debug
homeassistant.components.camera.onvif: debug

but nothing appear relevant… only: [homeassistant.components.camera] Setup of platform onvif is taking over 10 seconds.

Maybe this is the problem??

Did you synchronize clocks between you and the camera?
You should first call the getSystemDateAndTime, record your local time, and after that, use the diff between the two when sending further requests.

getSystemDateAndTime does not require authentication, so you’re clear at that point.

Seem that is implemented: Allow the use of a time delta parameter between local and camera time. · quatanium/python-onvif@9b3becc · GitHub

Yes!!!
This is the problem. I create a custom_component and changed some parts and libs. Basically, I use onvif_zeep and zeep.

Thanks for all :slight_smile:

onvif.py: https://gist.github.com/ezar/7d5e95115ead77ea50617f09782fa71c

can you share the configuration ?