C7 hub, low memory

I saw the Low memory error on my C7 hub for the first time this evening. Both my hubs (C7 and C5) have been running 24/7 for several weeks. The last time I rebooted was when the 2.3.0.124 update was released and I installed it. That should tell you how long the hubs have been running.

I did not save details. I just mentioned it since it was the first time I had seen this message. I had noticed that presence detection had gotten a bit flaky. I suspect that this will take care of that. I guess I need to put it on my calendar to reboot at least once a month.

Depending on your application and device mix a little leakage of memory isn’t unusual. My hubs usually run best with a minimum of 300K available, and acceptable down to about 250K; I have my low memory/time to reboot notification set at 280K

1 Like

I think I am going to have to do some searching. How are you determining the free memory? Is it a rule that you have set up to notify you when memory is getting down to your minimum?

I generally use:

But you can also get the information from:

Http://yourHubIpAddress/hub/advanced/freeOSMemory

2 Likes

Thanks! That link method looks like I might be able to use it easily enough. After the reboot, my C7 hub is reading 497276 and my C5 hub is reading 537928.

I just need to figure out how to use the link to get a notification when it reaches a low point.

My c5 ground to a halt the other day due to outofmemory error. It has not been rebooted since the last update 24thh Nov 2021. My c7 has lost half it's free memory. Looks like I need to start doing a regular reboot now.

Driver is designed to routinely poll for attribute updates which makes notificationas easy as adding an RM rule with a trigger on the freeMemory attribute. From RM directly you may be able to get the response value back in a variable (maybe %value%??) to test - don’t use RM much so a little fuzzy here.

Here is the RM rule I use. I test every morning and if memory is below 250k, I reboot the hub. I do have hub security turned on so I use the community app, Hubitat Hub Controller, to do the reboot.

2 Likes

I installed the Hub Information driver. I created a virtual device using the driver. It seems to be getting some of the parameters, but I don't see "freeMemory" in the list of items to use to recreate your rule. I am sure I am missing something, but what?

Check the Custom Attributes if you’re using RM. If you still don’t see it, make sure you have freeMemory polling enabled in the driver:

I have Enable Free Memory Polling enabled. However, when I try to set the IF statement, I get this:

Hub Information freeMemory(null) < 250000.0(T) [TRUE]

It doesn't seem to be pulling the free memory. What I did not do was reboot the hub after installing the driver code and creating the driver though. Edit: I rebooted the hub, but still am not seeing a free memory custom attribute even though I have the memory polling enabled.

Did you hit Configure? Check your logs too, just in case it's throwing an error.

Yes, I did remember to hit Configure. I copied the code direct from the page and pasted it into the driver code. To the right of the configure/initialize buttons, there is a list and this is what shows up:

Current States
currentHsmMode : disarmed
currentMode : Home
data : [hardwareID:000D, zigbeeEui:000D6F00168FA93D, zigbeeChannel:0x14 (20), zigbeePanID:5428, localSrvPortTCP:39501, localIP:192.168.1.130]
firmwareVersionString : 2.3.0.124
formattedUptime : 0d,0h,58m,15s
hardwareID : 000D
hubModel : C-7
hubUpdateStatus : NO_UPDATE_AVAILABLE
hubUpdateVersion : 2.3.0.124
hubVersion : 2.3.0.124
id : 1
lastHubRestart : 1647810116345
lastHubRestartFormatted : 2022-03-20 17:01:56
lastUpdated : 1647813611402
latitude : 35.971763
localIP : 192.168.1.130
localSrvPortTCP : 39501
locationId : 1
locationName : Haffly_Home_Automation
longitude : -78.517388
name : Haffly_Home_Automation Hub
temperatureScale : F
timeZone : sun.util.calendar.ZoneInfo[id="US/Eastern",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=US/Eastern,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
type : PHYSICAL
uptime : 3495
zigbeeChannel : 0x14 (20)
zigbeeEui : 000D6F00168FA93D
zigbeeId : 000D6F00168FA93D
zigbeeStatus : enabled
zipCode : 27587
zwaveStatus : enabled

Edit: I switched on the Enable HTML Attribute Creation and these lines were added into the list:

html :
Name Haffly_Home_Automation Hub
Version C-7 / 2.3.0.124
IP Addr 192.168.1.130
Free Mem
Last Restart 2022-03-20 17:01:57
Uptime 0d,1h,6m,50s
Temperature
ZB Channel 0x14 (20)

You will note that the Free Mem line is blank.

Is there a scheduled job for getPollValues at the bottom?

If you have hub security enabled make sure you turn that on and enter the ID and Password. Other than that you could check to see if

http://yourHubIP/hub/advanced/freeOSMemory returns a valid value.

1 Like

Bingo! I needed to enable hub security. Now it shows a value. Thanks!

1 Like

I'm going to just have it notify me for now. If I see it as an ongoing issue, I guess I will install the Hubitat Hub Controller to automate the reboot.

Should be able to do that with the Hub Information Driver also (was added for rebooting if the hub came up without DHCP or a static address to force a retry).

2 Likes

Okay. I'll look at it more in the morning when I am more awake. Thanks.

Edit: I looked for a reboot option to add to the rule, but I don't see it. I see it in the driver with the Reboot button and I made sure that "Allow Hub to be rebooted" was turned on. How would I use that option in Hub Information in my rule to not only notify me, but to reboot also?

I guess you don't get a topic notification if I edit an entry. How do I add the ability to reboot to my rule that I set up for notification? I set the option on to allow it.

@StephenH Reboot should be listed as a custom action in RM.

1 Like