core: ONVIF integration is not working anymore, PTZ was not working before!
The problem
In the version before my ONVIF camera was working fine and showed a video without any problem. PTZ was not working, there is already an issue with it from me.
Environment
- Home Assistant Core release with the issue: 0.110.0
- Last working Home Assistant Core release (if known): 1.109.x
- Operating environment (Home Assistant/Supervised/Docker/venv): HassOS on a Pi 4B
- Integration causing this issue: ONVIF
- Link to integration documentation on our website:
Problem-relevant configuration.yaml
This is the config I used before:
ffmpeg:
camera:
- platform: onvif
host: 192.168.178.32
port: 5000
username: <Username>
password: <Password>
rtsp_transport: udp
extra_arguments: -rtsp_flags none -rtsp_transport udp -q:v 2
name: Rundum
Traceback/Error logs
These are the messages in the log:
2020-05-20 14:05:53 WARNING (MainThread) [homeassistant.components.onvif] Couldn't get device 'Rundum' date/time. Error: None
2020-05-20 14:05:55 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Rundum', but will retry later. Error: None
2020-05-20 14:05:55 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 5 seconds.
2020-05-20 14:06:07 WARNING (MainThread) [homeassistant.components.onvif] Couldn't get device 'Rundum' date/time. Error: None
2020-05-20 14:06:12 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Rundum', but will retry later. Error: None
2020-05-20 14:06:12 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 10 seconds.
2020-05-20 14:06:24 WARNING (MainThread) [homeassistant.components.onvif] Couldn't get device 'Rundum' date/time. Error: None
2020-05-20 14:06:26 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Rundum', but will retry later. Error: None
2020-05-20 14:06:26 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 20 seconds.
2020-05-20 14:06:48 WARNING (MainThread) [homeassistant.components.onvif] Couldn't get device 'Rundum' date/time. Error: None
2020-05-20 14:06:50 WARNING (MainThread) [homeassistant.components.onvif] Couldn't connect to camera 'Rundum', but will retry later. Error: None
2020-05-20 14:06:50 WARNING (MainThread) [homeassistant.config_entries] Config entry for onvif not ready yet. Retrying in 40 seconds.
Additional information
Now I set the name to “Rundum”, host to “192.168.178.32”, port to “5000”, username to the same username, password to the same password, extra options to: “-rtsp_flags none -rtsp_transport udp -q:v 2” and transport to “udp”. But it doesn’t work!
Here is the old issue with PTZ not working: https://github.com/home-assistant/core/issues/34641
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 56 (17 by maintainers)
Also my cameras work with ODM.
Sorry @hunterjm but I do not understand. I get that this is a free project and we are extremely grateful for your efforts/work. But our cameras were working before the latest update.
I am not a professional coder but usually newer software versions improve things by extending support, not by breaking what was working before.
When I started using Home Assistant I was able to use my cameras with PTZ, then I had to switch to generic camera. Then ONVIF was working again but without PTZ. Now we have to switch back to generic camera…
It seems to me that the real problem is that every camera manufacturer does whatever he wants with ONVIF spec…
@hunterjm my bad, I didn’t express myself clearly.
My cameras work with the stream component only if you use the udp protocol instead of tcp, which is not working.
As far as I know, but I may be wrong, with the generic camera component it is not possible to select udp protocol.
Kind of same problem. Removed 3 ONVIF cameras in configuration.yaml, restarted and trying to set up via integration in the UI. It finds the cameras but when selecting one of them and giving in user and password for it I get the error “Could not configure unique ID for ONVIF device”