This has been a topic that has been discussed in the past (AV Plugins) but I felt this deserved it’s own thread for community discussion/involvement. My production system is an x86 running OpenWrt/openLuup. This system has one Sonos running locally and works well playing music. If I add another Sonos, both stop working all together (details are left in the previous AV discussion). This was never resolved nor did I pursue it further since a workaround was simply utilizing the bridge to control the remaining devices.
Recently I attempted to test the Sonos plugin (v1.4) again using the latest openLuup development branch. The systems were both an x86 and Odroid XU4 running Debian Jessie 8.3. No other plugins were installed. Out-the-gate, a failure occurs and the plugin ceases to function. Obviously on a Vera, this plugin works perfectly.
[hr]
x86
2016-03-29 16:14:51.436 :: openLuup STARTUP ::
2016-03-29 16:14:51.436 openLuup.init:: version 2016.02.25 @akbooer
2016-03-29 16:14:51.458 openLuup.scheduler:: version 2016.03.01 @akbooer
2016-03-29 16:14:51.458 openLuup.wsapi:: version 2016.03.05 @akbooer
2016-03-29 16:14:51.458 openLuup.server:: version 2016.03.20 @akbooer
2016-03-29 16:14:51.461 openLuup.plugins:: version 2016.03.05 @akbooer
2016-03-29 16:14:51.464 openLuup.scenes:: version 2016.03.11 @akbooer
2016-03-29 16:14:51.465 openLuup.chdev:: version 2016.02.15 @akbooer
2016-03-29 16:14:51.466 openLuup.io:0: version 2016.02.15 @akbooer
2016-03-29 16:14:51.466 openLuup.luup:0: version 2016.03.01 @akbooer
2016-03-29 16:14:51.469 openLuup.rooms:: version 2015.10.15 @akbooer
2016-03-29 16:14:51.469 openLuup.requests:: version 2016.03.11 @akbooer
2016-03-29 16:14:51.469 luup.create_device:: [1] D_ZWaveNetwork.xml / /
2016-03-29 16:14:51.469 luup.create_device:: [2] D_SceneController1.xml / /
2016-03-29 16:14:51.469 openLuup.init:: loading configuration user_data.json
2016-03-29 16:14:51.469 openLuup.init:: loading user_data json...
2016-03-29 16:14:51.483 openLuup.init:: loading rooms...
2016-03-29 16:14:51.485 openLuup.init:: ...room loading completed
2016-03-29 16:14:51.485 openLuup.init:: loading devices...
2016-03-29 16:14:51.485 luup.create_device:: [1] D_ZWaveNetwork.xml / /
2016-03-29 16:14:51.486 luup.create_device:: [2] D_SceneController1.xml / /
2016-03-29 16:14:51.503 luup.create_device:: [3] D_ALTUI.xml / I_ALTUI.xml / D_ALTUI_UI7.json
2016-03-29 16:14:51.505 luup.create_device:: [4] D_openLuupExtensions.xml / I_openLuupExtensions.xml / D_openLuupExtensions.json
2016-03-29 16:14:51.570 luup.create_device:: [6] D_Sonos1.xml / I_Sonos1.xml / D_Sonos1.json
2016-03-29 16:14:51.570 openLuup.init:: loading scenes...
2016-03-29 16:14:51.570 openLuup.init:: number of scenes = 0
2016-03-29 16:14:51.570 openLuup.init:: ...scene loading completed
2016-03-29 16:14:51.570 openLuup.init:: loading installed plugin info...
2016-03-29 16:14:51.570 openLuup.init:: ...user_data loading completed
2016-03-29 16:14:51.570 openLuup.init:: running _openLuup_STARTUP_
2016-03-29 16:14:51.570 openLuup.init:: init phase completed
2016-03-29 16:14:51.570 openLuup.server:: starting HTTP server on 172.16.5.200:3480 tcp{server}: 0xc79728
2016-03-29 16:14:51.570 openLuup.scheduler:: starting
2016-03-29 16:14:51.570 openLuup.scheduler:: [3] device startup
2016-03-29 16:14:51.570 luup_log:3: ALTUI: initstatus(3) starting version: v1.28
2016-03-29 16:14:51.570 openLuup.scheduler:: [3] device startup completed: status=nil, msg=nil, name=nil
2016-03-29 16:14:51.570 openLuup.scheduler:: [4] device startup
2016-03-29 16:14:51.570 luup.register_handler:4: global_function_name=HTTP_Extensions, request=version
2016-03-29 16:14:51.570 luup.variable_set:4: 4.urn:upnp-org:serviceId:altui1.DisplayLine1 was: Uptime 0 now: Uptime 0 #hooks:0
2016-03-29 16:14:51.570 luup.variable_set:4: 4.urn:upnp-org:serviceId:altui1.DisplayLine2 was: now: #hooks:0
2016-03-29 16:14:51.570 openLuup.scheduler:: [4] device startup completed: status=nil, msg=synchronising in 68.4 seconds, name=openLuup:Extensions
2016-03-29 16:14:51.570 openLuup.scheduler:: [6] device startup
2016-03-29 16:14:51.570 luup_log:6: Sonos: #6 starting up with id Sonos
2016-03-29 16:14:51.570 luup.variable_set:6: 6.urn:micasaverde-com:serviceId:Sonos1.PluginVersion was: 1.4 now: 1.4 #hooks:0
2016-03-29 16:14:51.577 luup.variable_set:6: 6.urn:micasaverde-com:serviceId:Sonos1.DiscoveryPatchInstalled was: 0 now: 0 #hooks:0
2016-03-29 16:14:51.577 openLuup.scheduler:: [6] device startup completed: status=nil, msg=nil, name=nil
2016-03-29 16:14:51.680 openLuup.server:: new client connection: tcp{client}: 0xc7e4e8
2016-03-29 16:14:51.681 openLuup.server:: /favicon.ico tcp{client}: 0xc7e4e8
2016-03-29 16:14:51.681 openLuup.HTTP.FILE:: file not found:favicon.ico
2016-03-29 16:14:51.682 openLuup.server:: request completed (0 bytes, 0 chunks, 0 ms) tcp{client}: 0xc7e4e8
2016-03-29 16:14:51.930 openLuup.server:: new client connection: tcp{client}: 0xc83948
2016-03-29 16:14:52.763 openLuup.server:: /data_request?id=lu_status2&output_format=json&DataVersion=285998431&Timeout=60&MinimumDelay=1500&_=1459285992967 tcp{client}: 0xc7e4e8
2016-03-29 16:14:52.763 luup_log:3: ALTUI: startupDeferred, called on behalf of device:3
2016-03-29 16:14:52.763 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.LocalHome was: now: #hooks:0
2016-03-29 16:14:52.766 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Version was: v1.28 now: v1.28 #hooks:0
2016-03-29 16:14:52.768 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.DataStorageProviders was: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"default":1,"type":"number","key":"nodeid","label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} now: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"key":"nodeid","type":"number","default":1,"label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} #hooks:0
2016-03-29 16:14:52.770 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.DataStorageProviders was: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"key":"nodeid","type":"number","default":1,"label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} now: {"emoncms":{"url":"","callback":"sendValueToStorage_emoncms","parameters":[{"default":1,"type":"number","key":"nodeid","label":"Node ID"},{"type":"number","key":"feedid","label":"Feed ID"},{"type":"text","key":"inputkey","label":"Input Key name"},{"type":"text","key":"readwritekey","label":"Read/Write API Key"},{"type":"url","key":"graphicurl","label":"Graphic Url","ifheight":460,"default":"http://emoncms.org/vis/editrealtime?feedid={1}&embed=1&apikey={3}"}]},"thingspeak":{"url":"","callback":"sendValueToStorage_thingspeak","parameters":[{"type":"number","key":"channelid","label":"Channel ID"},{"type":"text","key":"readkey","label":"Read API Key"},{"type":"text","key":"writekey","label":"Write API Key"},{"default":1,"type":"number","key":"fieldnum","label":"Field Number"},{"default":"//api.thingspeak.com/channels/{0}/charts/{3}?key={1}&width=450&height=260&results=60&dynamic=true","type":"url","key":"graphicurl","label":"Graphic Url"}]}} #hooks:0
2016-03-29 16:14:52.770 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToSend was: now: #hooks:0
2016-03-29 16:14:52.770 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.RemoteVariablesToWatch was: now: #hooks:0
2016-03-29 16:14:52.770 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.VariablesToWatch was: now: #hooks:0
2016-03-29 16:14:52.770 luup_log:3: ALTUI: Wkflow - enableWorkflows(3,0)
2016-03-29 16:14:52.770 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.Timers was: now: #hooks:0
2016-03-29 16:14:52.770 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.WorkflowsActiveState was: [] now: #hooks:0
2016-03-29 16:14:52.771 luup.variable_set:3: 3.urn:upnp-org:serviceId:altui1.WorkflowsActiveState was: now: [] #hooks:0
2016-03-29 16:14:52.771 luup.register_handler:3: global_function_name=myALTUI_Handler, request=ALTUI_Handler
2016-03-29 16:14:52.775 luup.call_action:3: 0.urn:micasaverde-com:serviceId:HomeAutomationGateway1.RunLua
2016-03-29 16:14:52.776 luup.register_handler:0: global_function_name=ALTUI_LuaRunHandler, request=ALTUI_LuaRunHandler
2016-03-29 16:14:52.777 luup.set_failure:3: status = 0
2016-03-29 16:14:52.777 luup_log:3: ALTUI: startup completed
2016-03-29 16:14:52.777 luup_log:6: Sonos: UPnP proxy event identified - API version
2016-03-29 16:14:52.778 openLuup.context_switch:: ERROR: ./L_Sonos1.lua:947: attempt to compare number with nil
2016-03-29 16:14:52.778 luup.delay_callback:: function: 0xaadd40 ERROR: ./L_Sonos1.lua:947: attempt to compare number with nil
Odroid (filtered log)
2016-03-29 19:24:13.995 luup.create_device:: [39] D_Sonos1.xml / I_Sonos1.xml / D_Sonos1.json
2016-03-29 19:24:16.815 luup_log:39: Sonos: #39 starting up with id Sonos
2016-03-29 19:24:16.815 luup.variable_set:39: 39.urn:micasaverde-com:serviceId:Sonos1.PluginVersion was: 1.4 now: 1.4 #hooks:0
2016-03-29 19:24:16.914 luup_log:39: Sonos: debug: sonosStartup: Vera IP Address=10.0.4.140
2016-03-29 19:24:16.978 luup.variable_set:39: 39.urn:micasaverde-com:serviceId:Sonos1.DiscoveryPatchInstalled was: 0 now: 0 #hooks:0
2016-03-29 19:24:18.065 luup_log:39: Sonos: debug: deferredSonosStartup: start 39
2016-03-29 19:24:18.074 luup_log:39: Sonos: UPnP proxy event identified - API version
2016-03-29 19:24:18.076 openLuup.context_switch:: ERROR: ./L_Sonos1.lua:947: attempt to compare number with nil
2016-03-29 19:24:18.077 luup.delay_callback:: function: 0x8ed48 ERROR: ./L_Sonos1.lua:947: attempt to compare number with nil
2016-03-29 19:25:33.236 openLuup.server:: /data_request?id=lr_ALTUI_Handler&command=oscommand&oscommand=cat%20%2Fvar%2Flog%2Fcmh%2FLuaUPnP.log%20%7C%20grep%20%22Sonos%22&_=1459300591688 tcp{client}: 0x4ee980
[hr]
943 -- WeMo plugin contrib
944 -- proxyVersionAtLeast(n)
945 -- Returns true if the proxy is running and is at least version n.
946 function proxyVersionAtLeast(n)
947 if (ProxyApiVersion and tonumber(ProxyApiVersion:match("^(%d+)")) >= n) then
948 return true
949 end
950 return false
951 end
[hr]
an error occurred while displaying the javascript tab. devid: 0-6 err:unsafe.replace is not a function
stack:TypeError: unsafe.replace is not a function
at Sonos_escapeHtmlSpecialChars (J_Sonos1.js:904:5)
at Sonos_showHelp (J_Sonos1.js:417:20)
at eval (eval at _deviceDrawControlPanelJSTab (http://172.16.5.200:3480/J_ALTUI_uimgr.js:3660:41), :1:1)
at _deviceDrawControlPanelJSTab (http://172.16.5.200:3480/J_ALTUI_uimgr.js:3660:17)
at _deviceDrawControlPanelOneTabContent (http://172.16.5.200:3480/J_ALTUI_uimgr.js:4077:7)
at _displayActiveDeviceTab (http://172.16.5.200:3480/J_ALTUI_uimgr.js:4103:4)
at HTMLAnchorElement. (http://172.16.5.200:3480/J_ALTUI_uimgr.js:6342:4)
at HTMLDivElement.n.event.dispatch (http://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js:3:12344)
at HTMLDivElement.r.handle (http://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js:3:9071)
at Object.n.event.trigger (http://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js:3:11471)
[hr]
I’m looking for feedback (good, bad or otherwise) regarding the use of this plugin within openLuup. If you’re unable to get this plugin working locally, please provide details (e.g detailed log data, number of Sonos systems, environment etc.). Providing this information will help in identifying if it’s time to reach out to the developer of the Sonos plugin and see if that individual will assist.
Thanks in advance…