SmartThings Community

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

dth_av
requires_server
project_av
chromecast
googlehome
(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.

(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

(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!!!

2 Likes
(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…

(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).

1 Like
(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?

(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…

(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

(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…

(Tobias) #919

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

(Tobias) #920

Hmm… have you tried removing the service manager first?

After you removed that, all the devices should be gone as well, since they’re parent devices. The’re ‘chained’ like this 1 cast-web service manager > 2 cast-web-api > 3 cast-device.

(Sat Pab) #921

thank you @vervallsweg. Are you saying that the cause of my error could be the access to this directory " /lib/assistant ?? I can change the perms and check and let you know what happens…

1 Like
(Alcopop2006) #922

Yeah, managed to sort it out now thanks. It mostly seemed to sort itself out one I’d revisited it.

1 Like
(Sat Pab) #923

Thank you @vervallsweg for a quick turnaround. Yes this is fixed now. So I had to change the perms of the directory. Now I have completed the GA setup.

Why do we need to run sudo npm install – ?? This is installing all the directories of node modules and cast-web-api as root which could be the problem of any other user running cast-web-api unable to write to these directories.

I am running cast-web-api on raspberry pi, FYI.

1 Like
(Jesse Cotten) #924

I am trying to get this working again after doing the update from 1.0 to 1.1 and it will not find any devices now. If I test api connection it comes back with Connected ok:200 which is what it did before but then when I discover devices nothing ever shows up. I did use the “setup the google assistant with cast-web to broadcast messages” button and put in the the info for it which I did not do on the previous version so I though that may be the problem, but now that I put it in I cant clear it if I go in every thing is check marked and says done, any advice here?