[quote=“rigpapa”][quote=“PrincessCleavage, post:8, topic:200412”][quote=“rigpapa”][quote=“PrincessCleavage, post:6, topic:200412”][quote=“rigpapa”][quote=“rigpapa, post:4, topic:200412”][quote=“PrincessCleavage, post:3, topic:200412”]… also this does not explain why Vera scene will not output TTS when reactor state is assigned as a trigger and scene is run manually but when vSwitch state is assigned as a trigger and scene is run manually The action is as expected (TTS output from Sonos)
[/quote]
Yes, you noted that the scene does not run when run manually or when tripping the ReactorSensor that is the scene trigger. I would look in your logs and see if you can find any messages logged that may help.[/quote]
Oh and of course, if your condition is “restores from tripped”, you need to both trip and untrip the ReactorSensor, because the trigger will be on the untrip.[/quote]
All I can see in logs is:
Scene::RunScene running 267 Alexa Stop 2 <0x6dea2520>
0101/11/19 11:51:52.309LuaInterface::CallFunction_Scene Scene 267 failed attempt to call a nil value <0x6dea2520>[/quote]
Is your scene using Lua? Can you post that here?[/quote]
For some reason all is working as expected again… did anything change in reactor app?[/quote]
I can’t change things remotely. There are times I have wished I could, but no.
Below is the luup in the scene with three reactor states restores from triggered weather armed or disarmed which is now working for some reason:
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",
{Text="Alexa", Language="en", Volume=95},
601)
luup.sleep (500)
luup.call_action("urn:micasaverde-com:serviceId:Sonos1", "Say",
{Text="Stop", Language="en", Volume=85},
601)
Scene Lua should always end with “return true” or “return false”. Even though nothing else in the scene may be left to execute, suspicious and undefined, potentially random behaviors could result when you don’t return a definitive result. This is not a Reactor thing. This is a scene Lua thing since forever. Your scene just ends without a return, so you are effectively returning nothing to Luup, and I would venture to guess that leaves a roll of the dice and who knows what happens after (but when you return nothing and get a mysterious error about “nil” in the log, hmmm… sounds fishy to me).
And your sleep is only 1/2 second. Is that enough to get work done? It may be that there is simply a race condition–the delay is too short, but sometimes Vera hits the delay on the money, and maybe sometimes it’s a little late, with the latter making a difference.[/quote]
Just right time to trigger Alexa to lister then action command (I have played with this timing a bit). What should I add to the end of my luup to complete it correctly?