[RELEASE] cast-web v1.2.1 - Chromecast Integration (EDGE Driver discussion begins in post 1668)

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.

1 Like

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?

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…

1 Like

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 10.0.0.1 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?

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 192.168.1.155:3000

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

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

http://192.168.0.200:3000/device

but all show up as disconnected:

[{“name”:“DESKTOPPC”,“connection”:“disconnected”,“address”:{“host”:“192.168.8.1”,“port”:8009},“status”:{“volume”:0,“muted”:false,“application”:"",“status”:"",“title”:"",“subtitle”:"",“image”:""}},{“id”:“9cdb2553d965a661e644dafb0e6ccc39”,“name”:“Office Speaker”,“connection”:“disconnected”,“address”:{“host”:“192.168.0.101”,“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?

Yes ip:3000

Just tried this:
http://10.0.0.21:3000/device

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

I have this output as well.

1 Like

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.

1 Like

debug discoveryPage(), refresh

debug Executing ‘sendHttpRequest’ host: 10.0.0.21:3000 path: /device

debug Executing ‘getDevices’

My logs just keep repeating

It works when I issue commands via http.
ie: http://10.0.0.21:3000/device/$deviceid/volume/50

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

@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
dgram.js:614
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!
events.js:183
throw er; // Unhandled ‘error’ event
^

Error: listen EADDRNOTAVAIL 192.168.1.2:3000
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!

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!

1 Like