Chromecast bindings

Hi there,

First of all , thanks to all developper and contributer for this nice project.

Recently, I have observed a new bindings in openhab2.

One that allows to control a Chromecast.

Unfortunately I do not see it in the list of paper IU.

Can you tell me how to install it ?

thank you !

It is part of the latest snapshot distro:

Note that it currently is rather in a beta state and has a few issues. It would be great to find someone interested to further improve this binding (I’m myself am lacking the time to dive deeper into it).

Is it possible to play YouTube videos via the chromecast binding? I tried sending the URL to the playuri channel but that didn’t work…

hi there, I was also just recently trying to play with the chromecast binding. volume worked fine, however I tried to send a command to the playuri control, I get the following error. Wondering if anyone knows what might be wrong?

[ERROR] [chromecast.handler.ChromecastHandler] - Missing media player app - cannot process media

error is coming from here:

looks like it requires the CC1AD845 media player or something. Just wondering if anyone has seen this before and knows how to fix?


Is it a Google Chromecast device or some 3rd party chromecast-enabled receiver? I’ve never seen this message with my Chromecasts.

mine are LG speakers (HiFi/MusicFlow) with built in chromecast. I am able to cast to them fine using things like stream2chromecast

I think i’ll just create an exec based item to start/stop the streams for now, but would be nice to get the built in chromecast binding working. As mentioned, volume controls work fine, just not the playuri.

I was trying to do something similar to below in one of my rules. I just want a switch which will enable playing my favorite radio stream. Works fine from stream2chromecast

sendCommand(chromecast_playuri, "http://.....)

If anyone has any ideas, would love to know.

I have a similar interest in using a switch to select from several youtube URL’s. I tried both regular and embed-type youtube URL’s without success using the Karaf command:

 smarthome:send Chromecast

However, I was able to get the chromecast (standard HDMI dongle v2) to play web-based mp4 files using the following command in Karaf:

smarthome:send Chromecast

Looking forward to figuring this one out :slight_smile:

I was able to use the following code to cast the video on OpenHAB2 with the chromecast binding:


Player CastLRTV_Control { channel= “chromecast:chromecast:2aaa81d166fd34024d9ae49a2ebdaaaa:control”}

String CastLRTV_URI { channel=“chromecast:chromecast:2aaa81d166fd34024d9ae49a2ebdaaaa:playuri”}

Switch Play_Switch


Switch item=Play_Switch mappings=[ON=Play]


rule "Play Switch Rule" when Item Play_Switch received update then CastLRTV_URI.sendCommand(     "") CastLRTV_Control.sendCommand(PLAY) end

@veetrik Are you using the Chromecast binding from the PaperUI? I don’t see the “playuri” channel in Paper (only volume and control are there), so I’m wondering if that is my problem. I can get chromecast to play voice commands using “say,” so I’m close!

Look at advanced channels.

Thanks @Lolodomo - didn’t see it there!

@nallerz did you ever figure out how to stream a youtube video? The mp4 works nicely, but other formats would be great!

Yes I am using the Chromecast binding in the PaperUI in a windows 10 system. I see the playuri when I select show more:

Unfortunately this one took a back burner and I have not gotten around to figuring it out. If I find a solution I will be sure to post it… I know there are some very knowledgeable folks on here; maybe they will chime in if the issue is getting some traction. Good luck in the meantime…

Yes I am using the Chromecast binding in the PaperUI in a windows 10 system. You need to click on the ‘see more’ button when looking at the channel items.

So I’m up and running with the binding. I can cast audio to a Google Home and video to a smart TV, but I’m getting an error when trying to broadcast to an a Chromecast Audio. It looks like it should be supported. Has anyone ever run into this issue?

2017-03-04 08:55:48.472 [ItemStateChangedEvent     ] - ChromecastAudio1PlayURI changed from NULL to
2017-03-04 08:55:48.632 [ItemCommandEvent          ] - Item 'ChromecastAudio1' received command PLAY
2017-03-04 08:55:48.632 [hingStatusInfoChangedEvent] - 'chromecast:audio:46bcd962cee988d794c539084d2a6f51' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): No application is running in ChromeCast

It almost looks like I’m hitting the error at line 240 of, but I have no idea what could be causing this. I can’t find any other references to it anywhere.

Thanks in advance!

Hi I’, having problem with my HDMI chromecast I would like to play a file hosted on my http server (local) fileslocated and works with squeezelite bute would be fun to make it work even with chromecast.

Dimmer Volume { channel=“chromecast:chromecast:ffbe7ccc:volume” }
Player Music { channel=“chromecast:chromecast:ffbe7ccc:control” }
String CCplayuri { channel=“chromecast:chromecast:ffbe7ccc:playuri”}

rule “kitchen_door”

                    Item gDO_kokknapp changed from OFF to ON
                                    if (gDO_bells.state==ON){

but no soiund is played any ideas are wlecomed.

Are you also using a Chromecast Audio device? Maybe it’s an issue specific to Audio? Mine works on regular chromecasts, but I can’t get the Chromecast audio to work.

No I’m using normal chromecast for tv, I even tried to set up volume control bute thats doesn’t work either. I added my CC device manually since it didn’t show in inbox.

And today I’vegot my livingroom chromecast discoverd in inbox added that one and linked my channels to that one and things where going better now i can control volume from openhab but havn’t really got the playuri string to work properly anyone whos got an idea of how to make it.

In theory you send a URI to that channel and your Chromecast will play it. But Chromecasts can only play certain file types, what are you sending it?