Homey Community Forum

[APP] Bluesound [needs other developer]

I hope to have fixed the start/stop playing trigger card once and for all. Could you check again. I have also removed one of the duplicate condition cards for is (not) playing. That might break some flows for some people but cleans up the code and the flows can be fixed easily. Could you test again.

Start still doesn’t work. Maybe just change stop trigger in start/stop trigger. People can then ad an condition card in the And section with is or is not playing. Problem solved!

I cant as these triggercard are built in based on the speaker_playing capability (and I dont want too, I want to get it right). So help me out here. The only thing I can do it to determine when I need to set the speaker_playing capability to true or false. The code looks like this:

// capability speaker_playing
if (result.state !== "pause" && !this.getCapabilityValue('speaker_playing')) {
  this.setCapabilityValue('speaker_playing', true);
} else if (result.state == "pause" && this.getCapabilityValue('speaker_playing')) {
  this.setCapabilityValue('speaker_playing', false);
}

In human language this says "if the device state (result.state) is not pause and the state of the device in Homey is not playing then set it the speaker_playing capability to playing or if the device state is pause and the state of the device in Homey is set to playing then set it to not playing. My guess is that there are cases where the state of the device is not changed from pause while it’s actually playing something (like radio) and thus it wont change the capability and therefor not trigger the start playing trigger card. I need to find out if this is the case. Could you check this through http://ipbluesound :port/Status and see what the result is when starting and stopping your music.

And thanx for the beers, much appreciated with this heat … :pray:

Your welcome!

Hhm. I do understand you. But even when i cut off the power and restart the Powernode and start play some music, Start playing is not triggered.

You will need to access this URL (replacing the IP and port of your Bluesound device) to see what the status is. I use this output to update the device instance in Homey.

http://ipbluesound:port/Status

Give it another try asap!

OK, let me know if I’m not making any sense, but I’ll try to contribute to this (with my limited knowledge). I looked at the URL and found the following states (for my Node 2i):

Playing Tidal / Spotify state=stream
Playing from NAS state=play
Playing optical input state=stream
Paused state=pause
playlist ended state=stop

Hope this helps, and again thanks for your efforts, also to Peter

2 Likes

Addition:

Playing TuneIn (radio) state=stream
Playing Bluetooth state=stream

Bluetooth or optical selected but no signal, state=connecting

Issue solved! Efforts go to @Phuturist!

I noticed that Bluesound now have an official API documentation on their website:

Still weird that there is no option to switch source to any specific i would like, in my case to optical 2 for example when my tv is turned on.

v3.0.4 - 202x-xx-xx

  • Updated to SDK3 (require Homey firmware 5.x)
  • Fixed an issue with the start/stop playing trigger card
  • Removed a duplicate “is (not) playing” condition card. You might have to update your flows because of this.

This release is available in the test channel in the app store. You can only install this if you are running Homey firmware 5.x which is still in experimental phase.

2 Likes

v3.0.5 - 2021-02-22

  • Updated to SDK3 (require Homey firmware 5.x)
  • Fixed an issue with the start/stop playing trigger card
  • Removed a duplicate “is (not) playing” condition card. You might have to update your flows because of this.
3 Likes