jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
1
I have 2 Nvidia Shields (2019 models) that I just realized is Google based and has Chromecast built in.
My setup:
OH 2.4
Chromecast 2.5 binding
I’m not understanding how I send a URL to the Chromecast binding; the items on the documentation has many-many more than my OH has discovered. Here’s what the Chromecast 2.5 binding discovered.
jwiseman
(Mr. Wiseman (OH 4.3.0 Snapshot on Pi4))
6
Casting a video to Chromecast is not an easy task! Chromecast wants it to be a certain codec in order for it to work. After 10 hours; I finally got it to work with my HIKVision Camera against a NVR unit.
You have to convert H.264 video to a FFMPEG format on the fly which requires you to install a FFMPEG converter on your OH server. Some older camera’s can natively produce FFMPEG but not mine ;-(
Item:
Switch Cast_FrontDoor_Switch "Cast Front Door Switch [%s]" (HomeState) { expire="2m, command=OFF" }
Rule:
rule "Cast Front Door to TVs On"
when
Item Cast_FrontDoor_Switch changed
then
if (systemStarted.state != ON && Home_Away.state == ON && Cast_FrontDoor_Switch.state == ON) {
if (systemStarted.state != ON && (Basement_TV_Wired_Power.state == ON || Discover_Basement_TV_Wired_Power.state == ON ||Basement_TV_Power.state == ON)) {
BasementShieldStop.sendCommand(OFF)
Thread::sleep(200)
BasementShieldURI.sendCommand("http://192.168.0.230:54324/ipcamera.m3u8")
logInfo("Chromecast", "Casting Front Door Camera to Basement TV.")
}
if (systemStarted.state != ON && (Living_TV_Power.state == ON || Discover_Living_TV_Power.state == ON)) {
LivingRoomShieldStop.sendCommand(OFF)
Thread::sleep(200)
LivingRoomShieldURI.sendCommand("http://192.168.0.230:54324/ipcamera.m3u8")
logInfo("Chromecast", "Casting Front Door Camera to Living Room TV.")
}
if (systemStarted.state != ON && Living_TV_Power.state != ON && Discover_Living_TV_Power.state != ON && Basement_TV_Wired_Power.state != ON && Discover_Basement_TV_Wired_Power.state != ON && Basement_TV_Power.state != ON) {
logInfo("Chromecast", "NO TVs are ON to Cast Front Door Camera To.")
}
}
if (systemStarted.state != ON && Home_Away.state == ON && Cast_FrontDoor_Switch.state == OFF) {
if (systemStarted.state != ON && (Basement_TV_Wired_Power.state == ON || Discover_Basement_TV_Wired_Power.state == ON ||Basement_TV_Power.state == ON)) {
BasementShieldStop.sendCommand(ON)
Thread::sleep(200)
BasementShieldStop.sendCommand(OFF)
logInfo("Chromecast", "Stopped casting of Front Door Camera to Basement TV.")
}
if (systemStarted.state != ON && (Living_TV_Power.state == ON || Discover_Living_TV_Power.state == ON)) {
LivingRoomShieldStop.sendCommand(ON)
Thread::sleep(200)
LivingRoomShieldStop.sendCommand(OFF)
logInfo("Chromecast", "Stopped casting of Front Door Camera to Living Room TV.")
}
return;
}
end
my door bell rule is sending a PLAYURI to my shieldTV 2019 ,a screenshot of my outdoor camera “http://192.168.1.xx/snapshot.cgi?user=xxxxxx&pwd=xxxxx” .It worked well until recently.If my shield was on the shield chromecast open that link and show my cam’s screenshot.Now its not working anymore.Nothing changed at my setup.I just updated recently to the latest stable openhab,but i dont know if this is it.Shield chrome cast is working playing casts from mobile devices and desktops as usual.When i am trying to cast that link with PlayUri it seems that chromecast is opening but it “crashes” and return to main menu.Other chromecast devices i own can open that link from PlayURI command.I get no log errors in openhab…Any ideas?