GithubHelp home page GithubHelp logo

Comments (3)

nohum avatar nohum commented on June 22, 2024

Hi!

Interesting error. As all of my chromecast devices have spaces in their names (e.g. Living Room Audio) I do not believe that this is the issue.

According to the log the mqtt property seems not to be a valid MQTT object. On second view of the logfile, this is also visible (compare the order of the messages connecting to mqtt, the errors and the final mqtt connected callback has been invoked message).

Seems to be a race-condition of some kind when the MQTT connection is not established fast enough yet devices already have been found.

Edit:
You can verify this by starting a "dummy mqtt server" with netcat, e.g nc -k -l 1883. This will never successfully connect, so this error will even happen with your device called Badezimmer.

from chromecast-mqtt-connector.

nohum avatar nohum commented on June 22, 2024

You can try the version available in PR #11.

from chromecast-mqtt-connector.

dersimn avatar dersimn commented on June 22, 2024

Before you made any changes only the Badezimmer (≙ Bathroom) topics showed up in MQTT - nothing else.

With the #9 branch however:

Here everything starts to work in the end, the 'workflow' to get everything working is as bit struggling:

  1. Connection status is WAITING for all devices (but they appear right after starting the script)
  2. Connection status changes to CONNECTED for Badezimmer and at the same time every topic (like volume_level) gets populated. All other devices remain on WAITING
  3. Using Spotify on my iPhone, I make a change to the current player state (from Playing to Pause, or vice versa)
  4. All /media/ topics get populated for e.g. the Simon's Zimmer speakers, leaving the connection_status still on WAITING.
  5. If you now change the volume on the iPhone, the connection_status will be set to CONNECTED and all other topics (like the volume_level) appear in MQTT right after that.

So basically once every device was in use and somebody changed the volume, they'll appear in MQTT.

What I haven't thought about until now: The Bathroom speakers are the only one's connected via WiFi. For the other two, I'm using the Ethernet Adapter. I'll try to connect one of them with WiFi as well, tomorrow.

from chromecast-mqtt-connector.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.