nthulke
(Nthulke)
August 14, 2023, 2:45am
1
Hi all,
I have setup Frigate and its wonderful and I am loving this option “Send to media player” (cast to device)
What I am trying to setup a script to call that option from a single button or a triggered event, but when I try and create a script it show this error:
Is there a differnt service I should be calling for this? Has anyone else managed to get this working using Frigate?
dpeluso
(Daniel)
January 10, 2024, 5:11am
2
Hey @nthulke , I ended up with this workaround:
Go to:
Under “Listen to events”, in the “Event to subscribe to” text field, enter call_service
and click “START LISTENING”
Click “Send to media player” on the frigate card
An event should now show up, looking like this:
event_type: call_service
data:
domain: media_player
service: play_media
service_data:
entity_id: media_player.kitchen_display
media_content_id: media-source://camera/camera.frontdoor
media_content_type: application/vnd.apple.mpegurl
extra:
title: Frontdoor
thumb: >-
/api/camera_proxy/camera.frontdoor ?token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Replace the ‘xxxx’ with {{states.camera.frontdoor.attributes.access_token}}
Note you will need to change the camera name in the api call and access_token variable
Eg. /api/camera_proxy/camera.yourcameraname ?token={{states.camera.yourcameraname .attributes.access_token}}
Add the above to your automation service call
service: media_player.play_media
target:
entity_id: media_player.yourmediaplayer
data:
entity_id: media_player.yourmediaplayer
media_content_id: media-source://camera/camera.yourcameraname
media_content_type: application/vnd.apple.mpegurl
extra:
title: Frontdoor
thumb: >-
/api/camera_proxy/camera.yourcameraname?token={{states.camera.yourcameraname.attributes.access_token}}
RKor
(Rani)
June 22, 2024, 3:17pm
3
Hi mate, I tried that but it doesn’t seem to work. Is it still working for you?