Reply To: Access to Max2play away from home

Max2Play Home Forums Max2Play on Raspberry PI Access to Max2play away from home Reply To: Access to Max2play away from home

11. Januar 2019 at 18:38 #43536

No probblem. It was not that advanced and quite easy.
In the config.yaml in Home assistant I wrote:

rest_command:
my_request:
url: http://192.168.1.xx/plugins/max2play_settings/controller/Squeezeserver.php?action=restart
method: GET
my_request_2:
url: http://192.168.1.xx:9000/status.html?p0=mixer&p1=volume&p2=-10&player=%5BMAC ADRESS FROM M2P API]
method: GET
my_request_3:
url: http://192.168.1.xx:9000/status.html?p0=mixer&p1=volume&p2=%2B10&player=%5BMAC ADRESS FROM M2P API]
method: GET

Important, I gave the RPI a static ip adress in the router since I point the rest_commandt to a specific local IP adress.
Then I used the script editor in Hassio and created scripts „rest_command.my_request“ without any additional adjustments, „rest_command.my_request_2“ etc and then added the script ID to the Lovelace UI.

Voilá, from the Home assistant app I can execute each specific script and the squeezebox server restarts, lower volume etc.

Now I just have to wait until Spotify connect is unreachable (not very often that problem occurs though) to see if it solves the problem. It should. 🙂