i8beef/node-red-contrib-castv2

castv2 node reports 'Error: Not Connected'

Closed this issue · 5 comments

I have been using castv2 with my chromecast audio for several months with no problem, and it suddenly stopped working a few days ago. In the console in node-red it reports "Error: Not connected"

These are the payloads I am attempting to send:

The chromecast is online and accessible (I can cast media to it via other apps)

Is there anything I can do to get more detail on what is failing?

Are you connecting via direct IP address, or by mDNS? Have you upgraded node.js recently (There is another item here related to possible compatibility issues with the mDNS library and latest node.js that is still being investigated).

I am using a direct IP Address (which I have confirmed is unchanged), and port 8009
Node has not been updated recently, currently running v14.17.1
Node-RED is on v2.1.2

I had a look at node-red-log but it doesn't have any more detail than what is displayed in the debug panel

Ok, I resolved the issue by switching to mDNS
I know the IP Address is correct. Is there any chance that the port number on the Chromecast Audio would have changed?

The mDNS piece sits on top of the basic ip/port connection. All it does it LOOK UP the IP / port from mDNS, and use that instead of a static one you put in. Its way easier IMO to set your device to a static IP and just use that address directly... the only time I personally use the mDNS part is for speaker groups because those cycle through ips / ports dynamically all the time, so you can't have a static address pointer for them.

Thats not to say it shouldn't WORK just fine, its just mDNS can be finicky for other reasons sometimes. If mDNS is working for you, you might stick with that, it SHOULD be fine, and is how basically all of Google's cast discovery ecosystem works so its unlikely to break if its working right now unless your network itself changes (mDNS gets weird about transitioning subnets and such).

If your static IP wasn't working, yeah, I would think your device changed IPs. Especially if mDNS WORKS it means the node is perfectly able to directly connect to whatever ip/port mDNS discovered. I wouldn't think the port would change on you, though I don't have a Chromecast Audio to know if there are any weird nuances to them.