dcabanero
(David C.)
March 29, 2018, 4:02am
1
Hi,
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)
2 Likes
zbot473
(zbot473)
April 3, 2018, 7:23pm
2
Nice.
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.
zbot473
(zbot473)
April 3, 2018, 7:47pm
4
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
zbot473
(zbot473)
April 4, 2018, 4:13pm
6
I might try to file a PR in the future, once I find out how the chromecast playback is stopped.
ads
(Andreas)
January 12, 2019, 5:10pm
8
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.
2 Likes
Daniel_O
(Daniel O )
January 25, 2021, 1:36pm
9
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?