Chromecast Widget


Here you guys have a HabPanel widget to control your Chromecast. It has a lot of room for improvement though!

I have created a post on how to create the widget in case anyone is interested.

Tutorial to build the Chromecast Widget

Suggestions are welcomed!

Chromecast.widget (3).json (5.0 KB)



Is it possible to add a stop button for the playback, or is that just not supported?

Hi Mihir,

Let me see if I can capture the stop event and add it to the widget.

if the Binding allows it, it should be possible.

Read this
I think that should help, but its kinda hacky.

Hi Mihir,

I have checked and stop is not supported by the binding, not yet at least.

I didn’t love the idea of sending null to the item so I have created an additional parameter to send an image to chromecast…at least it will look better.

I have put an Openhab image as the default one but you can change it.

1 Like

I might try to file a PR in the future, once I find out how the chromecast playback is stopped.

Small update for this widget: the update handles not only UNDEF but also NULL values:

<div class="col-xs-12" ng-if="itemValue(config.title) !='UNDEF' && itemValue(config.title) !='NULL'">	<h4>{{itemValue(config.title)}}</h4></div>
<div class="col-xs-12" ng-if="itemValue(config.seriesTitle) !='UNDEF' && itemValue(config.seriesTitle) !='NULL'">	<h4>{{itemValue(config.seriesTitle)}}</h4></div>
<img src="{{itemValue(config.image_url)}}" class="img-thumbnail" ng-if="itemValue(config.image_url) !='UNDEF' && itemValue(config.image_url) !='NULL'"></img>
<img src="{{(config.default_image)}}" class="img-thumbnail" ng-if="itemValue(config.image_url) =='UNDEF' || itemValue(config.image_url) =='NULL'"></img>

Also the default value for “default_image” does no longer exist.


Hey there, trying to import this from the widget gallery I get the message to report that the file is missing.

I assume that this is due to the (3) in the filename?