SmartThings Community

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

Those shouldn’t still be called cast-web-device. Your API isn’t talking to SmartThings.

Can I ask what hub you’re using?

2 Likes

I’m using Blue Iris and tried the url you mentioned (as well as the content type image/jpeg and video/mjpg) but it just shows “SmartThings playback” followed by the cast icon. The url works fine in a browser but not as a preset or in WebCore. Has anyone else gotten this working and doesn’t mind sharing their settings?

1 Like

Do you have the authentication for blueiris set to external only? That’s the only thing that pops out to me that could be different in your setup.

could anyone advise how to update, the node js files on an adroid phone, i just noticed that the code has been updated in github, is there an easy way to refresh the files or does it do it automaticly?

whats pm2 can it be installed on android?

Ultimately, it ended up working as a preset after redoing it several times. I’m pretty sure I had a typo in my url :blush:. I never got playTrack working with the url in WebCore so I ended up using playPreset to make it work. Thanks for your help!

Using webcore, have you tried to capture the level attribute and then restore after your announcement

Something like:
image

I just set mine up, worked for my doorbell notification on initial test

1 Like

Hoping someone smarter than me can help… I’ve got node.js installed and followed the directions to run cast web. I got everything dealt with in the IDE. But from the app (classic), it can’t seem to discover any devices. It just spins and spins (15+ minutes, nothing). From the browser on my phone, laptop, and the pc running node.js it comes back with the list of devices. I’m at a loss. Can anyone help me? Preferably ELI5. I’m very new to node.js (as in, today), but I can follow instructions like a champ!

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:56 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:56 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:46 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:46 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:46 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:33 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:33 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:33 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:23 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:23 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:23 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:12 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:12 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:43:12 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:28 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:28 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:28 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:18 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:18 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:18 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:07 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:07 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:42:07 PM: debug Executing ‘getDevices’

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:41:57 PM: debug discoveryPage(), refresh

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:41:57 PM: debug Executing ‘sendHttpRequest’ host: 192.168.86.34:3333 path: /device

ae0eb7d6-05cf-45b8-b224-6c29a6f764ab 2:41:57 PM: debug Executing ‘getDevices’

It’s been a year since I looked at this, I was storing the level to a variable and then setting it back with unreliable results.
image

I’ll try this method of “capturing attributes” instead when I get a chance. Admittedly I have switched to using the Google Assistant Relay for the majority of automations, the ability to resume the streaming music was more important to my wife than setting the volume.

Thanks for the tip! :+1:

I have finally got it working and it is AMAZING! For anyone in the same situation I was (working, except for wouldn’t load any devices in smartthings), it turns out it was an issue with the configuration of wiring in our network closet. We are running on Google Wifi, which only has one ethernet port per mesh device, so we have switches, lots of ethernet switches. Apparently, for this purpose, the smartthings hub needed to be plugged directly in to the “router”, or in this case, one of the mesh devices. Good news is, it can be plugged into any of the devices, doesn’t matter where on the network, and in my case, it made the hub easier to access when I need to set up new things. After moving the hub and letting it fully restart, I restarted one of my GHs (recommended by some amazing person like 200 pages up…) and like magic, it worked. I hope some poor newbie like me finds this useful!

Side note, the “donate” link at the bottom of the instructions for Windows is broken, but if you use the navigation on the upper right, it can be found under “more”.

1 Like

Yes pm2 is much better. Thought about integrating it in a future version.

1 Like

Thanks everyone for giving support! If theres anything still unresolved either pm me or reply here again.

Sadly I had a lot of things to do recently, so I didn’t have much time for ST.

There’s a new version of cast-web-api in the express branch, that really tackles reliability. In the next days I’ll merge it into v.1.1.0 and then into master.

3 Likes

Thanks for all your hard work!! :+1:

1 Like

I’ve been poking around with it a bit (pulled it from express) and so far no crashes. (I have crashes intermittently on 1.0.0.) Nicely done.

1 Like

How did you get the presets and volume on the action tiles

Create a shortcut - the URL should look like this:
http://your.domain.here:3000/device/112A6A03-1212-4C30-8101-54B8AFC3A072/volume/25

The long ID between “device/” and “volume” corresponds to the cast group ID. The number that appears after volume, like “25” is a percentage, with 0 = mute and 100 = full volume.

2 Likes

Thanks. That works great

I have cast-web installed.
How do I use TTS?
I have webcore installed if needed.

I tried this in webcore:

Getting this in the log but nothing happens…
2019-03-01 18:02:22 +687ms
+2ms ╔Starting piston… (v0.3.109.20181207)
+526ms ║╔Subscribing to devices…
+618ms ║║Subscribing to Nelly Home…
+619ms ║╚Finished subscribing (103ms)
+648ms ╚Piston successfully started (647ms)

Do you have a Google home device discovered in SmartThings from the cast-web-api called Music Player 2?

If so, that should be working. You can read the thread to find ways to manually test the API. You might have a problem there.

I cannot spot anything obviously wrong with this piston. Maybe try the default ST tts app? I think it was called speaker companion, don’t know if its still called like this.

Is there not even the chime? Did you enable/disable GoogleTTS?

Also go into the ST app open the Music Player 2 device, tap the settings wheel and set debug logging to 4. Then you can go to the ST IDE > live logging and whenever you try to do tts, there should be log lines you can post here.