4. Januar 2019 at 18:09 #43162
I use Spotify to randomly play some music when nobody is home (to give the impression that someone is home). Works fine most of the time. However, sometimes the spotify connect plugin on LMS and the Spotify plugin does not work and I need to reboot Max2play. Is there a way to do it remotely when I am not on my home network? In other words, I want to remote access. One way to solve it could be to install a remote switch to turn off the power to the RPi but I guess it is not a good solution for the SD card etc.
/Martin11. 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:
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. 🙂
You must be logged in to reply to this topic.