The code that I use to either execute or cancel a scene from running is no longer working.
I recently added a new App, the MyQ garage app, and had some trouble with getting it set up properly, I also recently had some trouble getting Google Home to sync my devices. I was able to resolve both problems and have no reason to believe that either are related to my current problem.
The code in question, and several variations, have been running just fine for years now and I am lost as to why all of a sudden it no longer works. The idea is that a scene is scheduled to run at say 6am, my code simply checks the status of a device and either allows or does not allow the scene to run
local dID = 19 -- Device ID of your VirtualSwitch (Guest Mode) local allow = true -- true runs scene if switch is on, false blocks it local status = luup.variable_get("urn:upnp-org:serviceId:VSwitch1","Status",dID) return ((status == "1") == allow)
I have even tried deleting the code and simply using:
and also i tried
in all cases the scene just executes as if there were no code. When I debug it in ZeroBrane I get an error:
unexpected symbol near ‘return’
I have verified that there are no extra characters or symbols. As i said before i have deleted the code and typed out return false. still the scene executes.
I am looking for any help in either fixing this or where to start looking for the problem.