Onvif - "PTZ is not available on this camera"

In the first test, I was able to pan and tilt the camera (zoom is not supported by my hardware), by invoking the servie manually from dev tools, so now I only need to put some nice buttons on the view to make it human-friendly :slight_smile: - I will probably go the same way as with the Xiaomi vacuum (lovelace card).

Thanks a lot for making this work!

Hi!
Kind of same issue here. I have a Watashi camera where the web interface works but the pan/tilt buttons are a combination of push/unpush with (JS) left/stop.
In HA I am using this:

switch:
  - platform: template
    switches:
      switch_cam_left:
        value_template: "off"
        turn_on:
          service: rest_command.ptz_cam_left
        turn_off:
[...]
rest_command :
  ptz_cam_left:
    url: http://IP/web/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=left
  ptz_cam_stop:
    url: http://IP/web/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=stop

raw edit of HA overview:
      - aspect_ratio: 0%
        camera_image: camera.onvif_camera
        entities:
          - entity: switch.switch_cam_left
            icon: 'mdi:arrow-left-bold-circle-outline'
[...]
        title: MyCam
        type: picture-glance

… which I found somewhere here (couldn’t re-find the post) as a workaround. The problem is that the movement is uncontrollable or let’s say “way too strong”(?)
I have tried add a stop command which the webpage Javascript calls when the mouse button is released but with no success (or worse I think…)
It seems I cannot add 2 services together below each other for one action (switch_cam_left), and adding it after ‘turn_off’ doesn’t make it work. Any suggestion about what I should try next?

Thank you.

Hi it is off topic as it is not onvif related.

But what you could do is to use a script instead of direct service call:

Hi, did you get PTZ to work? if yes, how?

Thanks!

Hi, and how to you that? define “rtsp_transport” ?

Thanks!

I tested my PT-camera (no Zoom) with this new version of HA. It has to use continuous mode to work which I tested with the ONVIF device manager and it is working there.

With HA it is not working. :frowning: I also get “PTZ is not available…” message.

Thank you for the heads up, it took me … some time to understand why it was off topic. As a side note the camera web interface actually has 2 options , and one is mobile. The “desktop” version works using Flash (yeah… ) and the mobile version doesn’t. It also provides “normal” cgi script for each direction which works on a single click. So now all is up and running.

For those interested it is now like this:

  ptz_cam_left:
    url: http://IP/web/ccgi-bin/hi3510/ytleft.cgi
    username: username
    password: password
  ptz_cam_right:
    url: http://IP/web/cgi-bin/hi3510/ytright.cgi
    username: username
    password: password
[...]

Still trying to figure out how to manage the whole thing though :wink:
Fred

Hello @DBa2016
could you help me to configure the PTZ for my Mibao camera?

Thanks a lot
Stefano