Vera Restarts Often (help getting logs)

Hello,

I am hoping someone can help me figure out how to access my logs after my Vera restarts. First, a little background… Recently (the last two weeks or so) Vera has been restarting frequently. I have installed a couple of apps, configured some new PLEG conditions and added some Arduino devices. At first I thought this was related to memory (based on what I have ready on this forum so far) but I seem to have plenty available. According to EventWatcher I have Memory Avail (kB)99328, Memory Free (kB)82380, App Memory Used (kB)443.

I was hoping to look at the logs but they get reset (I think they do anyway) each time Vera restarts. I just bought a usb hub to try to enable logging to usb but I only ended up wiping out months of DataMine data. So, rather than do any more damage I thought I’d come here to ask what the best way is to preserve logs after a Vera restart.

Thanks,

Pete

The best way is to use a USB stick as you mentioned in your post. Since you use data mine, you’ll run into issues as you mentioned as vera will use the first USB stick it finds and can be random order. Remove the data mine USB stick for the time being and enable USB logging to see where the restarts are coming from. You’ll loose logging to data mine for the time being though.

  • Garrett

Thanks. I lost all my datamine data anyway so no big deal to pull the stick. I’m setting up logging now so hopefully I can get to the bottom of this.

Although I didn’t fully understand the logs I was able to interpret them enough to figure out that I had a bad PLEG condition that was causing the restarts. I haven’t had time to figure out what was actually wrong with my condition but I have at least been able to stop the restarts. Thanks for the help!

Did you contact Richard about the bad condition so he can provide a fix in his code to prevent this from happening?

  • Garrett

Good point. I had not done that, but will now.

Out of curiousity, do you mind sharing the PLEG condition that was causing the restarts?

Sure, here are my conditions. I was trying to get rid of my NOW usage.

There is not likely any issue with a condition that will cause a restart.
What could trigger a restart is:

  1. the frequency of an input trigger.
  2. An input trigger, or the actions that runs as a result of a condition being satisfied, causing memory problems or device dead locks, if the device in the action is not responding quickly enough to the number of requests being made of it.

[quote=“RichardTSchaefer, post:9, topic:181987”]There is not likely any issue with a condition that will cause a restart.
What could trigger a restart is:

  1. the frequency of an input trigger.
  2. An input trigger, or the actions that runs as a result of a condition being satisfied, causing memory problems or device dead locks, if the device in the action is not responding quickly enough to the number of requests being made of it.[/quote]

You were right. I celebrated too soon. My Vera restarted and things stopped working again last night. It must have something to do with #2. The action is only turning on one light to 33%, but it is using the the MySensors gateway (which does other things). I recalled seeing a post about this a little while ago so I looked for it. I found it and have asked HEK if he has updated the plugin based on Richard’s feedback in this post:

[quote=“RichardTSchaefer, post:40, topic:180340”]@HEK

I think you have problems with your Plugin … You have all of the actions defined as RUN (as opposed to JOB).
As a result if a burst of actions are sent to your device it can cause an overrun restart.
With a RUN you are running on the stack (Thread) of the person that called you … and if to many people call you at one time … it will restart Vera.
With a JOB each call gets queued any a thread assigned to your plugin will process the requests sequentially.[/quote]

This may be what is causing the problems…

An update…

I’m hopeful I have solved my Vera restart issues based on what Richard said about that there can be problems when running a PLEG condition too many times, too fast (Option 1).

As I was doing some more thinking about this problem I thought it might be due to my motion sensor occasionally not working correctly. Sometimes (it seems to be random) my motion sensor will flip flop from triggered to not triggered very fast (4 times a second). I had previously tried to fix this with a resistor, changing the power supply but nothing has seemed to work. Well this weekend I coded the Arduino to only update a trigger every 20 seconds. This means no matter how many times the motion sensor is triggered it only sends triggered 1 time in 20 seconds.

So far, this seems to have fixed the issue.