(Alarm clock) Chromecast smb playback?

Hi again everyone :slight_smile:

I have a spare chromecast I haven’t used it so I don’t really no how they work

I would like too use the chromecast for an alarm

my idea in the morning OH could send a video file too the chromecast for playback and the video contains the wakup message ect

Can I store the video on a smb share (prefer) or do I need too upload too YouTube?

Or should I just use the audiosinc and use an audio file?

help and better suggestions or ways you sty alarms welcome

Yes, send the url to the chromecast on the chromecasturl channel
Or If I remember, I used to do that to send videos for islamic prayer times and these were stored in the OH html folder.


Thanks @vzorglub I will give it a try see what happens will post update

I do something similar with a ChromeCast Audio device in my bathroom.

When the shower gets hot, OpenHab2 sends a URL command that plays BBC Radio 2 from an MP3 stream.

Then when the shower cools, I send a short “Say” command to silence it.


I found the link to the BBC streams here :- http://www.suppertime.co.uk/blogmywiki/2015/04/updated-list-of-bbc-network-radio-urls/

Yes! Radio 2 anytime… :smile:

1 Like

Well, maybe not anytime.

I tend not to require a shower between midday & 5pm on weekdays :slight_smile:
Unless people are on holiday :wink:


I hope this helps someone :slight_smile:

I’ve been wanting to have options for the music streams that are pushed into a ChromeCast Audio dongle when our shower gets up to temperature.,


I have a Velbus input channel trigger, mapped to PRESSED and RELEASED to start and stop the music

I have a dimmer Item (created in PaperUI) which is used to store a choice (a number) which relates to the audio stream we want.

We have a selection item in HabPanel which uses this comma separated list :-

1=BBC Radio 2,2=BBC RADIO 4 Extra,3=Planet Rock,4=Absolute Radio

and a rule which plays the music source of our choice… IF the house is awake (so that it doesn’t play music at night) AND when the shower water flow is up to temperature.

var int bathradio = 1

rule "Bathroom Music"

	Channel 'velbus:vmb7in:c5053467:0B:input#CH1' triggered PRESSED // Input channel 1 of a  Velbus VMB7IN
	 bathradio = (BathroomChromeCastSourceChoice.state as Number).intValue // Set the bathradio variable to our choice
	//say("Source choice number "+bathradio, "voicerss:enGB", "webaudio") // My way of debugging

	if(House_Awake.state === ON){

	// say("Up to temperature while house awake", "voicerss:enGB", "webaudio")
	// say("Number"+BathroomChromeCastSourceChoice.state, "voicerss:enGB", "webaudio")

	// sendBroadcastNotification("Number"+BathroomChromeCastSourceChoice.state)
		if(bathradio == 1) { 
														say("Radio choice is number"+BathroomChromeCastSourceChoice.state+" BBC Radio 2", "voicerss:enGB", "webaudio")
														} // BBC Radio 2
		if(bathradio == 2) { 
														say("Radio choice is number"+BathroomChromeCastSourceChoice.state+" BBC Radio 4 Extra", "voicerss:enGB", "webaudio")
														} // BBC Radio 4 Extra
		if(bathradio == 3) {
														say("Radio choice is number"+BathroomChromeCastSourceChoice.state+" Planet Rock", "voicerss:enGB", "webaudio")
														} // Planet Rock
		if(bathradio == 4) {
														say("Radio choice is number"+BathroomChromeCastSourceChoice.state+" Absolute Radio", "voicerss:enGB", "webaudio")
														}  // Absolute Radio
	if(House_Awake.state === OFF){	say("Up to temperature while house asleep", "voicerss:enGB", "webaudio")	 }

What is particularly interesting is where I got the stream url’s from.

I found a site that offers PLS and M3U downloads,


like this for Absolute Radio :-


which contains a single line


But to look at another file for Planet Rock


this file contains


By visiting a client last week…

I discovered that this would have been so much easier if I had opted for Sonos speakers instead.

It’s just a matter of selecting the favourite (which can be done via OpenHab2) and issuing a Play or Pause command