Cast-web & Chromecast Status (Not TTS)

I'm having trouble getting cast-web up and running and was hoping someone in here could help me figure it out.

I've reviewed the threads here and here. I've installed the app & device drivers from @jp0550's Github fork here.

I am able to get the app to see all of my chromecasts, but when clicking through I get this error:

Clicking into the logs for both the app and the api (device), I see that the app has some issues:

And the device is struggling as well:

I looked through the code for both of these but haven't been able to make heads or tails of it.

FWIW, what I am actually trying to do is similar to what the users in this thread are curious about. I want to use the status of each Chromecast to trigger RM and turn on/off various receivers throughout the house. But, the built-in Chromecast integration seems to report status spottily at best, so I'm hoping to see if cast-web does a better job.

Oddly enough, I have an installation of Homebridge running and the Chromecast plugins for that do a bang-up job of monitoring status. But, I'm hoping to centralize the logic on my Hubitat hub.

I haven't used cast-web before, and there's a lot of code to sort through.

My guess is that the app error is due to either duplicate data (wild guess: a race in accessing values in state.latestHttpMac) or no data (a server or configuration issue?).

Here's a first step to tracking it down:

  • In the app configuration, set "Service manager log level" to level 4.
  • In cast-web-service-manager.groovy code, add this above line 126: logger('debug', "state.latestHttpMac = ${state.latestHttpMac}")
  • Re-run the app configuration sequence and see what shows up in the logs. I suspect there will be either duplicated entries or that they will all be Null.

As for the cast-web-api.groovy errors, similar debugging step:

  • In the driver configuration, set "Service manager log level" to level 4.
  • It looks like there are a fair number of debug prints already there that should give breadcrumbs to which incoming data is problematic.

Thanks for your replies, @tomw. Based on some other reading I did about cast-web - it does not sound like the status reporting is much better there. So, I'm headed down the Home Assistant hole to get this goal achieved.

Hopefully Hubitat's in-built Chromecast automation improves at some point in the future, and then I can build these automations in on my HE instead.