And after all those tries to connect the dots, to understand that thread which speaks about native sonos plugin, that soco thing, node-sonos-http-api and related beasts, planets aligned and got it so easily integrated that I´m almost embarrashed to make this public.
Just in case there´s any other colleague there in the same situation, here it goes what I did. Requisite was to make it simple, then simple, and finally simple. No compiles, no install this and that and end up with my little raspberry filled with components I dont know about.
Merit is for monsier Fabien here http://www.planete-domotique.com/blog/2 ... -leedomus/
1. Downloaded from https://www.github.com/DjMomo/sonos the file sonos.class.php and copied it to my scripts directory
2. It looked like no PHP in the PI so sudo apt-get install php5-cli
3. it complains because of some curl mambojambo, hopefully sudo apt-get install php5-curl fixed it
4. To make an easy test, created two separated scripts for PLAY (sonos.play.php) and PAUSE (sonos.pause.php), both similar except in the command itself. As follows:
Code: Select all
<?php
$IP_sonos_1 = "192.168.1.20";
require("sonos.class.php");
$sonos_1 = new SonosPHPController($IP_sonos_1);
$sonos_1 = $sonos_1->Play();
?>
Ready now for the fun this weekend to make something more sophisticated like TTS which the class apparenlty also implements.
-j