Rest call to multiple entities / how do i reference their IP?

I am using the fully kiosk integration, so i have 4 tablets configured. I have a rest call to play a sound on the tablets. Since I have 4 tablets currently and possibly more in the future, the rest call takes in the ip/hostname of the tablet to send the rest call to.

My question is, is it possible through HA to pass that ip or hostname? I have an automation when the door bell rings I would like all the tablets to play the sound, so by doing a group i don’t know how to programmatically in the automation (or yaml) to pass the ip addresses of all the devices in that group.

I could do a list of the ip’s, but ideally i would like this to just work as I add tablets to the group.

Any thoughts?

If you use this Fully Kiosk Browser Custom Component it will create a media_player, which you can then group perhaps?

Here is my rest command

http://{{ tablet }}:2323/?cmd={{ cmd }}\&url={{ url }}\&key={{ key }}\&value={{ value }}\&type={{ type }}\&loop={{ loop }}\&exitOnTouch={{ exitOnTouch }}\&exitOnCompletion={{ exitOnCompletion }}\&showControls={{ showControls }}\&password=<redacted>

Here is my service call to 1 of the tablets.

service: rest_command.kiosk_command
data:
  cmd: playVideo
  tablet: 192.168.2.78
  url: http://192.168.2.14:93/h264/Doorbell/temp.m3u8
  type: json
  showControls: 0
  loop: 0
  exitOnCompletion: 1
  exitOnTouch: 1

Not sure if i can use a data template, and still get the “tablet” var somehow out of the entities in a group. I am using the fully kiosk browser integration so i do have the entities created. SO hopefully I can figure out how to add them all to a group, and using the data template maybe get their ip.

Thanks!

Do you have media_player entities for each tablet?

yes. mediaplayer for each, just no playvideo().

Have you tried grouping the media_player entities?

i havent, but i don’t know how the action will know the value for “tablet” to know how to reach the end point by just grouping

If you group then you play to the group instead of the individual players.

right, but the fully kiosk browser integration doesn’t have a play video. and my rest service needs to know which ip to send the command to. I don’t think it will work since there is no mechanism there (that i can see) that will populate the “tablet” variable with the ip address of that device.

Are you sure?

i tried playing the same url that is in my rest call using play media and it’s only audio.

There are also some other params that are in there. Like tap the screen to stop playing. if it’s not a stream you can tell it to loop it ect.

The integration should be in HA core soon :slight_smile: https://github.com/cgarwood/homeassistant-fullykiosk/issues/118

Well, that will solve part of it. Just need to figure out how to get it work with sending video URL. I was looking at it, and trying to see if I could contribute to it, but not quite there yet.