Auto reboot twice

Oh wait, of course they do. I use them (and Hub Variables) all the time, and they certainly retain.

That would probably be the easiest

I'm not sure how to use a boolean or variable to reboot the hub a second time after an auto-reboot but not in an endless loop.

@bbrannon I mean 220 is a little soon to reboot. Lower free memory doesn't mean lower performance in general. I would set my threshold to around 120. I've run on 85k for several days and didn't notice any real performance issues. JMO.. I only restarted because of the recent update. Overall my hangs around 180-220

image

Noted, and how to reboot twice in succession? There is a significant difference in available free memory after a second boot.

User @thebearmay's power outage manager. Create a virtual switch as a trigger...(there are probably other ways with this) [BETA]Power Outage Manager

You may have to play with the timing by adding some delays but I think this will work

1 Like

I think this should handle a second boot. Virtual switch gets turned on during low memory reboot.
Edit: this works.

I've been using an http post to reboot. Where do I access "reboot() on Hub Information". I have the Hub Information driver installed. Looking through the various rule action options is coming up empty for me. Obviously a forest for the trees thing :wink:

1 Like

@thebearmay

1 Like

Thanks, Got it. That's obscure.

1 Like

I kind of fell like there is a placebo effect happening here. I think it is more about timing then It is about what actually happens.

It would be interesting to see what would happen if the user would hit the url right after a reboot a few times and see if he got similar numbers. After one and then two reboots.

1 Like

See post#1.
I came to this conclusion some time ago. I've been tracking free memory via Hubigraph for several months and have noticed a significant jump in free memory after a second reboot following an auto restart from low memory < 220,000. Also after a hub update. When graphed it is rather obvious.

In the end, two rules. Low memory boot and reboot 15 minutes later if rebooted by the low memory rule. It was a useful exercise for me. Finally figured out the use of private booleans and an activator from a device.

image

1 Like

I'm just unsure what you think the boost in free memory on the second reboot is going to give you...

Free memory steadily declines. The significant drops are at overnight hub cleanup, seems like that doesn't work so well. If I start from 150,000 higher I would think it would add the time it takes to loose 150,000 to the time required to reach a reboot point. If nothing else it was a useful exercise for me.

Yes and no. From the reboot it declines at its greatest rate from the time of the reboot. Then as the days pass it declines less and less. My system takes about a week to level off and at that point Ih am around 200MB free.

Below is my grafana graph that shows the last 10 days

The thing that really doesn't make sense with your hypothesis about gaining memory is there is a reboot around 2/4 on that graph were the hub was not only rebooted, but completely shut down and disconnected from power.

I should point out on that graph the yellow line is my development hub with very little running on it. The green line is my prod hub that actually runs my house. So again the more it is doing the more memory will be consumed.

Your graph may prove my point. The working hub starts around 380,000. That was typical of mine. A reboot shortly after that garnered me an additional 150,000 to 500+. The second boot of that hub looks to be around 325. Maybe play with what I set up and see if you have favorable results. No harm, no foul. Up until about four months ago I had a once a week reboot that I had carried over from a C-5. Never an issue. The timing was perfect and dumb luck. I should add that in the midst of this I uninstalled Maker API which I set up way back when with a bunch of devices and never really used. I'm hoping the next Hubitat generation will be sufficiently overpowered and fine tuned that none of this will be necessary. I've only ever rebooted my Ubiquity Edge routers and APs when doing a software update.

I don't think I ever disputed where you were memory was starting from, but if you should be needed to do a second reboot in the first place to recover additional memory.

That additional memory though nice may be a placebo effect if the memory drops to that level quickly anyways. I wouldn't be as concerned about the starting point as were and when it stabilizes.

My graph was to show two things.

  1. The idea of two reboots to increase memory involves something else as my hub that was upgraded and then shut down completely and had power pulled still only showed 340+ MB of memory free.
  2. The memory stabilized after about a week being just under 200MB of memory.

Normally I dont reboot my hub unless there is a firmware update similar to how you manage your switch.

1 Like

Great idea. I just do my reboot on a schedule.

Hubs should not need rebooting. Both of mine are rebooted for platform updates, and power outages. I’m not sure what rebooting on a schedule achieves - seems to me that it just ignores resolving the underlying issue that necessitates a routine reboot.

1 Like