Dark Sky Morning Weather Report Over Sonos Stopped Working

Hope I posting in correct category.
With the forums help I have had run a lua Scene with a Dark Sky 10:30am Weather Report TTS over Sonos.
Yesterday instead of the report I am only getting Sonos playing a radio station. I checked my api key from DarkSky and it is still active. I will try to upoad UPNP logs from @ the time the Scene runs. Can anyone help fix my problem?
I did update Sonos to the current Hotfix but it did not fix the connection to DarkSky.

Attached are UPNP logs.
upnp; log 9.25.pdf (43.4 KB)
UPNP Log 9.26.pdf (44.9 KB)

Lakewoodjazz

The Sonos plugin does not inherently have a connection to DarkSky (or vice-vera that I’m aware of). Something has to react (!) at 10:30am and issue a TTS command to Sonos to speak the weather. There are pieces of this puzzle you have not described, and they seem like the place to start looking.

Hey Patrick
Below is the lua code that has been working for months.
"
url = require(“socket.url”)
local AV_DEV = 298
local LS_SID = “urn:micasaverde-com:serviceId:Sonos1”
local TEMP_SID =“urn:upnp-micasaverde-com:serviceId:Weather1”
local OwTempTodayHigh= luup.variable_get(TEMP_SID, “TodayHighTemp”, 620)
local OwTempTodayLow= luup.variable_get(TEMP_SID, “TodayLowTemp”, 620)
local currentCondition= luup.variable_get(TEMP_SID, “TodayConditions”, 620)
local tomorrowCondition = luup.variable_get(“urn:upnp-micasaverde-com:serviceId:Weather1”,
“TomorrowConditions”, 620)
local OwTempTomorrowHigh= luup.variable_get(TEMP_SID, “TomorrowHighTemp”, 620)
local OwTempTomorrowLow= luup.variable_get(TEMP_SID, “TomorrowLowTemp”, 620)

luup.call_action(LS_SID, “Say”, {Text = string.format("Todays high temperature will be %s Todays low temperature will be %s… Current conditions are %s… tomorrows is %s with a high temp of %s and a low of %s " , OwTempTodayHigh , OwTempTodayLow, currentCondition, tomorrowCondition, OwTempTomorrowHigh, OwTempTomorrowLow) ,Volume=60, UseCache=0}, AV_DEV)
"
Would you be kind enough to look at the upnp logs I grabbed.
I agree Sonos isn’t liking the TTS call but I don’t see a change in my lua code that was working. The scene says “Success” but TTS.
Thanks for your assistance as usual.

But no TTS…
Also
Device # 298 is correct.
Renewed api key from Dark Sky.

There are relevant messages at the “Say” actions in your log file.

Is that good or bad?
:thinking:

Hi Patrick
You taught me how to access the upnp logs but I don’t understand the syntaxes.
Is the color of the log a clue? Are red logs errors?

Looking at the logs in your browser, you should be able to use your browser’s in-page search feature (CTRL-F on most Windows browsers, for example) to find the string “Say”. That’s the action being invoked. If you read down, you will see alert messages telling you what the problem is. The resolution should be pretty clear from the messages.

Ok I do remember you teaching me to find the Say commands…
Seems Azure is not authorizing the TTS for this scene.

“luup_log:639: Sonos: AzureTTSEngine:say() authorization failed with Azure service”

The Azure key listed matches the Azure key listed on the Sonos TTS Config and Settings page.
All other TTS is working example…“Door Open”, “Driveway Sensor Detects Motion” ect…
But not Dark Sky Weather announcement lua scene.
This is not a new scene. It was a working scene.
Shall I try Restoring Vera back to a previous backup to see if that helps?

Never! I refer to this as “scorched Earth debugging” and it should absolutely be everyone’s last resort. Uninstalling and reinstalling plugins goes into that same bucket.

Your other TTS announcements are probably working because the TTS cache has those statements cached and it’s replaying previous-converted text audio. Your Azure key has expired and you need to renew it.

Gotcha …I’ll keep troubleshooting
I am not using the free Azure. I set it up with a credit card and pay @.50 per month. Today I logged in and reset the key then reinstalled it, hard reset the page (F5) then reloaded from Settings page. Still no luck with the Dark Sky scene.

Spoke with Microsoft Azure about my account.
My account is active.
Here is the info fromthe Azure Website:
Azure Vera TTS
000000000000 = MY AZURE SUBSCRIPTION #
Owner $0.07 Active

A lot of people, myself included, have experienced Azure expiring the Cognitive Services keys for whatever reason. The fix is to just go in and generate a new key and configure it on the Sonos master device.

Yes Im familiar with the process and like others have done it succesfully before but it is not working now.
Attached is a UPNP log with a newly created Weather Announcement Scene.
I am OK with "86"ing the morning Weather Announcement but I have a few non cached TTS that need the Azure connection to play nice.
Appreciate your help.UPNP LOG Dark Sky TTS with New Key from Azzure Acct…pdf (10.6 KB)

Try cutting the text message into two pieces. It’s possible Azure is rejecting it because it’s too long.

Hmmm… wait a minute. First, let me put you on the latest and greatest TTS module.

Download this file by right-clicking on the link and choosing “Save As…”. Do not left-click and copy-paste to a file. RIght-click only. Make sure the save filename is only L_SonosTTS.lua with no additions or changes.

L_SonosTTS.lua (stable branch on Github)

Then upload the saved file to your Vera using the uploader at *Apps > Develop apps > Luup files".

Done. But no success.
Tried shorter non-cached TTS with same result.
Scene runs “Success” but no TTS.
Perhaps its a Firewall issue with Azure?

OK. A couple of things. First, let me confirm (you tell me) what model Vera you are using.

I’m going to ask you to install the full current Hotfix package that’s in the pinned post in the Sonos category. Then go into your Sonos master device, turn on only the TTS debugging, save changes, and run your TTS attempts and capture log files. Let’s see what it looks like with the debug on using the latest code.

Here we go.
Vera Edge 1.7.4452
Hotfix 20273 installed
Debug TTS logs turned On
Same result No TTS
upnp file attached. (removed Azure key number)
luup_log:639: Sonos: AzureTTSEngine:say() conversion request failed, invalid protocol
Invalid Protocol???
Debug Log.pdf (15.8 KB)