SmartThings Community

[RELEASE] cast-web 1.1.0 - Chromecast Device Handler & SmartApps

dth_av
requires_server
project_av
chromecast
googlehome
#899

I have not used docker. Will try and update here. Thank you.

1 Like

(Tobias) #900

That uses broadcast. Use the speak() command on the ‘cast-web-api’ device in your ST app, after you set up the assistant part. Only speak and audio notification capabilities, not music player.

Standard cast feature. Use any of your cast devices in your ST app, not the cast-api-device. Use the old music player capability for ST TTS and speak, audio notification if you want to use the Google TTS voice.

Will come back to the rest tomorrow. Also just made the video for the assistant, still need to cut it though.

0 Likes

(Sat Pab) #901

Thank you @vervallsweg for Quick reply. So I should enable GH broadcast for text to speech motivations correct???

For siren implementation, are you saying I should send a track or mp3 file that has siren sound? I am actually talking about ALARM capability exposed by Smartthings. Can we have the cast-web-device implementing the ALARM capability like LANNouncer or AEOTEC Sirens?

0 Likes

(Tobias) #903

I published a video on the website. Somehow the website doesn’t deploy right now. Whenever it feels like it, the video should be here:
https://vervallsweg.github.io/cast-web/google-assistant-integration/

raw video here: https://www.youtube.com/watch?v=f1ij_c2I4Ms

0 Likes

(Craig McFarlane) #904

Guys.

I am following the notes in the web link below.

When i get to the section about starting this in the background running the command

forever start ‘which cast-web-api’

I get the error message

Cannot start forever
script /home/pi/which cast-web-api does not exist.

Any ideas?

running cast-web-api seems to work as i see

cast-web-api v1.1.0
cast-web-api running at http://IP-ADDRESS-HERE:3000

0 Likes

(Sat Pab) #905

@vervallsweg Thanks a ton for the video and quick turnaround to help. This is exactly the same procedure I followed until copying the client id and secret and after I click DONE button, the authorize button is not getting enabled and still in disabled mode.

Something went wrong here. I will try this procedure again and see what happens and update you.

0 Likes

(Craig McFarlane) #906

Hello. I think with the exception of the forever start ‘which cast-web-api’ issue i have everything setup.

I have connected it up Google assistant and i can see the devices in ST. Is there any guides or how to on getting the Google Home to say text?

I am looking to use contacts sensors so that when they are open Google home will announce it. I think im close but feel i am missing some infor

Thanks in advance

0 Likes

(Craig McFarlane) #907

Actually. Not to worry. i fired up web core and can see the devices. Sent a test speak test and it works to the Google home i specify. Fantastic!!!

1 Like

(Sat Pab) #908

@vervallsweg I tried one more time and no luck. I dont see the authorize button being enabled after i copied client id and secret and click save…

0 Likes

(Aesgarth) #909

I just want to say a thank you to @vervallsweg for the work he’s put in on this. I’ve just updated, and while the process was not without issues (I don’t know what the problems were, or how I fixed them, sorry, it just took a few attempts to get it running right) It’s now working brilliantly.

Thank you.

1 Like

(Tobias) #910

Yeah just run which cast-web-api. It should return a value, something like /usr/bin/cast-web-api . Then just run forever start (whatever directory the first command returned).

0 Likes

(Tobias) #911

That’s probably a permissions error. When you copy and paste client id/secret, the next button should turn green right?

After it did that, try reloading the website in your browser. After a reload, is the next button of client id/secret still green or back to blue?

0 Likes

(Craig McFarlane) #912

ahhhhhh I see. I will try that when i get home. Thanks mate. The solution has been fantastic and really happy to be able to send speech to an individual Google home rather than all of them.

1 Like

(Sat Pab) #913

@vervallsweg I want to make myself clear on what you have asked me to check.

There is a SAVE Blue button right next to client id and secret boxes under step 2 which is setup your client id and client secret section. I have copied the client id and secret from google setup and clicked the save button that turned as GREEN DONE button. But the authorize button still greyed out and i cant click it.

I did reload the web page after I saved the client id and secret, i see it turn to BLUE SAVE button with the client id and secret boxes empty. While reloading the page, i see a red box which says “Error has occurred. NO error message provided” and disappears.

But in your video after you copied both these client id and secret and press save button, the authorize button turned dark grey and you are able to click it. It is not happening for me.

I believe its hitting a failure after I click the save button… I did debug of the page and after I click the submit button the page is invoking the URL http://:3000/config/assistant/tokenUrl/

and I dont see any folder on my system tokenUrl. U think the google-assistant is not installed properly? I tried to install it multiple times with sudo npm install google-assistant -g —unsafe-perm…

After the url is invoked, there is no response so, the page is getting timeout and the Authorize button turns RED…

0 Likes

(Alwas) #914

What do you get when you put http://YOURIP:3000/config in your browser?

1 Like

(Alcopop2006) #915

Hi, I had everything working when I first set this up a good few months ago. I had the Node JS running from an android tablet but I just found it to be too inconsistent so stopped using it. I was hoping to get a raspberry pi and install it on there at a later date but I’ve just tried to remove all the cast-web-api devices from my phone and using the SmartThings api but I can’t seem to remove them :frowning: … My device list is littered with cast-web-devices that when I go into them they cause my app to restart :frowning:

1 Like

(Sat Pab) #916

2019-03-16_15-35-22

0 Likes

(Mark C) #917

Im struggling on android how do i implement your fix of
sudo npm install google-assistant -g —unsafe-perm

To install cast-web-api with all dependencies from the get go also add the same flag:

sudo npm install cast-web-api -g --unsafe-perm

1 Like

(Tobias) #918

Ooof… I really don’t know, will check on friday. It is possible though that theres no fix for android…

0 Likes

(Tobias) #919

I’d just assume its a permissions error. I put together this help page a couple of days ago. Hopefully this helps…

0 Likes