SmartThings Community

[RELEASE] cast-web v1.2.1 - Chromecast Device Handler & SmartApp

Hi vervallsweg, do you think is possible run your code using a cldou service?

Cloudno.de offer for free a box to run a node.js app.

I’m not an expert at all , but i would like to have TTS without using a third device like Raspberry.

Can you please check it?

Thanks
L

Sadly it isn’t. Chromecast communication is only in lan. Unless you basically expose every chromecast outside your lan, you can only communicate with them in your home network. Sure somehow you can hack that together but it would be really insecure and not good solution.
Your only hope is 1: ST allows more code execution on the hub (I don’t see that happening, who know if the hub apis will be around a year from now) 2: Google might allow cloud control of chromecast devices.

Personally I believe google is hard at work on that. They added the ability to launch receivers and media playback from the cloud already, sadly not public, internal google only. Having full playback control from the cloud would be the next logical step. Check out the new Google Home app, it is basically like ST. And in all honesty as soon as the Google’s Home app is a decent smart home platform, I’ll be leaving ST.
The complete lack of any communication about new hub apis is just unacceptable. Googles Smarthome stuff is better documented then ST right now… or what feels like over a year now.

2 Likes

ThAnk you for your answer Tobias you are a very kind person

2 Likes

The best would be to allow DLNA capabilities

Thanks, I tried everything mentioned in the FAQ. I’ve also disabled the firewall on my API host, router firewall and tried different ports. Do you know how others have resolved this?

Hallelujah I got it to work!! Turns out my second NIC must have been causing issues, I disabled it even though it wasnt being used by anything and sure enough everything fell into place.

1 Like

Thank you! Simple thing. My SmartThings hub was in front of my mesh network on different network. Fixed it.

1 Like

You mean that Google adds DLNA to the chromecasts/ google homes?

Yes it is, that’s the best solution. In this way you can use a DH already working for generic wifi speakers

2 Likes

Just looking at this for the first time.
I have multiple Google Home devices that I think could be coerced into ‘speaking’ or making a preset sound from Smartthings. Can anyone confirm this is possible?
If this is, does anyone have a link for an instal package of node.js that I can install on Windows 8. I have a ?NUC that runs Blue Iris video software and I’m thinking that this device could also run Node.JS and act as the necessary fixed ip relay device?

All help appreciated.

Yes thats possible with cast-web. Install instructions (including windows) are available on the project website: https://vervallsweg.github.io/cast-web/installation/

That’s great.
This looks really straightforward.
Look forward to playing with this.
Thanks for your help.

1 Like

Hi I am getting the following on windows…

cast-web-api v1.0.2
Discovering devices, please wait...
... done!
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 192.168.0.106:3000
    at Server.setupListenHandle [as _listen2] (net.js:1286:14)
    at listenInCluster (net.js:1334:12)
    at doListen (net.js:1460:7)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at emitErrorNT (net.js:1313:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)

That means the default port (3000) is already used by a different application on your computer. Either stop that program or change cast-web-api’s port with the --port=xxxx parameter. More info in the docs.

Given the fact that there is another project solely dedicated to the assistant stuff I would think this would be totally okay. I use your project for TTS, presets, etc. Is there a reason you haven’t merged 1.1 to the master branch? I’m still on 1.0.2 and it crashes alllll the time. I don’t think it deals well with devices that turn off frequently (chromecast audios or chromecast videos that are attached to the power ports of amplifiers and are often not present on the LAN) that are also part of speaker groups.

Would more people be on 1.1 if the website or branch had updated installation procedures? I’m missing something because when i run 1.1.0 it doesn’t attempt to discover devices according to the output when it starts up. I gave it the DNS library dependency it wanted but maybe that’s the problem.

Thanks,
I have the jsnode app running but no devices are found. API returns { “cast-web-api” : “v1.0.2” } if accessing from a browser and Connected OK: 200 from the smartapp.

Any ideas what could be wrong?

I was being a bozo. I figured out my issues. Thanks. Everything is working great!

1 Like

Does it list devices in your browser if you add /device/ to it?

Yeah but if you want both you need two different api devices thanks to ST’s platform limitations.

How? Like the whole api goes down? :astonished:

Yeah I’m working on that…

Just got this up and running last night… Its an impressive addition that I’m pretty excited to dig into… but are there are other resources or documentation that I can use to give me some ideas of what all I can do and what I can accomplish? Any tutorials available? So far I’m basically just using it to do text to speech on triggers (which took me a good 15 minutes to figure out how to do).