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



Ok I got it working. For anyone who wants to add their Blue Iris cameras to the presets of Cast Web here are the steps:

You will need to manually edit the preset since the generator doesn’t have any content types other than video/mp4 and audio/mp3.

set your MediaType as image/jpeg
Make sure you have the web server enabled in Blue Iris
the mediaURL will be http://BLUEIRISIP:PORT/mjpg/CAMERASHORTNAME/video.mjpg
All the other stuff in the preset is optional info.

(Scott Bronder) #642

I have everything running and then go to the app, choose my apps, choose Cast Web, enter my ip and then discover. It finds my 8 devices, however when I go to select them and click done it goes back to the discovery page and just finds everything again. This is a never ending scenario. I can select “next” and then “save,” but then I Just get an error. “Error - bad state. Unable to complete page configuration”.

Any ideas what I’m missing here?

(Craig Bennett) #643

Is anyone else getting the following error?

discover(): exception while prcessing service: TypeError: Cannot read property ‘0’ of undefined

This has started recently out of nowhere. It basically doing it after discovering the devices and the system isn’t working. I’m going to test it later, but I was just wondering


I just updated from v0.1. Installation went smooth, was nice having the walk-though this time :slight_smile:. Unfortunately I can not view any of the new cast devices I have added to my “things” list. Everything on the backend seems to be running fine but when I select a cast-web-device my ST classic app shows a white screen then crashes!

Anyone had this happen?

Argg should have listened to myself, if it ant broke dont fix it…

(J) #645

I followed directions and installed everything according to directions on the always on computer (on network) as well as the smart app and device handlers.

My home network is on so I set my ip in the smart things app to the ip.

If I open the IP of the cast-web-api server:3000 I see the message with the version.
I can access this ip anywhere from any device on my network.

However, in SmartThings App I do device discovery, but it doesn’t find anything.

Chromecasts or Google Home no found. Any ideas?


I think V 1.0 is just broken right now.

Does anyone know where the v0.1 install instructions are?

(J) #647

When I run cast-web-api it runs and discovers my two devices right away.
I close that command prompt, and run: forever start CastWebApi.js

The ip works when going to a browser window.

However, in the app Testing the api doesn’t work nor does Discovery of devices in the app.


in the smartthings app did you set the ip to yourharmonyapiIP:yourport

typically the port is 3000 so an example would be

(Craig Bennett) #649

I think I fixed my problem by doing the
npm install cast-web-api -g

(Frank Walsh) #650

I’m experiencing the same problem. The devices all show up if I visit:

but all show up as disconnected:

[{“name”:“DESKTOPPC”,“connection”:“disconnected”,“address”:{“host”:“”,“port”:8009},“status”:{“volume”:0,“muted”:false,“application”:"",“status”:"",“title”:"",“subtitle”:"",“image”:""}},{“id”:“9cdb2553d965a661e644dafb0e6ccc39”,“name”:“Office Speaker”,“connection”:“disconnected”,“address”:{“host”:“”,“port”:8009},“status”:{“volume”:0,“muted”:false,“application”:"",“status”:"",“title”:"",“subtitle”:"",“image”:""}}]

And none of them show up in the SmartThings app.


Has anyone resolved all devices showing up as “cast-web-device” when added to the things list?

(J) #652

Yes ip:3000

Just tried this:

and they show as disconnected as well. Is it supposed to show as connected?

(J) #653

I have this output as well.

(Frank Walsh) #654

OK, I was able to determine what the problem was. Once I added the app, I could see in the App Logs on Level 4 that I was getting this error:

error java.lang.IllegalArgumentException: Maps with null keys can’t be converted to JSON

e4acff04-c7f8-4a1b-b6e7-6755fd53c0ee 6:07:17 PM: debug devices: [null:DESKTOP, 9cdb2553d965a661e644dafb0e6ccc39:Office Speaker]

e4acff04-c7f8-4a1b-b6e7-6755fd53c0ee 6:07:17 PM: debug index 0: DESKTIOPPC, null

I did a quick look and it looked like for some reason my VMWare Workstation Virtual Adapter was being detected as a device, once I disabled that adapter, I was able to get the code to produce a valid JSON on a /devices call, and then was able to add my device.

(J) #655

debug discoveryPage(), refresh

debug Executing ‘sendHttpRequest’ host: path: /device

debug Executing ‘getDevices’

My logs just keep repeating

(J) #656

It works when I issue commands via http.

(J) #657

In addition, I’m not able to remove the Smart App from ide. Reinstalled device handlers, but couldn’t delete SmartApp.

(Sat Pab) #658

@vervallsweg I have installed all this on RaspBerryPi and i am running the node module js. But the service keeps going down. Here is the log generated when the service is STOPPED…

Let me know if you could help.

2018-11-14T00:13:41.457Z discover(): exception while prcessing service: TypeError: Cannot read property ‘0’ of undefined
throw errnoException(err, ‘addMembership’);

Error: addMembership ENODEV
at _errnoException (util.js:1022:11)
at Socket.addMembership (dgram.js:614:11)
at Socket. (/usr/lib/node_modules/cast-web-api/node_modules/mdns-js/lib/networking.js:97:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at Socket.emit (events.js:208:7)
at startListening (dgram.js:156:10)
at _handle.lookup (dgram.js:273:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
error: Forever detected script exited with code: 1
error: Script restart attempt #1
cast-web-api v1.0.2
Discovering devices, please wait…
… done!
throw er; // Unhandled ‘error’ event

at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1334:19)
at listenInCluster (net.js:1392:12)
at doListen (net.js:1501:7)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:686:11)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
error: Forever detected script exited with code: 1


Unfortunately I think this project has fizzled out, check out Assistant Relay. I was able to get the latest version up and going quite easily. [Release] Google Assistant Relay V2.0 - Google Home Audio Notifications!

(Tobias) #660

Hmm… interesting, I don’t think I ever tried that. You can play media that contains ä(…) through presets so I’d assume the bug is in the Google TTS implementation. I’ll give it a try!