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

dth_av
requires_server
project_av
chromecast
googlehome

(Matt Behnken) #311

I’m assuming the “test api connection” in the ST app also just spins? Or any error?


(Tobias) #312

Outdated API could be at fault here. Latest API version 0.2.3, latest DTH/Service manager version 0.2.

If you’re running version 0.2 of the DTH you need to have API 0.2.3 and up. Since the new DTH calls a new API feature for short playback TTS messages that was only added in API v0.2.3. If you run and older version of the API, it simply doesn’t know what to do with TTS messages.

Double check, coz everything points to an outdated API as mentioned above.


(Rejiofoh) #313

Greetings, Apologies I’ve been out for a bit due to a death in the family. Yes, the app just spins and doesn’t find anything and there is no error. When I put in DEBUG and try the app, it doesn’t show any communication at all on the “server” (when in debug mode from a browser I see a lot of activity).


(Tobias) #314

I’m sorry to hear of your loss.

Have you investigated your network? How is the Hub connected to your router and your router to your mac?


(Rejiofoh) #315

Thank you…

Yes, I took a look at the network connections. Is there a Firewall setting I should be looking at? I have the ST hub and a Hue bridge connected directly to my FIOS modem. My Mac is connected using wifi to the same FIOS modem. I also install the node.js on a Windows 10 box and was able to communicate using the browser on the cell phones and computers on my home network. But still nothing (no communication) from the cast-web app in ST. Since its working for others, I must have installed the node.js incorrectly (I have done about 4 clean installs but maybe they are not as “clean” as I thought).


(Satish P) #316

@vervallsweg Is the Restore and Resume methods works in the implementation? While I play the music from streaming sources (pandora, google play music, youtube music etc) on my Google Home the music is not resumed after playing the notification sounds… I see in the cast-web DTH has comments on //TODO but looks like all these methods only use PlayTrack… Are you planning to release this feature of resume & restore in future?

Thanks

def playTextAndResume(message, level = 0, thirdValue = 0) {
    logger('info', "playTextAndResume, message: " + message + " level: " + level)
    //TODO: resume playback to previously playing track
    playText(message, level)
}

def playTextAndRestore(message, level = 0, thirdValue = 0) {
    logger('info', "playTextAndRestore, message: " + message + " level: " + level)
    //TODO: Reset level to level before the message was played
    playText(message, level)
}

def playTrackAndResume(uri, level = 0) {
    logger('info', "Executing 'playTrackAndResume', uri: " + uri + " level: " + level)
    //TODO: resume playback to previously playing track
    return playTrack(uri, level)
}

def playTrackAndResume(String uri, String duration, level = 0) {
    logger('info', "Executing 'playTrackAndResume', uri: " + uri + " duration: " + duration + " level: " + level)
    //TODO: resume playback to previously playing track
    return playTrack(uri, level)
}

def playTrackAndRestore(uri, level = 0) {
    logger('info', "Executing 'playTrackAndRestore', uri: " + uri + " level: " + level)
    //TODO: restore
    return playTrack(uri, level) 
}

def playTrackAndRestore(String uri, String duration, level = 0) {
    logger('info', "Executing 'playTrackAndRestore', uri: " + uri + " duration: " + duration + " level: " + level)
    //TODO: restore
    return playTrack(uri, level) 
}

(Tobias) #317

If you’re (as said) connected to the same network there shouldn’t be. Also works from other clients.

Well if it doesn’t work there either, it’s definitely a hub connection problem. Can you maybe try to find the ip of your hub and then ping it from your mac. You should be able to lock up your hub IP in the IDE in the hubs tab. Then open a command prompt on your mac and type ‘ping -c 5 {ip-address-of-your-hub}’.

I’d almost bet it’s not your install. Theres not much magic to the API. If it works from one of your clients, it works for all of them.


(Rejiofoh) #318

Going to do another clean install. Have to “reimage” Mac anyway so will let you know how it goes in a bit. working on it now…


(Tobias) #319

Yes and no. It will be supported soon, but only for presets or any other media that was played through ST.

Will probably never work. The cast protocol just doesn’t allow it. Even if you get one service to work, as soon as they change something (and they sure will) it wont work anymore.


(Tobias) #320

Hm okay. Try pinging the hub first though. Since the Hub only needs an internet not local network connection to work, you may never notice that it isn’t connected properly.


(Satish P) #321

Got it @vervallsweg. Thank you. By the way I am trying to work with the Presets and could you help providing any documentation on how to configure it… Meaning how can i set it up with playing content available on my network or content available on internet…


(Rejiofoh) #322

Thanks. I reinstalled node.js and still had the issue, I reset the ST Hub, my router etc and it is now working. The issue might have been the hub the whole time. But I am up and running now. Just need to read through and figure out the presets etc. Thanks for all the help. I Appreciate it.


(Tobias) #323

You reset your hub? :flushed: Wow that’s commitment :smile:

Good that it’s working now, have fun!


(Ryan) #324

I’ve tried searching through this but can’t find any info for updating the API. I’m sure it’s a simple GIT command but could you help a brother out here?


(Tobias) #325

Are you on windows or linux/mac?


(Ryan) #326

Linux (Raspberry Pi).


(Tobias) #327

Sure you just need to know the directory you installed the API to and how you run/stop it.

If you run it with forever (forever start {api dir} --hostname={host}) you need to run the same command with stop: forever stop {your dir} --hostname={host}. If you start/stop it manually make sure the api is not running.

  1. change into the directory where you installed the api: cd {your dir}
  2. run git pull
  3. npm install
  4. Done

Again if you’re using forever run it with forever start {your dir}

PS: the next version will be easier to install/update.


(Ryan) #328

Thanks…I think I’ve got it.

What are the different log levels? Should it be at 0 for everyday operation?


(Tobias) #329

Was about to post the instructions you probably followed for installing it in the first place :slight_smile: https://vervallsweg.github.io/smartthings/cast-web-installation-guide

Yes 0 is fine, just means it doesn’t log. So the logs not spammed with info that nobody needs. If you have a problem with a device you can change the log level to 4 and post the IDE log output here that I know what’s going on.


(Ryan) #330

You rock!!! Thank you!!! :+1: