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

Your response helped me figure out what happened.

I used a docker container to run the server but it hadn’t been updated since server version 0.2.2. I installed that on the server and assumed (badly) that it was up to date. Then when I installed the DTH and App, there was a version mismatch.

I went back and created my own docker container that keeps itself up to date with the latest code and used that. Now everything works a treat. thanks!!!

1 Like

I tried installing this today and received the Error - bad state. message in the smart app. everything seems to be running and communicating but I cant add the discovered devices. Any ideas?

The node is running fine but I noticed some strange output. ‘Cannot read property ‘0’ of Undefined’ being thrown constantly.

Any idea or is this normal output? Looks like it’s only during discover devices maybe mdns responses idk.

1 Like

Did you install both device handlers in addition to the smart app in the ide?

@vervallsweg For some reason it detect many devices as duplicate. Is this a known problem? It first add several cast-web-device by ip adress, after that it add the named devices with hashes. Previously no devices were added with generic name cast-web-device and ip adress.

Thanks

Yep, I installed all three and published. Running the JS node on a Windows computer and the app to detects all six devices. once I select them and click save I get the red banner with the error

I just installed everything from the website. The app finds no devices after 10 minutes.

Yes, sadly.

Exactly. The mdns-lib I’m using has certain ‘issues’. I guess it’s receiving responses from not Google Cast devices and cannot parse the Cast info then. If it’s annoying I can just filter that message from the logs. I’ll switch mdns-lib soon (again). The new lib shouldn’t have theses issues. Let’s see which one I implement first :sweat_smile:

Open the live logging in the IDE, set the log level to 4 in the service manager, try again and post the output here :+1:

Open your browser, type http://{api-api}:{port}/device and post the output here.

No sir :joy:

It should do neither. Do you mean the name by that or dni?

Like before you installed it there were no devices installed? Don’t what you mean :sweat_smile:
Normal behavior would be after intstall devices show in the ST app as cast-web-device . After waiting a couple of seconds or doing a manual refresh the correct name is pulled from the API.

Using Live Logging, I get a lot of this with incremental indexes. No devices are found.

8efbe492-c541-4191-9a0c-ddc7cd261917  11:13:07 AM: debug devices: [:]
8efbe492-c541-4191-9a0c-ddc7cd261917  11:13:07 AM: debug JSON rcvd: [], JSON.size: 0
8efbe492-c541-4191-9a0c-ddc7cd261917  11:13:07 AM: debug Parsing 'index:78, mac:18A905BF952D, ip:C0A856E3, port:0BB8, requestId:e08efa96-7689-4db9-b161-4fe79bfc2604, callback:true, headers:SFRUUC8xLjEgMjAwIE9LDQpDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL2pzb247IGNoYXJzZXQ9dXRmLTgNCkRhdGU6IFNhdCwgMjEgSnVsIDIwMTggMTY6MTM6MDYgR01UDQpDb25uZWN0aW9uOiBrZWVwLWFsaXZlDQpDb250ZW50LUxlbmd0aDogMg==, body:W10='
8efbe492-c541-4191-9a0c-ddc7cd261917  11:13:07 AM: debug discoveryPage(), refresh
8efbe492-c541-4191-9a0c-ddc7cd261917  11:13:07 AM: debug Executing 'sendHttpRequest' host: 192.168.86.227:3000 path: /device
8efbe492-c541-4191-9a0c-ddc7cd261917  11:13:07 AM: debug Executing 'getDevices'

Thats also true if you open the address/device/ in your browser right?

On which OS did you install the API? Might be an mdns/discovery issue.

Yes. The output is “[]”

I installed on a Win 10 machine.

Is this still working for everybody else? I installed without much fuss a couple of weeks ago (on Linux), created some automations using webcore. Love this! Noticed over the last few days the automations stopped working. I too get an empty list ([]) when querying the /devices endpoint. None of the devices that had been working in ST update their status or can refresh. Not sure if this offers any clues but physical Chromecast devices show up as Connected (even though they don’t update) while the Audio Groups show up as Disconnected.

Is ok on an old Android

My linux server has more than one network interface. Could that be breaking discovery? I can run and bind the API to port 3000, interact with the API but the device list always returns empty. If I run a tcpdump on eth1 (the desired internal interface) I see mDNS from my cast devices. In debug mode I see:
cast-web-api 2018-07-27T12:25:13.219Z createGoogleZones(): discoveredZones: [] +1ms
cast-web-api 2018-07-27T12:25:13.219Z createGoogleZones(): done! zones: [] +0ms
cast-web-api 2018-07-27T12:25:47.009Z getNetworkIp(): addresses: 192.168.1.1,24.5.5.5,192.168.5.1 +34s
cast-web-api 2018-07-27T12:25:52.420Z discover(): updateCounter: 0 +5s
cast-web-api 2018-07-27T12:25:52.420Z discoverTimes(): discover(“googlezone”) done times: 4, zoneResults: , typeof: object +0ms
cast-web-api 2018-07-27T12:25:52.420Z discoverTimes(): newZoneResults: [object Object], new times: 3 +0ms

I have tried setting the server IP explicitly. Is there a way to specify an interface ID?

1 Like

Question…

If I’m listening to a radio station on Google Play, how do i get the station to keep playing after an announcement has happened?

Thanks

Sadly not at all :expressionless:
This is a limitation of the cast protocol and probably will always be.

PS: you can set it to play any radio station (like pbs) if you have a direct link to it, but probably not what you want…

Absolutely. The mdns library I’m using really has a lot of bugs and the author is doing nothing about it.

But this looks like cast-web received answers from cast devices. At least the /device/ array should be populated after that…

I don’t think so. If I remember correctly the author once said it’s listening and broadcasting on all active interfaces.

I’m pretty busy right now. Will investigate more closely and get back to you soon!