Error in lua for scenes and events

Good day all,

Last week I changed a scene with LUUP code slight, but know I get a “Error in lua for scenes and events”

I just copy pasted an extra line to write a temperature in a file , and I don;t see an error in that.
Can someone take a look as well, and tell me what I did wrong? , or if there is anything wrong.

I added:

devID = 212 temperature = luup.variable_get("urn:upnp-org:serviceId:TemperatureSensor1","CurrentTemperature",devID) file:write("Gate electrics: " .. temperature .. "\176C\n")

changed:
local devID in 268 instead of 212 twice.

full Luup code;


[code]local devID = 37
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/Living_room.txt”, “w”)
file:write(temperature … “\176C”)
file:close()

local devID = 40
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/corridor.txt”, “w”)
file:write(temperature … “\176C”)
file:close()

local devID = 117
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/garage.txt”, “w”)
file:write(temperature … “\176C”)
file:close()

local devID =268
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/OAT.txt”, “w”)
file:write(temperature … “\176C”)
file:close()

local devID = 268
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/heating2.txt”, “w”)
file:write("Outside: " … temperature … “\176C\n”)

devID = 40
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Corridor: " … temperature … “\176C\n”)

devID = 37
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Living: " … temperature … “\176C\n”)

devID = 117
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Garage: " … temperature … “\176C\n”)

devID = 212
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Gate electrics: " … temperature … “\176C\n”)

devID = 228
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Hobby: " … temperature … “\176C\n”)

devID = 230
humidity = luup.variable_get(“urn:micasaverde-com:serviceId:HumiditySensor1”,“CurrentLevel”,devID)
file:write("Hobby: " … humidity … “%”)

file:close()

local devID = 91
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/heating.txt”, “w”)
file:write("Ambient: " … temperature … “\176C\n”)

devID = 92
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Buffer: " … temperature … “\176C\n”)

devID = 93
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Boiler: " … temperature … “\176C\n”)

devID = 94
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Radiator: " … temperature … “\176C\n”)

devID = 87
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Bathroom Upstairs: " … temperature … “\176C\n”)

devID = 88
humidity = luup.variable_get(“urn:micasaverde-com:serviceId:HumiditySensor1”,“CurrentLevel”,devID)
file:write("Bathroom Upstairs: " … humidity … “%\n”)

devID = 78
temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
file:write("Bathroom Downstairs: " … temperature … “\176C\n”)

devID = 79
humidity = luup.variable_get(“urn:micasaverde-com:serviceId:HumiditySensor1”,“CurrentLevel”,devID)
file:write("Bathroom Downstairs: " … humidity … “%”)

file:close()

local devID = 228
local temperature = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,devID)
local file = io.open(“/www/blueiris/Hobby.txt”, “w”)
file:write("Hobby: " … temperature … “\176C\n”)

devID = 230
humidity = luup.variable_get(“urn:micasaverde-com:serviceId:HumiditySensor1”,“CurrentLevel”,devID)
file:write("Humid: " … humidity … “%”)

file:close()[/code]


Thanks,
Cor

It seems there is an issue with vera alerts on my system. :-\

From customer care:

I didn?t see any error in scene with ID 12 either. Normally, luup code is automatically encrypted and saved in the data_user file, however I noticed the VeraAlerts plugin is saving unencrypted luup code which may trigger this error message. There were two scenes showing the same issue ?Reboot Vera daily? & ?Reboot security computer? and I had to save their data again for the luup code to be encrypted. Please monitor your system and if the problem persists we?ll need to remove the VeraAlert plugin for testing purpose.

updating firmware , these 2 scenes , they didn’t help removing this error. :cry:

I think vera alerts needs to be removed now for testting :-X :cry:

Cor

Have you been keeping up with upgrades ? or did you recently upgrade from a much older firmware version ?

Vera CHANGED the ways that LUA for scenes are stored … and it tool MULTIPLE firmware versions for them to get this working … and this error indicates that there is an inconsistency.

You can do try the following:

  1. In Vera Alerts Settings … turn off Notifications.
    Reload LUA
    Reload Browser
    This will fix the consistency issues for scenes that have notifications attached.
    NOTE: All Device notifications, are hidden scenes. Vera Alerts will fix these as well.

  2. If that does not work … start deleting scenes that have LUA … you will have to re-create them.

  3. When you are done … your can turn Vera Alerts back on.

Hello Richard , thanks for your answer.

Yes I am up to date with all firmware.
Last week I had some issues with my vera (Error in lua for scenes and events) , and customer support wanted me to delete vera alerts.

I opted to first upload an older backup I had ( from about 3-4 months ago). Although the error :"Error in lua for scenes and events"is now gone , I get the error "failed to save system configuration.

Doing:

  1. In Vera Alerts Settings … turn off Notifications.
    Reload LUA
    Reload Browser
    This will fix the consistency issues for scenes that have notifications attached.
    NOTE: All Device notifications, are hidden scenes. Vera Alerts will fix these as well.

Didn’t help , ( but all my message overides are gone)

Tomorrow I will remove the scenes with Lua in it.

oh crap … I see now this is for the:“error in LUA for scenes and events” …
Any Idea how I get rid of the “failed to save system configuration”

Thanks,
Cor

[quote=“Cor”]Hello Richard , thanks for your answer.

Yes I am up to date with all firmware.
Last week I had some issues with my vera (Error in lua for scenes and events) , and customer support wanted me to delete vera alerts.

I opted to first upload an older backup I had ( from about 3-4 months ago). Although the error :"Error in lua for scenes and events"is now gone , I get the error "failed to save system configuration.

Doing:

  1. In Vera Alerts Settings … turn off Notifications.
    Reload LUA
    Reload Browser
    This will fix the consistency issues for scenes that have notifications attached.
    NOTE: All Device notifications, are hidden scenes. Vera Alerts will fix these as well.

Didn’t help , ( but all my message overides are gone)

Tomorrow I will remove the scenes with Lua in it.

oh crap … I see now this is for the:“error in LUA for scenes and events” …
Any Idea how I get rid of the “failed to save system configuration”

Thanks,
Cor[/quote]
I believe they are related.
One is detected at runtime …
And the other at safe time.

Sent from my SAMSUNG-SM-G935A using Tapatalk

I can’t get it to stop.

Initially I tried:

  1. In Vera Alerts Settings … turn off Notifications.
    Reload LUA
    Reload Browser
    This will fix the consistency issues for scenes that have notifications attached.
    NOTE: All Device notifications, are hidden scenes. Vera Alerts will fix these as well.

I still got the :“unable to save configuration”

Than I deleted all scenes with LUA in it .

I can create scenes , but as soon as I turn on notifications in vera alerts again , I am unable to create/change scenes.
When I switch the notifications in settings off again, I can create scenes again.

I also can not modify anything in Veraalerts , I get the same error message everytime.

Hope you can help ,
Cor

I think it is solved.

Last night , restoring after backup, removing all scenes with LUA , even removing veraalerts , pressing everytime CTRL-F5 ( chome-windows 10). I kep on getting the "unable to save system configuration.

At one one I ( accidentaly) closed down the chrome app , but when I started again , no problem… till now everything is good!

Thanks,
Cor

We’re you running locally or through the remote access servers?

Locally.

Cor