core: Omvif camera is not working
Home Assistant release with the issue: 0.93.1
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io
Component/platform: https://www.home-assistant.io/components/onvif/
Description of problem: Valid and working camera with PTZ is not functional under HA. Displays nothing, error log: “PTZ is not available on this camera” Testing the same connection with Omvif test tool. Two profiles available, all supported except “user management” and “certificate” OMVIF sections.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
- platform: onvif
host: [ADDRESS]
port: [PORT]
username: [USERNAME]
password: [PASSWORD]
Traceback (if applicable):
Additional information: Tested with Vstarcam Hi3518eV200 OMVIF version: 2.42
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23
Commits related to this issue
- ONVIF PTZ detection hotfix Hotfix for PTZ detection; creation process should be circumvented by the ```try-catch``` block in case PTZ service is unavailable for specific device. Fixes #23978 — committed to alryaz/home-assistant by alryaz 5 years ago
- Feature simplification & documentation, as well as presets - Simplified canonical service calling, now service calls are limited to speed setting - Added option to exploit `ContinuousMove` via `durati... — committed to alryaz/home-assistant by alryaz 5 years ago
- No-steps version of the modifications, also fixed debug output Issue #23978 — committed to alryaz/home-assistant by alryaz 5 years ago
I tried editing the code a little using guidance from https://github.com/FalkTannhaeuser/python-onvif-zeep package; I managed to get my camera working. I will release the patch soon, however the fix was as easy as removing PTZ support check and wrapping it around an
ONVIFError
try-catch statement. I don’t have a non-PTZ camera to test my setup with, though, so I can’t define whether this approach is feasible.The other issue I stumbled upon is complete uncertainty regarding how
camera.onvif_ptz
service should be called. Cards usingentity-button
type withtap_action
set to call this service yield errors, restraining service use out of event loop. I haven’t tried scripts yet, but I suppose they are the way to go.