Intermittent Lua Error

Hi,

Over the last week or two my vera keeps throwing intermittent Lua Errors in Events for no apparent reason. This obviously wreaks havoc with some of my lua and virtual switch dependent scenes which are not functioning correctly during this state. Restarting the luup engine clears the error but it then returns hours later. Can anyone help me track down the cause? Support has not answered this request.

Thank you,
m

What do you see in the log at the point where the errors happen?

I’m not sure how to do that. I think it went at around 1:00 last night.

M

There are several ways to access the log. See: Logs.

The easiest way is to install Info Viewer plugin.

This keeps occurring after a random number of lua restarts, be it ones that I initiate or the automatic nightly restarts. My system is messed up when in error as all the other scenes, codes and conditions fail. I’m not sure just what I’m looking for in the logs and how I can see what occurred prior to launching the log. Can anyone help here?

M

Can you give a more comprehensive description of what happens? How do you know the error has occurred? What error messages are displayed?

Earlier you indicated that restarting the luup engine cleared the problem but now you suggest that it seems to occur after a restart. Are we talking about two different types of restart?

When you display the log, it shows you everything back to the last time the log file was rotated. Depending on the amount of activity, you may be able to see the last restart in the log and any errors that got flagged. You could also consider switching to logging to a USB stick. This allows you to see a longer time period in each log file. To view the file you will need to use WinSCP. The file is /var/log/cmh/LuaUPnP.log

Hi,

I cant add more detail no so will add to this post later but I too have had this issue. I get an error something like “error running lua scripts and events” and simply restarting lua fixes the issue. as described here when the error occurs the system is not functioning correctly if at all, until lua is restarted.

I also have not yet investigated the cause but will look at my logs and post back in due course.

I get the error intermittently and with no apparent reason.

I run latest 1.5.622 and have the MIOS Update utility installed and have seen the problems (I think) since installing the update plugin?

I shall watch this post and also look further into my own issue and share here as sounds very similar.

I have had my VeraLite go crazy and flag all sorts of errors when Verbose Logging is enabled - even logging to USB. It may be worth checking. SETUP, Logs, Verbose Logging

I run latest 1.5.622 and have the MIOS Update utility installed and have seen the problems (I think) since installing the update plugin?
Hmm. A possible [b]auto-modify-and-break[/b] plugin. I don't think I shall be installing that anytime soon. ;D

[quote=“RexBeckett, post:6, topic:176578”]Can you give a more comprehensive description of what happens? How do you know the error has occurred? What error messages are displayed?

Earlier you indicated that restarting the luup engine cleared the problem but now you suggest that it seems to occur after a restart. Are we talking about two different types of restart?

When you display the log, it shows you everything back to the last time the log file was rotated. Depending on the amount of activity, you may be able to see the last restart in the log and any errors that got flagged. You could also consider switching to logging to a USB stick. This allows you to see a longer time period in each log file. To view the file you will need to use WinSCP. The file is /var/log/cmh/LuaUPnP.log[/quote]

About a week ago I was updating some scenes and doing multiple saves. After one of the them the system said that vera was taking too long to restart and rebooting would not help. I emailed support and they were able to restore it (without losing any of my new work, so obviously not from a backup)

Since then I have been woken in middle of the night with various scenes running amok and when logging in see the error in scenes and events on the screen. A restart (sometimes more than one) will clear it.

Since then I have come to realize that this does occur after some automatic or manual lua restarts. It can be fine for a few days but then go into error after the nightly lua restart.

I have deleted and reinstalled the plugins I think I may have been working on that first night but it hasn’t fixed anything.

I have USB logs enabled but when I access using the plugin or browser I don’t see much before when I start it.

I have well over 100 scenes and devices and system has been stable for well over a year. I really don’t want to rebuild this.

Can you try a restore from before the changes and see if it fixes your issue?

  • Garrett

Is verbose logging enabled? MiOS support are inclined to enable this when they are fixing problems and I have seen it cause similar symptoms on my unit - even with USB logging.

No, it is not.

Is it possible that I have too many luup codes on my Vera? Is there a limit? Should the length of any one scene luup code be no longer than x?

m

Just to add to this thread, if it’s of any use…

I first encountered the message “error running lua scripts and events” tonight when I created a new scene which had a large amont of LuuP code in. After a number of restarts the error would not go, so in the end I deleted the code i’d added, saved it and reloaded once more and the error went away…

My largest luup code has over 1400 words and 12,000 characters, is this too large?

My lua engine only throws an error every so often. It could work fine for days at a time and then break during on of the nightly restarts.

I can’t even capture the problem in a log as it disappears.

M

PLEG is around 3.5 times this size.