Chromecast?

Oh that's really nice. I'm going to have to investigate implementing that here.

There are some tweeks to the default drivers included in the implementation posted here on the forum. I post them when I get a chance over on the cast-web-api thread.

I think that's the biggest advantage of the cast-web implementation, you can edit the drives. With anything built in, it's locked and you are SOL.

1 Like

That's great Ryan. Thank you.

1 Like

Can't seem to find your current repo for the cast-web-api app/driver?

Read my post again

Waiting for database rebuild to start so I can test a Homebridge app beta. I installed cast web api, but I'm already using port 3000. How do I set the port in cast web?

[Edit] NM, I changed th port on the other app instead. Runs, but I get a crash after a few minutes or almost always after reading running the test of the connection. I’m using the app and drivers tweaked for HE. Probably the older Node version I’m running on the MacBook. Will have to put it on a RPi when I have more time.

I was using cast-web and was hoping the built in integration would eliminate it (mostly because I don't do a lot of announcements) I had initially tested the volume control and it worked (probably because I wasn't waiting long enough) so looks like back to cast web I must go! Pretty sure it's still running on the PI... (crossing fingers)

is it possible to play an audio file using Chromecast? I am thining of using it to play a siren sound for smoke detector or gas detector alerts.

Yes. But the file has to be hosted on a webserver accessible by the GH device. Then, in the edit device window, input the url of the sound file under "Play Track" and it should work. A good place to host the files is Github although, then the hub needs internet access to play the sound file. Otherwise you would have to run your own web server.

Hmm. It just so happens I have a raspi running a webserver for some tablets I have around the house.

I am assuming I need to create a virtual Chromecast device? So I got a mp3 file and uploaded it to the root folder of my local webserver. I created a Chromcast Audio Virtual device. In the Play Track I entered http://192.168.1.51/siren.mp3, went to save preferences and no errors but the entry is gone. putting the url into my browser plays the audio. Am I missing a step?

Another question comes to mind. If I have 3 Home Mini's how do I send the same audio to all three?

Did you install the Chromecast Integration App? It will discover your Chromecast devices automatically and allow you to select which ones you want to have the app create child devices for in Hubitat. You should not manually add virtual devices when using the built-in Chromecast Integration.

Yes I have the integration installed and it did discover all three of the Minis. I have them already announcing TTS for door opening, etc. All I can do in the Integration APP is discover the devices. How would I create child devices and do I need to make one for each device for each different audio file I want to play?

The child devices are created automatically by the app. Just look in your list of Devices and you should see them in the list. Then use these devices in your automations.

I have never tried to make them play a specific mp3. Looms like @Ryan780 has provided the instructions earlier...

In RM 3.0, you could use a ‘Custom Action’ to call the Child Chromecast Device’s “playTrack()” command, passing in the text url of the mp3 file to be played.

Yes I see what you are saying, I am already using them for TTS I was thinking that a new device was needed to play the audio file each time it was used in a rule. That's why I created a virtual Chromecast device Maybe Ryan780 can elaborate on how he makes it work

See the last section of my previous post for an option on how to automate playing an mp3 from RM 3.0.

Have you tried copying and pasting in the url of the mp3 file directly into the Device detail page’s Play Track command?

As an example, I just found an mp3 sample online and pasted the following url into the text box under the Play Track command for one of my Chromecast devices. Then clicked Play Track. It worked fine.

https://ia802508.us.archive.org/5/items/testmp3testfile/mpthreetest.mp3

I didn't see the last section of your post until now. I will give it a try, Thanks

I am able to play the track as you were. Now to get a custom command to play it at the right time

1 Like

Not all of us are on the same schedule (or in the same time zone). So, sometimes you have to give folks a few hours to get on to answer your question. :slight_smile: