Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


[How to do instruction] MoodeAudio Alexa Integration
#1
Hello!

The only thing I found missing from this great project is an integration with Amazon Alexa SmartHub, so after trying some things, I managed to do it and wrote a detailed how-to here:

https://github.com/navatarx/moode-audio-automation

In general I created a "pseudo" Amazon hub using node-red automation  emulating Philips Hub as a proxy for managing Moode Audio. I tried to create all these having security in mind, so everything is on your internal network, without having to open anything from the outside.


Node-red flows:
[Image: 154813898-5ebf3ce6-1137-4bbc-8c44-d57fa7b39e66.png]
An example for the first function for http request is the following:

Code:
res={}
if (msg.on) {
 res.url="http://moodeIP/command/?cmd=play"
} else {
 res.url="http://moodeIP/command/?cmd=stop"
}
res.payload=""
return res;


Note that Alexa identifies those devices as philips royal hue hub. Just say:

"Alexa, turn on Pi audio" "Alexa, turn on Pi Audio Volume"
or create a routine for "Alexa, next song" to "Turn on Pi Next Song"
Reply
#2
Needless to say that if anyone has any addition and / or question, feel free to add / ask Smile
Reply
#3
After moOde 8 ships I'll have a look at it :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
Very cool, as soon as i have more time, i will test.
Reply
#5
This still works fine! I tried it with last moode 8 release + echo dot gen 3
Also I added 2 devices to play 2 different radios. Also the iptable needs to be adapted to the actual connection (in my case, eth0).
Inportant: the iptables entry should be limited to your Alexa device, otherwise webgui ist no more reachable.
You can find my additions on my fork: https://github.com/abrakadabra2k/moode-a.../tree/main

Little hint: Renaming devices somehow does not work, they are not rediscovered correctly. Choose a good name from start or rename the device in the alexa app (I suspect Alexa finds devices based on some ID or something)
Also, "Pi" is not a good name for german users as it is pronounced not as "pie".
Reply


Forum Jump: