The integration should handle both basic and digest. It might be hard coded to digest in camera platform. Can you create a github issue?
Sorry, how do I create a github issue?
@Robban Shall I report it to “Home Assistant Core” or “Frontend or Dashboards” or another option? Many thanks!
Core please
Done!
Many thanks
@Robban Yesterday I upgraded HASS and all the cameras (new and old) do work but report the following error:
Logger: homeassistant.components.go2rtc.server
Source: components/go2rtc/server.py:148
integration: go2rtc (documentation, issues)
First occurred: 16:15:42 (15 occurrences)
Last logged: 16:15:52
16:15:52.574 WRN [rtsp] error="streams: exec/rtsp\n[in#0 @ 0x7ffbdcc12c00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://127.0.0.1:18554/camera.axismola2?audio.\nError opening input files: Invalid data found when processing input\n" stream=camera.axismola2
16:15:52.690 WRN [rtsp] error="streams: exec/rtsp\n[in#0 @ 0x7f002ce12c00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://127.0.0.1:18554/camera.axismola1?audio.\nError opening input files: Invalid data found when processing input\n" stream=camera.axismola1
16:15:52.721 WRN [rtsp] error="streams: exec/rtsp\n[in#0 @ 0x7f0054412c00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://127.0.0.1:18554/camera.axisarreu?audio.\nError opening input files: Invalid data found when processing input\n" stream=camera.axisarreu
16:15:52.741 WRN [rtsp] error="streams: exec/rtsp\n[in#0 @ 0x7f31dda12c00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://127.0.0.1:18554/camera.axisera?audio.\nError opening input files: Invalid data found when processing input\n" stream=camera.axisera
16:15:52.745 WRN [rtsp] error="streams: exec/rtsp\n[in#0 @ 0x7fd2f4612c00] Error opening input: Invalid data found when processing input\nError opening input file rtsp://127.0.0.1:18554/camera.axismola3?audio.\nError opening input files: Invalid data found when processing input\n" stream=camera.axismola3
Do you think it’s related to the Axis integration?
Many thanks!
@Robban I made some progress. I discover that if you add the authentication, username and password to the REST sensor you can actually get the information using digest:
# Axis camera zoom
- scan_interval: 60
resource: "http://user:pass@hostname/axis-cgi/com/ptz.cgi?query=position"
method: GET
authentication: digest
username: user
password: pass
sensor:
- name: "Camera Zoom"
value_template: >-
{% set idx = value.find("zoom=") + 5 %}
{% set val = value[idx:-1] %}
{% set idx2 = val.find("\r") %}
{{ val[0:idx2] }}
unique_id: "sensorRESTcameraZoom"
That is a good progress, BUT now the problem is how to add the parameters to the REST Command (i.e., axis_ptz_command above) to be able to use the zoom and preset positions…
Do you know how to do it?
Many thanks!
I guess its possible. I havent upgraded yet. I dont have time to look at it for a couple of weeks unfortunately
Sorry. I have never used the rest sensor so I dont know
As I said, I managed to make the REST sensor work, as shown above, the problem is how to make a REST command to send PTZ commands using digest… It is possible because Postman does it well!! Below is the Postman configuration and the result of sending a zoom=3000:
So now the point is how to modify the prevoius axis_ptz_command REST command in HASS
Thanks!
Hi to all, just in case somebody is interested, I managed to send Axis PTZ commands from HASS with authentication by using cURL through a shell command:
# shell_command (Axis cameras PTZ commands with autentication, replace spaces by %20 for presetposcam)
axis_ptz_command: curl -i -X GET --anyauth -u {{ user_password }} http://{{ hostName }}/axis-cgi/com/ptz.cgi?{{ attribute }}={{ value | replace(' ', '%20') | string() }}
So to make all this work, you need to create sensors and helpers that update through automations, which is a little bit of a burden… I hope one day the axis automation will provide the zoom as input_number, presetposcam as select_text and, maybe, a way to use all the PTZ commands?
Hi
I don´t know if it’s the right place but I have a few cameras and they work perfect and I recently got an Axis speaker. Is it possible to integrate it and have it work with Spotify in HA?
It’s not supported in the integration, yet. Im not sure how easy it is to send audio to them. I haven’t dived deep into the documentation either though. It would be awesome if its possible
ok, it would be great if it was!
I agree. I want this too
@Robban I can put a Axis speaker online with external IP access if you want to have a play Would also be good if we can use the cameras audio out as a medi aplayer.
Thanks! We have a community contributor working on sending some audio to axis devices (add Audio API support for axis network speakers by jonoberheide · Pull Request #521 · Kane610/axis · GitHub) lets see how far that takes us
Dear all, since the new versions I removed the RTSPtoWebRTC integration and the video streams are very slow. How does HASS need to be configured for Axis cameras? Many thanks