Version 1.5 (Release Candidate)

Woke up today to my house talking.
Gave me the weather and a “Have A Good Day”
Thank you Patrick.
I am still interested in learning how to Set Debug Logs.
Is the on/off switch on the Settings page of your App?
I’ve never touched those. Read in the forum only use it when “people like you” :slight_smile: are trying to see behind the scenes?
Is it the Verbose Logging via Dashboard Settings Tabs ?
I read here in the forum it is best to leave them off because it slows Vera down…
So where do I set it to 15?
As far as reloads I have been using Ctrl F5 before sending you the log files.
Is a hard refresh unplugging Vera for @ 10 seconds then plugging it back in?
Thanks Again for making Vera work better for all of us!
Lakewoodjazz

1 Like

Can you please share how your Reactor logics looks like for that :smiley:
/Mattias

For the Sonos plugin, turning on the debug log level requires that you set a state variable on the device. You go into the Sonos device’s Advanced > Variables tab, locate the variable named DebugLogs, hit the “Edit” button/link, and enter 15. This is the simplest way to change the value of a state variable in Vera (you can also do it with Lua, action requests, etc.).

Ctrl-F5 is a hard refresh of your browser, but not a Luup reload. Unplugging your Vera and plugging it back in will cause a Luup reload, but that’s a hard way (for both you and it). A simple way is to do any of the following (pick one):

  1. Go to the Advanced > New service tab on any device and click the “Reload Engine” button there;
  2. Go to the Apps > Develop apps > Test Luup Code menu item and enter and run the following code: luup.reload()
  3. Go to the `Settings > Net & Wifi* menu item and hit the “Reboot” button there (a little more than just a reload, but fine).

Wow.
Beautiful man.
So eloquently explained.
Been toying with Vera for the last 5 years at our new home and always lacked clarity of those terms when discussed in Forum posts.
So…
How are the 15 debug logs accessed?
I’ve never rebooted the Net and Wifi setting in the last 5 years. Is that something automatically done with a Firmware upgrade or a “not so hard” luup reload?
Would it be a benificial maintenance?
Thanks

Setting the value to 15 just increases the number of messages the Sonos plugin will write to the LuaUPnP.log file you already know and have been grabbing, so it all just goes in there, just more of it. Setting it 0 puts it back to normal. It’s different for every plugin, but most have some variable for this purpose, and I think most will use 0 for normal logging and something non-zero for verbose logging.

This is unrelated to the “verbose logging” setting in the Vera Settings. That’s for the system itself, and does not change the logging level of any (or all) plugins. I never touch that setting, myself. The Vera system messages are already verbose enough for my tastes.

The “Reboot” on the Net & Wifi button doesn’t really connect the two–you’re not specifically rebooting the network part of your Vera, it reboots the entire box. This is just a generic shortcut to get that done that happen to be on that page.

I won’t get into the fray of discussion on whether it’s beneficial to reboot your Vera periodically. There are a lot of impassioned people in these forums who believe that’s a must for stability, but I haven’t seen the need since 7.0.29 (or really in the case of my house system, since 7.0.27 after removing some bad plugins I had been using). It likely doesn’t hurt, though. Just schedule it at a time where it won’t get in the way of any automations, if you’re going to go that route.

Hi Mattias
If your asking me…lakewoodjazz I have yet to install this highly regarded app of rigpapa’s. I see from Forum responses it is very popular. I’ve begun looking at the youtube videos that Patrick has kindly created.

I haven’t seen @lakewoodjazz 's full config, but if I were to speculate on using Reactor, it’s pretty easy to trigger on time of day, or some combination of events that reflects a predictable behavior on your part when you wake up (e.g. between 6am and 8am when the bathroom light is turned on) and want to trigger the announcement.

A weather plugin (or SiteSensor in the equivalent role) can gather all the weather data. Reactor allows you to construct a sentence in an expression variable from the weather plugin data: Good morning. It's currently <temperature> degrees and <sunny|partly cloudy|raining>. The chance of rain today is <rainpercent>. You can then send that variable/sentence to your Sonos in a “Say” action to speak it. You’d need to know a couple of details about Reactor expressions that I can get you through, but it’s not hard, and once you understand it, I think it will seem pretty straightforward and you’d be well-armed to make any similar “dynamic” TTS announcements you’d care to make.

Thanks for the explanations.
???
What determines the "Engine driven by another zone " In the Sonos app? I only have ever created 1 device (#298) for my 5 zones (7 speakers) but the grouping changes depending on what my family was watching and or listening to after a Scene runs like this…
luup.call_action(“urn:micasaverde-com:serviceId:Sonos1”, “Say”,
{Text=“Door Open. Apartment Front Door Open”, Language=“en-CA”, GroupZones=“ALL”,
Volume=45, SameVolumeForAll=“true”},
298).
After the tts scene above runs I often see “Group driven by another zone” and not all the previous media playing returns…
Would creating a device number for each zone be more benificial for -TTS lua Scenes?

Since the Sonos plugin wasn’t mine to begin with, I just picked it up (recently, a couple of months ago) from another developer, I’m not yet familiar with all of the innards. I even only have one ancient zone player (a ZP100), but I ordered another one yesterday on Amazon so I can more thoroughly test this thing.

Just from reviewing the code, I am aware of bugs in the handling of zone groups. I can see both errors in logic and variable handling (obvious stuff, like using variables that aren’t even defined). When I get my second zone player (this weekend), I will attack these and post further updates to the stable branch.

Which bad plugins did you remove?

rigpapa - thanks for taking this on. It’s a complex plugin.

I’m hoping to see this work on openLuup. First though; I had a look at Futzle’s uPNP proxy as I thought I would hook it up to the AltApp Store. The code in mios/trac and GitHub repositories are identical. However:

Having a look through the code (see initScript in L_UPnPProxyDaemon.lua), I see she creates a script that extracts the L_UPnPProxyDaemon.lua.lzo file (as would be found on a Vera) using the Pluto extractor (line 37).

As openLuup doesn’t use *.lzo files, this script would need to see if the file is already available in the extracted form ie L_UPnPProxyDaemon.lua

I might be able to have a go at it but it’s not really my area of expertise. Anyway - thought I would mention it needs looking at for openLuup. Regards - Lurker.

Hello Rigpapa
Been noticing this on my Notifications tab.

System error : Device: 574. Fail to load implementation file D_FUP_uuid RINCON_5CAAFD6E4BA001400.xml

Device 574 is my Sonos Playbar.

Any progress with your zone group work from Oct 18 post?

“Just from reviewing the code, I am aware of bugs in the handling of zone groups. I can see both errors in logic and variable handling (obvious stuff, like using variables that aren’t even defined). When I get my second zone player (this weekend), I will attack these and post further updates to the stable branch.”
Have a great Holiday Season & Thanks for all your help keeping this forum moving forward!

Yeah, pretty aggressive wool-pulling has been going on. I’ve converted the plugin to parent-child, because one of the biggest issues with the old is that each zone player is a new instance of the plugin and so consumes huge amounts of memory if you have multiple players. The core of the plugin seems to be working fine, and the last week or so off and on I’ve been chipping away at converting the user interface (player, settings, etc.) to the UI7 API–it was still in UI4/5 legacy. Not ETA yet, though.

So is there a new download or App update file that creates multiple child devices for my other 9 Sonos speakers?

Not yet. Still have some work to do. I’ll post here when I’m ready for others to whack on it.

Technology and patience ho hand in hand. As usual we all owe you many thanks.
Will your work allow user defined tts to select sonos speakers by device number in the tts code?

You can do that in 1.5. The GroupDevices parameter on the Say action takes a comma-separated list of Luup device IDs.

The GroupZones parameter on the Say action can have the following values:

  • The word “ALL” by itself, meaning speak on all configured zone players (GroupDevices will be ignored);
  • The word “CURRENT” by itself, meaning speak on the target zone player and any other zone players grouped with that player (GroupDevices will be ignored);
  • A comma-separated list of zone player UUIDs (any players listed in GroupDevices will be merged with this list).

Hi Rigpapa,
finally got around to installing the new version of the Sonos plugin. thanks for all the work on this. Everything seems to be working (i.e. TTS, playing music, etc.), but in the logs i see the below messages. not sure if it is something to worry about or not.

01	12/21/19 14:25:10.126	luup_log:450: Sonos: error: setData() can't set Bass on 450 no SID! <0x777cc320>

01 12/21/19 14:25:10.127 luup_log:450: Sonos: error: setData() can’t set Treble on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.128 luup_log:450: Sonos: error: setData() can’t set Loudness on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.128 luup_log:450: Sonos: error: setData() can’t set OutputFixed on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.129 luup_log:450: Sonos: error: setData() can’t set HeadphoneConnected on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.130 luup_log:450: Sonos: error: setData() can’t set SpeakerSize on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.130 luup_log:450: Sonos: error: setData() can’t set SubGain on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.131 luup_log:450: Sonos: error: setData() can’t set SubCrossover on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.131 luup_log:450: Sonos: error: setData() can’t set SubPolarity on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.132 luup_log:450: Sonos: error: setData() can’t set SubEnabled on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.133 luup_log:450: Sonos: error: setData() can’t set SonarEnabled on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.133 luup_log:450: Sonos: error: setData() can’t set SonarCalibrationAvailable on 450 no SID! <0x777cc320>
01 12/21/19 14:25:10.134 luup_log:450: Sonos: error: setData() can’t set PresetNameList on 450 no SID! <0x777cc320>

I also see a bunch of these, which i attribute to the UPNP Event Proxy, but thought i would add them here to see if it is something to look at:

|01|12/21/19 14:32:58.631|JobHandler_LuaUPnP::ConfirmUpnpFile can't retrieve http://10.30.10.94:1400/xml/device_description.xml//xml/QPlay1.xml basefile QPlay1.xml <0x6f9db520>|
|---|---|---|
|01|12/21/19 14:32:59.317|FileUtils::ReadURL 0/resp:400 user: pass: size 100 http://10.30.10.94:1400/xml/device_description.xml//xml/ContentDirectory1.xml response: <HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML> <0x6f9db520>|
|01|12/21/19 14:32:59.317|JobHandler_LuaUPnP::ConfirmUpnpFile can't retrieve http://10.30.10.94:1400/xml/device_description.xml//xml/ContentDirectory1.xml basefile ContentDirectory1.xml <0x6f9db520>|
|01|12/21/19 14:32:59.323|FileUtils::ReadURL 0/resp:400 user: pass: size 100 http://10.30.10.94:1400/xml/device_description.xml//xml/ConnectionManager1.xml response: <HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML> <0x6f9db520>|
|01|12/21/19 14:32:59.324|JobHandler_LuaUPnP::ConfirmUpnpFile can't retrieve http://10.30.10.94:1400/xml/device_description.xml//xml/ConnectionManager1.xml basefile ConnectionManager1.xml <0x6f9db520>|
|01|12/21/19 14:32:59.826|FileUtils::ReadURL 0/resp:400 user: pass: size 100 http://10.30.10.94:1400/xml/device_description.xml//xml/RenderingControl1.xml response: <HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML> <0x6f9db520>|
|01|12/21/19 14:32:59.826|JobHandler_LuaUPnP::ConfirmUpnpFile can't retrieve http://10.30.10.94:1400/xml/device_description.xml//xml/RenderingControl1.xml basefile RenderingControl1.xml <0x6f9db520>|
|01|12/21/19 14:32:59.832|FileUtils::ReadURL 0/resp:400 user: pass: size 100 http://10.30.10.94:1400/xml/device_description.xml//xml/ConnectionManager1.xml response: <HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML> <0x6f9db520>|
|01|12/21/19 14:32:59.833|JobHandler_LuaUPnP::ConfirmUpnpFile can't retrieve http://10.30.10.94:1400/xml/device_description.xml//xml/ConnectionManager1.xml basefile ConnectionManager1.xml <0x6f9db520>|
|01|12/21/19 14:32:59.840|FileUtils::ReadURL 0/resp:400 user: pass: size 100 http://10.30.10.94:1400/xml/device_description.xml//xml/AVTransport1.xml response: <HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML> <0x6f9db520>|
|01|12/21/19 14:32:59.841|JobHandler_LuaUPnP::ConfirmUpnpFile can't retrieve http://10.30.10.94:1400/xml/device_description.xml//xml/AVTransport1.xml basefile AVTransport1.xml <0x6f9db520>|
|01|12/21/19 14:32:59.847|FileUtils::ReadURL 0/resp:400 user: pass: size 100 http://10.30.10.94:1400/xml/device_description.xml//xml/Queue1.xml response: <HTML><HEAD><TITLE>Error 400</TITLE></HEAD><BODY><H1>Error 400</H1><P>Bad Request</P></BODY></HTML> <0x6f9db520>|

Those are harmless. Different models of zone player report different parameters, many of which the plugin discards. I reduced the log level to debug on these for 2.0. I’m considering doing it for 1.5 before release… but I’m not supposed to be making changes now. :slight_smile:

Hi Rigpapa
Perhaps I dont have the app installed correctly. I only have one device number (298). Do I need a seperate install for the other 8 devices in order to get seperate device ids? Then on the 8 individual “Settings” assign from the “Discovery” individual Sonos Devices as the “Selected Zone”? My current app Device#298 sees all 9 Sonos Devices as discovered and lists their IP addresss. Can the lua program include device ip addresses?