Homey Community Forum

Bluesound App

app

#21

I didn’t got the auto updated for 1.2.6 beta yet. As soon as I get it, i’ll test it.


#22

I got the update and I can communicate with my devices again. I will let you know if i see something weird.

If all is stable, my flows should come back into action and should notice that tomorrow when I wake up with music :slight_smile:


#23

Are you still sleeping or is the app working again … :thinking: :grin:


#24

hi :slight_smile: hehe. I woke up. But the music didn’t turn on.

One Bluesound device was properly up & running
The other device was marked as offline (while it was online. Even the Test Connection said it was OK). But it remained offline.

Then I tried debugging it but couldn’t find any reason why it remained offline.

This morning the device suddenly was online. Not sure if it was the reboot of Homey, device, glitch in the matrix. But its online now.

I feel like there’s bug somewhere in the ‘checking if its online’. I created a flow that restarts the app every 24 hours. In the previous version that seemed to solve sometimes these issues.

Anyway; its up. I’m going to try and test and keep you up to date.


#25

It looks like somehow someway, these devices go offline while they are not:

The test connection shows green light. But even restarting the app isn’t helping.


#26

Then it’s time to do a command line install and supply me with extra logging. You can use the debug branch for this.

https://github.com/jghaanstra/com.bluesound/tree/debug


#27

It’s been running stable last month. I think te connection issues were resolved after router restart


#28

Again devices are continuously offline.

I think there’s an issue if you have multiple bluesound devices. For the past month device A was working stable, 0 issues (after i did a router restart). But device B was offline all the time, always.

Today i had some time to play so i decided to remove device B and to add it again. And now that device is online, but guess what. Device A is now offline. Restarting the bluesound device has no effect.

@Phuturist no other way to debug then command line? Even VPN to my network wouldn’t help?


#29

One other question. The Bluesound App is able to change INPUT.

Is there a way to capture what the mobile app is sending?


#30

That would probably work as well but I’d also need develop access to your Homey. I would not be comfortable doing this. Debugging on command line is not that hard, why not give it a try?

Sure, you just need to set up a man in the middle attack. It’s doable but if CLI installs already seem to scare you I dont think this is something for you. But why do you need this, there is already a change input action card in the Homey Bluesound app.


#31

Its not scaring me :slight_smile: I’m looking for most efficient approach since i don’t have much time :frowning:

I’ll get the CLI working. Keep you posted


#32

Hey @Phuturist,

I was doing some research regarding switching input (TV, Platenspeler, BlueOS, Bluetooth) and I got a great tip from their support.

There’s a log file in the bluOS device that logs all the HTTP calls. And while I was searching for the command to switch input. I was curious if I could see any Homey activity and detect why the device is marked as offline while it being online. Since my receiver is powered off completely while i’m not at home. It boots/turn on when i’m home. And gladly Homey detected after 15min or more that the device is online. But I didn’t see any Homey calls in the log. So how are you detecting whether a device is online? Do you ping? call the API? And what the frequency?

Then the other more fun part. Switching the input. There’s good and bad news. The good news, its possible! And I found it:

http://192.168.178.249:11000/ExternalSource?id=%2B
http://192.168.178.249:11000/ExternalSource?id=-

The blueOS app has a left and right button to switch between the inputs. You can’t go directly to an input. You go left, or right. That’s the bad news. So I can’t say, switch to TV or switch to Platenspeler etc. Which is exactly what I want, since I detect when the TV is on. So I know when to switch to that input, same for platenspeler etc.

But I did a little bit more research and checked what the differences when calling the Status command being on different inputs. And I was almost happy. Because, the JSON that’s return with calling the Status command for the inputs Platenspeler, TV, Bluetooth have the same structure but the BluOS is different. Let me show you the results:

image
image
image
image

What do you think? Could you build a card that is a ‘switch input card’, with free text. And you do something like:

Switch input API-call
Status API-call
If (title2 matches ‘input-field’ e.g. Plantenspeler) { stop }
else { start-over }

The only issue is title2 works for Platenspeler, TV and Bluetooth. But not for BluOS. So that needs to be an exception.

What do you think? @Phuturist


#33

So my NAD device is offline again.

If you are not checking whether a device is online using the API and you are doing a PING. Maybe the device has a built in firewall or my router has a firewall or some kind of protection somewhere and blocks your pings to check whether the device is online.


#34

The polling frequency (setting of the device in Homey) is used to make a connection to the device and retrieve the status. If no valid connection can be made the device will go offline and Homey will try to reconnect every 63 seconds to see if the device is available again. If you woul do a CLI install it might tell you why Homey is not able to make a connection to retrieve the status.

I’l look at your findings for a potential switch input card but I’m currently quite busy with other stuff.


#35

Running the 1.2.6 version without problems on three devices (Node2, Soundbar and Flex). All stay online all the time and no functionality missing. Itś even possible to create a linked group in a flow!
Thanks for the development and support in the past. Itś getting time for you to get some Bluesound stuff I guess :grinning:


#36

I understand; I Will try to find the time for the CLI.

If You manage to make successful input switch I’ll make sure you can order some beers.

But no hurry! Already happy with your support. This is why homey (community) is awesome


#37

Although I understand your need and understand there does not seem to be an alternative way what you are suggesting is quite hacky. What if someone enters a non existing input, if you would not catch that as well you could end up in an endless cycle of input switching … :scream:

I’ll start with adding cards for switching input up and input down and give it some more thought.


#38

@Quakerix could you tell me what entries are in the current autocomplete actioncard for changing inputs? Does this not already contain the inputs you want to switch to?


#39

No they don’t, they show:
Radio paradise(?)
Spotify
Bluetooth

And I’m not sure if the card does something.

I know it’s quite hacky. It was the only thing that I could think of. You can always limit it to 5 or 6 since there are physically no more inputs. If you have idea :slight_smile:


#40

No other ideas. I have uploaded a new release to Github that has a new action card for changing inputs up and down and an experimental action card that switches the input till a maximum of 5 times or until the given input matches the actual input. Since I have no way of testing the app it needs to be tested by somebody else first before I will push it to the app store. Could you run the app using the command line and let me know if it works? If it does not work it would be nice if you could post the command line logging.