Max2Play Home › Forums › Max2Play on Raspberry PI › Access to Max2play away from home › Reply To: Access to Max2play away from home
No probblem. It was not that advanced and quite easy.
In the config.yaml in Home assistant I wrote:
url: http://192.168.1.xx:9000/status.html?p0=mixer&p1=volume&p2=-10&player=%5BMAC ADRESS FROM M2P API]
url: http://192.168.1.xx:9000/status.html?p0=mixer&p1=volume&p2=%2B10&player=%5BMAC ADRESS FROM M2P API]
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. 🙂