My vera lite (firmware v. 1.5.408) doesn’t let me change anything anymore (Creating/changing scenes, devices…etc)
I checked the log and got the below errors. It seems user_data cannot be overwritten for some unknown reason.
Usually when that’s going on with Vera, you’ll see a bunch of crud shown in the output from running “[tt]logread[/tt]”.
I burned out a Vera2 unit about 12-18months back with that problem. I don’t recall the specific errors in the log, but it’ll be obvious since they’re all about IO problems with certain devices.
I monitored the /etc/cmh directory and it seems user_data.json.lzo.new is the file being updated while user_data.json.lzo keeps disappearing, even after I recreate it from user_data.json.lzo.new.
the other files user_data.json.lzo1…5 stay the same.
I restored the backup file into a brand new Veralite and got the same errors. I think we can rule out the file system corruption possibility… I opened a ticked yesterday with MCV Support. Waiting for their input.
It looks like I had too many plugins running consuming too much memory. Although free showed there was still around 3k available but apparently that wasn’t enough for the LuaUPnP engine to function properly.
I tweaked the plugin so it consumes less memory (each instance consumed around 250k !!) by loading needed libraries using require() on demand and then releasing them (I use socket.http)
so the code would look like this :
[code]function httprequest(url, postMsg)
– Loading the http package
package.loaded.http = nil
local http=require(‘socket.http’)
http.TIMEOUT = 1
local r,c = http.request(url, postMsg)
--unloading the package
package.loaded.http = nil
collectgarbage("collect")
return r,c
end
[/code]
The memory consumed by require() was not fully released (no idea why) but now each instance of the plugin is consuming considerably less memory.
Any chance you could help me with my problem that I’m having? I have got the same issue that you have described above but I don’t understand what you did to fix it.
The lua function collectgarbage(“count”) returns the total memory in use by Lua (in Kbytes) ( [url=http://www.lua.org/manual/5.2/manual.html#pdf-collectgarbage]Lua 5.2 Reference Manual ).
You can insert it at various points in the plugin code to log the amount of memory used.
Best Home Automation shopping experience. Shop at Ezlo!