go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

[Feature Request] Card for Home Assistant

Open wonderiuy opened this issue 3 years ago • 12 comments

Hello AlexxIt, i'm very pleased you are working oin this project. Is possible to add a card in Home Assistant that uses go2rtc as a source? I didn't find any new card after installation. Should we use Glance card maybe? What's the address for various go2rtc stream to point at? Thank you

wonderiuy avatar Aug 24 '22 07:08 wonderiuy

I've looked at the process, which is not so clear. A dedicated card would be the best user friendly option for HASSIO, so I'm reopening the issue. Is not clear what address to use in the generic camera: the rtsp direct to camera or something pointing to go2rtc? Which is the name of the camera inside your go2rtc? Setting a name with the form would be useful also Ive noticed also that one of my camera has been automatically detected also: there is no mention of this (Axis camera)

wonderiuy avatar Aug 24 '22 15:08 wonderiuy

You may use generic camera and Lovelace card as usual. As you using it before. But after install this add-on and setup buildin integration you will get WebRTC stream.

AlexxIT avatar Aug 24 '22 15:08 AlexxIT

Is there any possibility of 2 way audio within a Home Assistant card? Would this require a brand new card? Would need ability to mute & unmute microphone etc also

conorlap avatar Aug 24 '22 15:08 conorlap

Well. Someone needs to extend default Lovelace card or write new one. I plan to spend my time on advanced server features in near futures.

AlexxIT avatar Aug 24 '22 16:08 AlexxIT

For all of your information, you can feed the Go2rtc RTSP feed into https://github.com/dermotduffy/frigate-hass-card

This is very useful if you use frigate

maxi1134 avatar Aug 25 '22 13:08 maxi1134

Thank you but the fact here is that we passed from AlexxIT WebRTC Camera, with lovelace card with PTZ support (1 product, no config needed) to:

  • go2rtc
  • RTSPtoWebRTC
  • Generic Camera
  • Glance card which is a step back in user friendlyness: need to configure everything, add single generic camera, etc

wonderiuy avatar Aug 25 '22 13:08 wonderiuy

You can continue to using what you want :)

go2rtc is a new version of WebRTC backed with a lot of new features.

AlexxIT avatar Aug 25 '22 16:08 AlexxIT

For all of your information, you can feed the Go2rtc RTSP feed into https://github.com/dermotduffy/frigate-hass-card

This is very useful if you use frigate

Can you quickly explain how to do that? Where do I reference the stream from go2rtc in the frigate card? I think it will just use the default RTSP stream and not from go2rtc?

thinkjk avatar Aug 25 '22 23:08 thinkjk

If you install go2rtc and RTSPtoWebRTC, you can use instructions "Native WebRTC" from frigate-hass-card.

AlexxIT avatar Aug 26 '22 02:08 AlexxIT

I think it might work with an iframe card. Using the webrtc link from addon GUI.

I haven't tested it completely, because I don't have a microphone on my PC. But the browser asks for microphone permissions, so it seems to work.

Can anyone test it?

elkarto avatar Aug 26 '22 09:08 elkarto

I haven't tested it completely, because I don't have a microphone on my PC. But the browser asks for microphone permissions, so it seems to work.

Can anyone test it?

I just tested it and it works in a browser and in the companion app. I'll likely use it as a card-mod popup card. It's a good temporary solution but it lacks a mute button which makes it risky. :)

Well I like it better than a normal glance card but it has an issue**. It doesn't always close the connections properly when used in an iframe which can be a real problem.** Otherwise it works way better.

It appears to be the ffmpeg that keeps going.

calisro avatar Sep 08 '22 01:09 calisro

I've been using the glance card and then added PTZ control via a separate integration (foscam in my case, ONVIF etc would also work).

Here's an example:

type: picture-glance
camera_view: live
title: Front Door
camera_image: camera.front_door
tap_action:
  action: more-info
entities:
  - entity: camera.front_door_camera_control
    name: Home
    icon: mdi:home
    tap_action:
      action: call-service
      service: foscam.ptz_preset
      service_data:
        entity_id: camera.front_door_camera_control
        preset_name: Home
  - entity: camera.front_door_camera_control
    name: Pan Left
    icon: mdi:arrow-left
    tap_action:
      action: call-service
      service: foscam.ptz
      service_data:
        entity_id: camera.front_door_camera_control
        movement: left
        travel_time: 0.75
  - entity: camera.front_door_camera_control
    name: Tilt Up
    icon: mdi:arrow-up
    tap_action:
      action: call-service
      service: foscam.ptz
      service_data:
        entity_id: camera.front_door_camera_control
        movement: up
        travel_time: 0.75
  - entity: camera.front_door_camera_control
    name: Tilt Down
    icon: mdi:arrow-down
    tap_action:
      action: call-service
      service: foscam.ptz
      service_data:
        entity_id: camera.front_door_camera_control
        movement: down
        travel_time: 0.75
  - entity: camera.front_door_camera_control
    name: Pan Right
    icon: mdi:arrow-right
    tap_action:
      action: call-service
      service: foscam.ptz
      service_data:
        entity_id: camera.front_door_camera_control
        movement: right
        travel_time: 0.75

camera.front_door is my go2rtc stream, amera.front_door_camera_control is the foscam integration used solely for PTZ control.

aderusha avatar Sep 28 '22 19:09 aderusha

Supported in WebRTC Camera v3 (beta) https://github.com/AlexxIT/WebRTC/releases

AlexxIT avatar Jan 13 '23 20:01 AlexxIT