I have not replaced anything for privacy. This is actuall log captured on my raspeberry pie.
I havenāt been tinkering with my ST for a while so Iāve lost touch with cast-web-api for about 4-5 months ever since I broke it when trying (and failing) to update cast-web-api to a newer version (prior to the 1.0.0 version). In any case, if you havenāt already found it, Iād suggest to use the Docker image from https://hub.docker.com/r/breadlysm/cast-web-api/. I use Synology and I set the image to auto restart while using the same network as the Docker host. Immediately upon running it, the logs recognized all my various Google devices.
Hi friends! Sorry for being a dodo. ; )
Can I kindly get some direction for setting this up on Raspbian? Thank you!!!
I tried to follow the instructions.
When I type ācast-web-apiā
I get:
-bash: cast-web-api: command not found
Full output:
pi@raspberrypi:~ $ sudo npm install cast-web-api -g
/opt/nodejs/bin/cast-web-api -> /opt/nodejs/lib/node_modules/cast-web-api/bin/cast-web-api
- cast-web-api@1.0.2
updated 1 package in 3.426s
pi@raspberrypi:~ $ cast-web-api
-bash: cast-web-api: command not found
pi@raspberrypi:~ $
Hmmmā¦ looks like the install went through.
Maybe just try:
/opt/nodejs/bin/cast-web-api
Sometimes on raspbian only full path works.
You are awesome, thank you!!!
It seems to see only 4 out of 7 devices but I will see if I can get it to work at all =D
*** never mindā¦ the smart app itself did see all of my devices upon setup. ; )
Is cast-web-api v1.0.2 the latest release?
Sadly it still isā¦
Iām using this with Webcore. Iām a noob here. Can someone kindly give me an idea how I would pass this an mp3 file stored locally on the raspberry pi I also happen to be running cast-web on? I imagine I have to have some type of http or ftp server running on the pi for a file to be accessible via an URL? Or is there some other way? Thank you!!
Exactly. You need an HTTP server, Iād recommend installing apache/httpd or nginx. Installation should be pretty easy, just google raspberry pi (your raspberry operating system) install apache. This guide should probably cover you. No need to install php, just put your mp3 files into the web server dir (eg. /var/www/html).
You can try it, by opening the http://ip-address/yourfile.mp3 your browser and it should start playing the file.
Now you can either put the mp3 file(s) urls into a preset, or play them through webCoRE.
Worked perfect, thank you so much! I really appreciate this community and people such as yourself for sharing their creations AND supporting them. So awesome, you rock!
That advice worked perfectly! This docker worked right away with the default settings on my UnRaid server.
Now, just to figure out if there is a way to remove the cast delay by keeping an always-on cast connection. I have 6 Google Home Miniās set aside specifically for whole house SmartThings alerts.
I really canāt thank you enough. Cheers!
Glad to hear it! I will disable my Docker since I really am not well versed in that kind of stuff and to stop messing up people who happen to find it. Cheers!
Iām having fun with this in webcore. Is there any way to know when an audio has actually started playing or close to it? Or any way to implement a āwait for audio to startā? (outside of webcore if necessary) Iām trying to synchronize the lowering of my projector screen with a popular cinematic intro theme sent to a chromecast audio connected to my av receiver. The theme happens to be the same duration as it takes my screen to lower. Itās really awesome. =D BUTā¦ the issue is that once the cast request is sent it is really hit or miss as to how long it takes until the audio to start playing. Sometimes the two are in sync, sometimes they arenāt. If I could know when the audio starts (more or less) then I could start the lowering of the screen at the same time.
It usually take about 4.5 - 5.5 seconds for the audio to start from the time of the requestā¦ but sometimes it lags out to 10+ seconds. Sometimes there is audio doesnāt start at all.
Ahhhā¦ lifeās problems right?
Thanks!!!
Sure, just create an if block in webCoRE. If status changes to āplayingā screenshot is attached.
Of course this would need to be wrapped in or perform some kind of āis this the lower projector activity?ā check. I guess you donāt want to always lower the project when something plays on that chromecast
Probably not easy or even impossible. Some info maybe:
- Load time varies by group size, internet/wifi speed at device location
- Devices are constantly connected to cast-web-api, just not the default media receiver needed to playback custom media and tts is open, because:
- You might be playing different media (spotifiy, tunein, etc.)
- And most importantly, cast receivers close after a certain timeout without any playback.
Hah, thank you!! So simple. It didnāt work yet, however. Iām not sure why this isnāt triggering.
I made simple pistons to test this status change trigger.
One to cast an mp3 and another to listen for the status change.
The mp3 starts playing, and this one does nothing.
āOffice Speakerā is one of my Google Home Minis.
I even tried the more generic āOffice Speakerās status changesā (to anything) and that didnāt trigger either.
Any idea why?
(the push notifications are working, I tested that) =D
Thanks again!!! =D
I think you have use Location, first, then, send push notificationā¦ Have you been on the webCoRE forum? They are very helpful
Thatās not correct. =D Iām no expert but I donāt need to use location to send push notifications. Thanks!
** correction **ā¦ if I open the editor it IS using location. It is there. The issue isnāt with the push notification. I can change the IF to anything that resolves to true and the push works. The issue is with this change status not firing for some reason? Thanks =D
Hi guys,
What is the best way to use tts through webcore. I was able to get the audio file to play but not get the message voiced.
why is the Smartapp saying v1.0.0 is the latest? Curiousā¦