+2
Waiting for user's reply
Jackie Roos 6 months ago in Modules • updated by Paulo de Almeida 19 hours ago 89

Hi

we have updated our Sonos to firmware 7.2


and the iRidium Sonos module has stopped working:

Can you please fix


thanks

Answer

Answer

Hi, Matthijs
Please, check your version of i3pro app (above 1.1.5) and version of project code

Sonos1.2.irpz

Ok, and now, take wireshark logs for this project. Use it in i3 pro

and use this project with new app version from here https://drive.google.com/drive/folders/0B36a0ayl55pmQ252Njhza01iVGs?usp=sharing


and in i3 pro press F8, enter the password 2007. App will opens system menu. and take a screen of this menu and send it to me

has that project changed in the last 24 hours?


do you mean Iridium.exe or the sonos1.2?

the iridium.exe produced a virus alert on my PC

Hi David - I just downloaded iridium64.exe and no virus alert.


This sonos and iridium64.exe worked for me, but there are some script errors:


26-04-2017 19:38:32.177] INFO CORE *** The client started to work ***
[26-04-2017 19:38:36.802] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error document empty.; (null)
[26-04-2017 19:38:36.987] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error document empty.; (null)
[26-04-2017 19:38:37.203] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error document empty.; (null)
[26-04-2017 19:38:37.421] INFO SCRIPT TypeError: E:\iRidium\iRidium mobile 3\Client\Sonos1.2\scripts\control.js:1878: Tried to use undefined as an object
[26-04-2017 19:38:37.587] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error document empty.; (null)
[26-04-2017 19:38:37.787] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error document empty.; (null)
[26-04-2017 19:38:38.003] INFO SCRIPT update
[26-04-2017 19:38:38.019] INFO SCRIPT TypeError: E:\iRidium\iRidium mobile 3\Client\Sonos1.2\scripts\control.js:1878: Tried to use undefined as an object
[26-04-2017 19:38:38.056] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error document empty.; (null)
[26-04-2017 19:38:38.171] WARNING UPNP RINCON_000E58AE01D401400 Receive. XML parse error Error reading Attributes.; http://schemas.xmlsoap.org/soap/encoding/"> xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">x-file-cifs://JACKIES-PC/Music/Cold%20Chisel/Chisel/10%20Cheap%20Wine.mp3/getaa?u=x-file-cifs%3a%2f%2fJACKIES-PC%2fMusic%2fCold%2520Chisel%2fChisel%2f10%2520Cheap%2520Wine.mp3&v=5Cheap Wineobject.item.audioItem.musicTrackCold ChiselChisel10Don Walker112
[26-04-2017 19:38:38.241] WARNING SCRIPT http://schemas.xmlsoap.org/soap/encoding/"> xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">x-file-cifs://JACKIES-PC/Music/Cold%20Chisel/Chisel/10%20Cheap%20Wine.mp3/getaa?u=x-file-cifs%3a%2f%2fJACKIES-PC%2fMusic%2fCold%2520Chisel%2fChisel%2f10%2520Cheap%2520Wine.mp3&v=5Cheap Wineobject.item.audioItem.musicTrackCold ChiselChisel10Don Walker112
[26-04-2017 19:38:38.256] INFO SCRIPT TypeError: E:\iRidium\iRidium mobile 3\Client\Sonos1.2\scripts\control.js:1878: Tried to use undefined as an object
[26-04-2017 19:38:38.320] ERROR UPNP CUpnpDevice(SonosPlayer-1(3)): Time of waiting for connection is over!
[26-04-2017 19:38:38.340] ERROR UPNP SonosPlayer-1(3): Time of waiting for connection is over!
[26-04-2017 19:38:38.403] INFO SCRIPT TypeError: E:\iRidium\iRidium mobile 3\Client\Sonos1.2\scripts\control.js:1878: Tried to use undefined as an object
[26-04-2017 19:38:40.375] ERROR UPNP CUpnpDevice(be89dfce-2bb8-1ea7-dc39-c0a0bbce5563(9)): Time of waiting for receive data is over!
[26-04-2017 19:38:40.390] ERROR UPNP be89dfce-2bb8-1ea7-dc39-c0a0bbce5563(9): Time of waiting for data is over!
[26-04-2017 19:38:45.227] ERROR UPNP CUpnpDevice(SonosPlayer-1(3)): Time of waiting for connection is over!
[26-04-2017 19:38:45.246] ERROR UPNP SonosPlayer-1(3): Time of waiting for connection is over!



Hi Jackie, I am running a 32 bit version of Win7

I just did a download from iridium site and with v 1.1.4:12002 I still don't get anythig

Jackie, script error is ok, because it is early developer version of project

David, there is no virus.

1) Take iRidium.exe from drive

2) Paste it in iridium path

3) Start it with project Sonos1.2.irpz

4) test it.

Wait for your feedback

Hi David, I just downloaded the 32 bit version and it worked.


Just in case: To run the new version from the emulator, you will need to replace the existing iridium.exe file in C:\Program Files (x86)\iRidium Ltd\iRidium Pro\iRidium with the new version (I just renamed the existing versions)




Xopyc - Is it possible to give David a version for his iPad to test?

Jackie, not right not. Soon this version will be avaliable

Understood, thanks :)

Thanks Jackie, in the end I had to shut down my anti-virus, but got it to run


Xopyc

Thats now working. Any idea when the iPad app update may happen?

Searching answer

Hello David,

Can you Testflight app? We can add you like a tester for checking Sonos by our new beta 1.1.5

Hello!


You can check it with Beta Setup 1.1.5 and this test project. But, this project is only for testing, because improvements are required

Having trouble getting test flight to run on my new iPad, its being sorted in another thread. will test as soon as that is resolved

Still waiting to get test flight activated

+1

Finally I have test flight running 1.1.5 (12117)

I have tested the sonos module from the link above and it seems to have full functionality from an iPad running iOS10

when will we see an update to the public iOS app?

In our system the current playlist only displays "loading" the other fields and controls works fine.


I use this script on a cementary so its crucial to fix this.

Waiting for user's reply

it does not works on ipad or on windows? try it on windows and it will not works then send to me a screenshot of GUI and logs

+1

thank you for youre fast reaction,


its only on the iPad, in Windows it now works fine.


IRPZ project with new Sonos script

ockenburgh.log


+1

Hello all.. just some feedback...


The project is working fine for me on IPad Mini Gen.1 with IOS 9.3.5

With Iridium V3 Studio 1.1.5.19462

and I3pro app Version 1.1.5 from 16.05.2017

tested with Sonos Play:3 Firmware Version 7.2 (build 35339010) / Hardware Version 1.8.1.2-2


I just get some scripts error like Jackie... Hope we can fix this too then we have a great new Sonos Module



PS:

IPad Mini Gen.1 can not be upgraded to IOS 10 just FYI


Thank you IIya Markov for helping on this Sonos Project, also thank you everybody else involved as well.


+1

I have the problem that in project Sonos 1.2 the track, artist and album are not shown, anyone know how to fix?

Doesn't work on either iPad mini gen1 as in Win7pro 64bit


Answer

Hi, Matthijs
Please, check your version of i3pro app (above 1.1.5) and version of project code

Checked it, had an older version of the project (was 1.2 but dated earlier) and works! Thx

Hi!
Does anyone have a working module Sonos for IPhone with working playlist and full list of radio stations?

And how to use command from script (for example i need to choose pleer and playlist to play music)?


Thanks in advance

Hello,

we test it again and everything fine in our office. check that you use the latest app version from AppStore(Google Play) and that you use the latest sonos project ( you can find it here https://drive.google.com/open?id=0B36a0ayl55pmREtSWHVFcGRpZnc). Soon we will upload yhis project to our site

for IPhone please, or for any other phone!

P.S. version for ipad works well

Thanks

hi,


how do we select the player,


do we need to setup something , or fill in an IP adres


gr Ludwig


Sonos module work, but iRidium log shows permanent error:

............................................

[27-06-2017 12:29:54.547] INFO SCRIPT TypeError: C:\Users\.........\Documents\iRidium pro documents\Client\Sonos1.2 (3)\scripts\control.js:1878: Tried to use undefined as an object

Hello,

i attach smartphone and retina project to this post. Check it please

Sonos_rebuild.rar

Log shows:

1. Project Metro_Sonos_iPhone_RC_2.0.0 v3

.............................................

[13-07-2017 09:49:46.779] ERROR SCRIPT Device_InvokeAction UserData null
[13-07-2017 09:49:46.910] INFO SCRIPT !!!XML Error1


2. Project Metro_Sonos_Retina_2048_RC_2.2.1 v3

...............................................

[13-07-2017 09:53:00.187] ERROR SCRIPT Device_InvokeAction UserData null
[13-07-2017 09:53:00.408] INFO SCRIPT !!!XML Error TypeError: C:\Users\......\Documents\iRidium pro documents\Client\Metro_Sonos_Retina_2048_RC_2.2.1 v3\scripts\Sonos_Control.js:1608: Tried to use undefined as an object


добрый день. Функционал весь работает у вас? Эти сообщение не влияют на работоспособность

Функционал работает

хорошо. на сообщения не обращайте внимания, они информационные и мы скоро их уберем

I am now have a lot of issues with this module

If i open the i3pro app the module works, but if the iPad is inactive or the apps sent to background then the app stops working.


Transport functions work, track selection works, volume works, BUT no feedback at all. no track data, no artwork, no volume level or %. no track time.


The only way to get the module to work again is to shut down the app completely the re-open the app.

Under review

hello.

We will check it. Thanks for your feedback

ok, we found issue. I will write you when it will be fixed

Any update on this issue?

With Sonos version 7.4 and iRidium 1.1.8:12782 client (Windows) and 1.1.9:12918 (iOS) the list of players is not loaded. 

Used the project in the link in this topic to test.

In the log there are errors about XML parsing.


Please fix this.

Waiting for user's reply
This version?

Hello!


If you do not receive the lists, please try our new beta version 1.2.0.


I've tested with that version and have the same problems.

Hi,

 

Just letting you know that with I3 pro version 1.2.0.19684 , Sonos is not working same issue like the others, no list is showing to find the players.


My project was working fine a couple of month ago.


Is there any news on this topic ?


LOG:


[18-09-2017 21:37:04.724] INFO CORE *** The client started to work ***
[18-09-2017 21:37:04.735] INFO SCRIPT false
[18-09-2017 21:37:10.988] ERROR UPNP CUpnpDevice(RINCON_000E58702C9001400(8)): Time of waiting for connection is over!
[18-09-2017 21:37:10.994] ERROR UPNP RINCON_000E58702C9001400(8): Time of waiting for connection is over!
[18-09-2017 21:37:23.775] WARNING SCRIPT Item_Put(): Opacity property does'nt exists on ElementType 0



Hello!


Do you use a project from this topic?




On which device do you start it? Does the standard Sonos application work from the same device?

my issue is different. I get lists to populate.


I can get the sonos to work (iPad mini4, ios10.3.3, Latest beta i3pro)it displays lists and all functions work

until:

i minimise the i3 application to the background, then when I go back to the application I have no control of sonos at all. If I close the i3 app completely, then re-open it I have full control of the sonos again. The iPad going to sleep has the same effect. Wont re-connect to sonos on wakeup


I have had this problem for some time now. There was a recent update for sonos. I installed that and still the problem s exactly the same


I just tested again using the the project linked to by Dimitry but it is still the same


the Sonos application on the same iPad works all the time


AS A NOTE

I found that the lists don't work properly unless the sonos application is running on the host computer of the music library


Hi Dimitry,


I am testing it on the emulator on my laptop. No device. On my Iphone the Sonos App works fine. And from my Laptop the Sonos Controller works fine too.


And yes i used both projects under the link you posted.


Still i have no Device in the list


What version of i3Pro do you use on your laptop ?

The latest "Relase Version" I3 pro version 1.2.0.19684

Hi,


Ok correction after reading the note from the post of david i let the sonos application running in the background on my laptop. Then i started my Project and the emulator.... Now it found the sonos device... i can start, stop, change volume... all this seems to work. I can find music on my laptop and it plays it as well....It does not find any radio station....


But overall this is not working properly... I get lots of errors in the Log... especially the XML parsing error seems to be the cause i think.


Log:

[19-09-2017 09:55:54.197] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.227] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.259] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.290] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.324] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.354] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.385] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.418] WARNING SCRIPT Item_Get(): lock property does'nt exists on ElementType 1
[19-09-2017 09:55:54.449] ERROR SCRIPT Device_InvokeAction UserData null
[19-09-2017 09:55:54.557] INFO SCRIPT !!!XML Error TypeError: C:\Users\Paulo\Documents\iRidium pro documents\Client\NeoMatic_IPad_Showroom v3\scripts\Sonos_Control.js:1608: Tried to use undefined as an object
[19-09-2017 09:55:54.666] WARNING SCRIPT XML Construct Error: Error document empty. 0 0
[19-09-2017 09:55:54.668] WARNING SCRIPT
[19-09-2017 09:55:54.818] INFO SCRIPT !!!XML Error TypeError: C:\Users\Paulo\Documents\iRidium pro documents\Client\NeoMatic_IPad_Showroom v3\scripts\Sonos_Control.js:1608: Tried to use undefined as an object


It does not find any radio station.

Unfortunately, this functionality does not work. This is related to the limitations of Sonos.


But overall this is not working properly... I get lots of errors in the Log... especially the XML parsing error seems to be the cause i think.

These errors usually do not affect the operation of the module.


The radio stations were working fine as i wrote 4 Month ago in this thread the following:


Quote:

The complete project is working fine for me on IPad Mini Gen.1 with IOS 9.3.5

With Iridium V3 Studio 1.1.5.19462

and I3pro app Version 1.1.5 from 16.05.2017

tested with Sonos Play:3 Firmware Version 7.2 (build 35339010) / Hardware Version 1.8.1.2-2


This of course was with the previous Sonos Project you had 4 Month ago... Now with the new one the radio station are not loading.


If the XML error is not a problem we need to find the reason why the new Sonos project is not working anymore... I have lots of costumers who are using it and now are waiting for support.


Thanks,

Not sure this is an appropiate response here, but I have stopped using the Iridium Sonos driver due to been on the Sonos beta and this driver essentially never working for me.


On my Iridium server i am running an opensource Node application called Node-Sonsos-Http-API (https://github.com/jishi/node-sonos-http-api/) and on my Iridium server i have created a basic module, which leverages the application to do all the UPNP work. So far this has been running solid for 8 months, and I am currently running Sonos 8.0.371245110 


I have not converted all the functions to this model, but the following will show the basic framework I use, and is maintainable


Apologies if this is inappropriate here, and please delete if needed


Sonos_API = function(DriverName)
{
   //-------------------------------------------------------
   // Driver Data
   //------------------------------------------------------- 
   this.DriverName = DriverName;
   this.device;
   this.Online = false;
   var that;
   
   var deviceList = [];
   this.error = false; // Error flag
  
   // Log Levels
   // 0 = No logging 
   // 1 = Information
   // 2 = Verbose
   // 3 = Debug
   var loggingLevel = 3;
   //-------------------------------------------------------
   // Device Initialization
   //------------------------------------------------------- 
   function initialization() // Initialization method of the class instance
   {
 
      //this.device= IR.CreateDevice(IR.DEVICE_CUSTOM_HTTP_TCP, this.DriverName, {Host: "172.16.1.5", Port: 5005, ReceiveWaitTimeMax: 5000}); // Defining the indicator of the base driver by its name 
      this.device= IR.GetDevice(this.DriverName); // Defining the indicator of the base driver by its name 
      that = this; // Receiving the link to the object for its using inside the function
      //-------------------------------------------------------
      // Device Online
      //-------------------------------------------------------     
      IR.AddListener(IR.EVENT_START,that.device,function()
      {
         Log("DEVICE is Initializing..."); // Write to the log that the device is Online
         
         Log("DEVICE is Initialized"); // Write to the log that the device is Online
      }, that);
        
      //-------------------------------------------------------
      // Device Online
      //-------------------------------------------------------     
      IR.AddListener(IR.EVENT_ONLINE, that.device, function(text)
      { 
         Log("DEVICE is Online"); // Write to the log that the device is Online
         that.Online = true; // Assign the true value to the that.Online variable
         deviceList = getSonosDevices();
      }, that);
      //-------------------------------------------------------
      // Device Offline
      //-------------------------------------------------------
      IR.AddListener(IR.EVENT_OFFLINE, that.device, function(text)
      { 
         Log("DEVICE is Offline"); // Write to the log that the device is Offline
         that.Online = false; // Assign the false value to the that.Online variable
      }, that);  
      //-------------------------------------------------------
      // Receive Text
      //-------------------------------------------------------
      IR.AddListener(IR.EVENT_RECEIVE_TEXT, that.device, function(text)
      {
         Log("Text Received: " + text);  // Output the received data in the log
      }, that);
        
      //-------------------------------------------------------
      // Channel Set
      //-------------------------------------------------------
      IR.AddListener(IR.EVENT_CHANNEL_SET, that.device, function(name, value) {
         name  = TrimString(name);
         value = TrimString(value);
        
         Log("Issue Command: " + name + " :: " + value, "Verbose");
        
         //name is the command
         switch (name){
            case "Speak":
                //a1 = arm away
                var payload = value.split(":");
                
                var zone = payload[0] ? payload[0].toString() : 'Kitchen';
                var announcement = (payload[1]) ? payload[1].toString() : 'Just Because I Can!';
                               
                announce(zone, announcement)
                break;
         }
      }, that);
  
   }
   
   function getSonosDevices ()
   {
      var sonosDevices = [];
      NodeSonosAPIrequest = function(in_callback)
      {
         that.device.SetParameters({ConnectWaitTimeMax: 5000, ReceiveWaitTimeMax: 10000});
         that.device.Connect();
         that.device.SendEx(
         {
            Type: "GET",
            Url: "/zones",
            cbReceiveText: function(text, code, headers) 
            {
               if (code != 200) return; //parse other error codes
               var resp = JSON.Parse(text);
               //IR.Log(text); 
               that.device.Disconnect();                    
               in_callback(resp);
            },
         });
      };
      //Attach data to channels here
      NodeSonosAPIrequest(function(resp)
      {
         for (var i = 0; i < resp.length; i++) {
            IR.Log(resp[i].coordinator.roomName);
            sonosDevices[i] = resp[i].coordinator.roomName;
         }
         //IR.GetDevice("mqtt").Set("temp",coordinators.roomName); 
         //IR.GetDevice("mqtt").Set("pressure",resp.main.pressure);
      });
      return sonosDevices;
   }
   function announce(Zone, Message, Volume) 
   {
      var vol = (Volume) ? Volume.toString() : '40';
      var httpCmd = 'Get,/' + Zone + '/say/' + encodeURIComponent(Message) + '/' + encodeURIComponent(vol);
      Log("Speaking ["+ Message +"]");
      Log("Sending: " + httpCmd, "Debug");  // Output the received data in the log
      that.device.Send([httpCmd]);
   }
   
   
   
   //**************************************************\\
   var TrimString = function (str) {
      var localStr = str;
      if (!str) return str; // Don't alter the empty string
      try {
         return str.replace(/^\s+|\s+$/g, ""); // Regular expression magic, barfs if the type is a number,
                                                // but we need to be able to trim Strings that are made up of numbers, eg " 0" -> "0"
      }
      
      catch(err) {
         return localStr;
      }
   }
   
   var Log = function(logText, logMode) {
      var log = logMode ? logMode.toString() : 'Info';
      switch(log) {
         case 'Verbose':
            if (loggingLevel >= 2)  IR.Log("VERBOSE: [" + that.DriverName + "] " + logText);
            break;
            
         case 'Debug':
            if (loggingLevel >= 3)  IR.Log("  DEBUG: [" + that.DriverName + "] " + logText);
            break;
                
         case 'Error':
            if (loggingLevel >= 1)  IR.Log("  ERROR: [" + that.DriverName + "] " + logText);
            break;
          
         default:
            if (loggingLevel >= 1)  IR.Log("   INFO: [" + that.DriverName + "] " + logText);
            break;
      }
   }
  
   //-------------------------------------------------------
   // Public
   //-------------------------------------------------------
   this.Init = initialization; // Make the initialization function public
   this.Speak = announce;
};  
var SonosAPI = new Sonos_API("Node-Sonos");
SonosAPI.Init();
var primaryAnnouncementZone = "Kitchen";
SonosAPI.Speak(primaryAnnouncementZone,"System Update, The Iridium Pro Server has been restarted.","50");


From there to get a list of Favorites i would just send a request of the following to the Node Sonos Instance


http://nodeSonosAPI/favourites


and then from the list returned, i can play it in the zone with the following command


http://nodeSonosAPI/zone/favourite/item name


This is what the code might look like, as an example of how easy this can be to work with Iridium and Sonos


   // Helper Function to Play a playlist in group or zone, with an optional volume
   function playPlaylist(Zone, Playlist, Volume) {
      playQueue(Zone, Playlist, "Playlist", Volume);
   }    // Helper Function to Play a favorite in group or zone, with an optional volume
   function playFavorite(Zone, Favorite, Volume) 
   {
      playQueue(Zone, Favorite, "Favorite", Volume);
   }    // Worker Function to Play a favorite or playlist in group or zone, with an optional volume
   function playQueue(Zone, QueueName, QueueType, Volume) {
      var queue = '';
      if (QueueType == "Playlist") { queue = "playlist"; }
      else if (QueueType == "Favorite") { queue = "favorite"; }
      else { break; }       
      var httpCmd = 'Get,/' + Zone + '/' + encodeURIComponent(queue) + '/' + encodeURIComponent(QueueName);
      Log("Playing "+ QueueType + ' ' + QueueName +" in " + Zone);
      Log("Sending: " + httpCmd, "Debug");  // Output the received data in the log
      that.device.Send([httpCmd]);       if (Volume) {
         // If the Volume is also provided, we will update Sonos to implement this request also
         var httpCmd = 'Get,/' + Zone + '/volume/' + encodeURIComponent(volume);
         Log("Setting Volume to "+ Volume + " in " + Zone);
         Log("Sending: " + httpCmd, "Debug");  // Output the received data in the log
         that.device.Send([httpCmd]);
      } else {
         Log("No Change to Volume to "+ Volume + " in " + Zone);
      }
   }
   


Both reply with JSON, so parsing is not hard in Iridium.

Done ! :)


Hi Damian,


A good solution. But it would require each project to have a iridium server which would be too expensive for many. 

We need something which is easy to use, even for non Script guys, full functional and stable.


Of course your are right this constant update of Sonos always kills the Iridium Sonos Code. Best would be if we could stop Sonos players from updating automatically and then have a Iridium Code for 1 version of Sonos Firmware and then just update the Sonos players whenever Iridium would update the Sonos Code.  

Because right now we always running after and behind the Sonos Firmware updates until we have the Iridium Sonos code fixed its again about time for a new Sonos Firmware update. 


Important is that we keep this Sonos feature in Iridium tough because its a big selling point in my business anyways.


Regards,

P.