Detect active sound on a device

Hello all,
i want to create a auto-on system to my sound system (receiver).
I do have an Amazon Alexa Dot (1. Generation) pluged via line-in (AUX) to my sound receiver.
As soon as there is sound playing on the Dot i want to auto-switch on my receiver.
For the auto-switch on i do have an Arduino with infrared LED, this is working.
However i am not able to detect active sound on the Dot, already tried to analyse the voltage on the line-in but there is a lot of noise on the signal when low volume music is played (high volume is working more or less fine).
Therefore the question: Is it possible to detect active sound / music on a certain Alexa device with a binding / addon in openhab?
If not: Do you have an idea for an alternative? Also no problem with opening the Dot and solder some wires :slight_smile:

Thank you alot!

Have you tried the Amazon Echo Control binding? You should be able to determine when music is playing on a given echo device by monitoring the player channel.

Wow thank you a lot. This is more or less exactly what I was looking for. I will test it! Also my exact use case is written in the description: “automatic turn on your amplifier if the echo plays music” :slight_smile:
However it is written: “Devices only receive their state every 60 seconds”
Does this only mean the direction openhab -> echo?
Because otherwise it would take up to 1 min to turn on the amplifier when there is music on the device.

What exactly is referred as “music”?
Also for example radio stations or just an answer from the echo (f.e. how the weather will be)?

Best regards

Correct. The binding is polling the echo device state. So it can take up to 30 seconds to get updated on the OH side as I believe the polling interval is controlled by the pollingIntervalSmartHomeAlexa thing config parameter.

Check the access mode in the binding documentation. For player channel, it is R/W. So it’s both ways.

I would suggest that you test on your end. I don’t personally used that feature. My understanding “music” is anything played through the Alexa music service (e.g. Amazon Music, Pandora, Spotify, …).