core: PTZ actions are not supported on camera 'ONVIF Camera'

Home Assistant release with the issue: 0.100.2

Last working Home Assistant release (if known): Don’t know

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io

Integration: https://www.home-assistant.io/integrations/onvif/

Description of problem: When I try to use onvif command/service ( camera.onvif_ptz ) on a compatible camera from the logs I see this warning: PTZ actions are not supported on camera ‘ONVIF Camera’

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant): camera.yaml

- platform: onvif
  host: 10.10.20.128
  username: !secret e1user
  password: !secret e1pwd
  port: 8000

ui-lovelace.yaml

####################################################
#                                                  #
#                    Camera                        #
#                                                  #
####################################################
    # Title of the view. Will be used as the tooltip for tab icon
  - title: Video Camera
    path: VideoCamera
    cards:
      - type: picture-elements
        entity: camera.onvif_camera
        camera_image: camera.onvif_camera
        camera_view: live
        elements:
          - type: icon
            icon: 'mdi:arrow-up'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 25px
              bottom: 50px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                tilt: UP
          - type: icon
            icon: 'mdi:arrow-down'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 25px
              bottom: 0px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                tilt: DOWN
          - type: icon
            icon: 'mdi:arrow-left'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 50px
              bottom: 25px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:                
                pan: LEFT
          - type: icon
            icon: 'mdi:arrow-right'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 0px
              bottom: 25px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                pan: RIGHT
          - type: icon
            icon: 'mdi:arrow-top-left'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 50px
              bottom: 50px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                tilt: UP
                pan: LEFT
          - type: icon
            icon: 'mdi:arrow-top-right'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 0px
              bottom: 50px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                tilt: UP
                pan: RIGHT
          - type: icon
            icon: 'mdi:arrow-bottom-left'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 50px
              bottom: 0px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                tilt: DOWN
                pan: LEFT
          - type: icon
            icon: 'mdi:arrow-bottom-right'
            style:
              background: 'rgba(255, 255, 255, 0.5)'
              right: 0px
              bottom: 0px
            tap_action:
              action: call-service
              service: camera.onvif_ptz
              service_data:
                tilt: DOWN
                pan: RIGHT

Traceback (if applicable):


Home Assistant logs:

2019-10-16 17:45:14 WARNING (MainThread) [homeassistant.components.onvif.camera] PTZ actions are not supported on camera 'ONVIF Camera'
2019-10-16 17:45:15 WARNING (MainThread) [homeassistant.components.onvif.camera] PTZ actions are not supported on camera 'ONVIF Camera'
2019-10-16 17:45:15 WARNING (MainThread) [homeassistant.components.onvif.camera] PTZ actions are not supported on camera 'ONVIF Camera'
2019-10-16 17:45:15 WARNING (MainThread) [homeassistant.components.onvif.camera] PTZ actions are not supported on camera 'ONVIF Camera'

Debug Logs:

2019-10-16 18:19:19 DEBUG (MainThread) [homeassistant.components.onvif.camera] Setting up the ONVIF camera platform
2019-10-16 18:19:19 DEBUG (MainThread) [homeassistant.components.onvif.camera] Constructing the ONVIFHassCamera
2019-10-16 18:19:19 DEBUG (MainThread) [homeassistant.components.onvif.camera] Importing dependencies
2019-10-16 18:19:20 DEBUG (MainThread) [homeassistant.components.onvif.camera] Setting up the ONVIF camera component
2019-10-16 18:19:20 DEBUG (MainThread) [homeassistant.components.onvif.camera] Setting up the ONVIF camera device @ '10.10.20.128:8000'
2019-10-16 18:19:20 DEBUG (MainThread) [homeassistant.components.onvif.camera] Updating service addresses
2019-10-16 18:19:23 DEBUG (MainThread) [homeassistant.components.onvif.camera] Setting up the ONVIF device management service
2019-10-16 18:19:25 DEBUG (MainThread) [homeassistant.components.onvif.camera] Retrieving current camera date/time
2019-10-16 18:19:25 DEBUG (MainThread) [homeassistant.components.onvif.camera] Camera date/time: 2019-10-16 16:19:23+00:00
2019-10-16 18:19:25 DEBUG (MainThread) [homeassistant.components.onvif.camera] System date/time: 2019-10-16 16:19:25.059212+00:00
2019-10-16 18:19:25 DEBUG (MainThread) [homeassistant.components.onvif.camera] Connecting with ONVIF Camera: 10.10.20.128 on port 8000
2019-10-16 18:19:25 DEBUG (MainThread) [homeassistant.components.onvif.camera] Retrieving profiles
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] Retrieved '2' profiles
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] Using profile index '0'
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] Retrieving stream uri
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] ONVIF Camera Using the following URL for ONVIF Camera: rtsp://<user>:<password>@10.10.20.128:554/h264Preview_01_main
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] Setting up the ONVIF PTZ service
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] PTZ is not available
2019-10-16 18:19:26 DEBUG (MainThread) [homeassistant.components.onvif.camera] Camera 'ONVIF Camera' added to hass

Additional information: When I click on the lovelave button that recall the service camera.onvif_ptz in the logs I have the message 2019-10-16 17:45:15 WARNING (MainThread) [homeassistant.components.onvif.camera] PTZ actions are not supported on camera ‘ONVIF Camera’

The Camera is a Reolink E1 Pro and it support Onvif 2.1 with Onvif profile S, I think other Onvif compatible camera have this problem too

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 74 (26 by maintainers)

Most upvoted comments

@CiquattroFPV @olijouve

Please see my feedback just posted on #30152

Hello, I could solve the problem of PTZ configuration on Hass.io (HA version 0.103.2). It works for Sricam cameras SP017 and SP006. I modify the camera.py file with “custom_components” folder. The code is here: https://github.com/SaulDiez/customHA/blob/master/onvif/camera.py

I just change methods “setup_ptz”(now is async) and “async_perform_ptz”.

My configuration.yaml is:

script:   
     ptz_tilt_up:
        alias: up
        sequence:
          - service: camera.onvif_ptz
            data:
                entity_id: 'camera.sricam_360'
                tilt: 'UP'
    ptz_pan_right:
        alias: right
        sequence:
          - service: camera.onvif_ptz
            data:
                entity_id: 'camera.sricam_360'
                pan: 'RIGHT'
    ptz_tilt_down:
        alias: down
        sequence:
          - service: camera.onvif_ptz
            data:
                entity_id: 'camera.sricam_360'
                tilt: 'DOWN'
    ptz_pan_left:
        alias: left
        sequence:
          - service: camera.onvif_ptz
            data:
                entity_id: 'camera.sricam_360'
                pan: 'LEFT'
    ptz_zoom_in:
        alias: zoom in
        sequence:
          - service: camera.onvif_ptz
            data:
                entity_id: 'camera.sricam_360'
                zoom: 'ZOOM_IN'
    ptz_zoom_out:
        alias: zoom out
        sequence:
          - service: camera.onvif_ptz
            data:
                entity_id: 'camera.sricam_360'
                zoom: 'ZOOM_OUT'

camera:
  - platform: onvif
    name: 'sricam_360'
    host: xxx.xxx.xxx.xxx
    username: 'xxxx'
    password: 'xxxx'

I hope it could help

Thanks @REALogics, but thank the @CiquattroFPV, this code is what he put in creating the issue.

This error seems to me to be because the service being called is the original, but I can’t guarantee it. Could you find the original component folder in PI?