How can I reboot hub from a rule (remotely)

Yea, most devices have that capability and hence it works most of the time.

2 Likes

Hmmm. Well I've set up my rule but it doesn't send the reboot command...Here is the rule:

The Hub Info device has the setting on to allow reboot & shutdown:

I press the button on the dash and the logs show the virtual switch works and triggers the rule, but nothing happens after the 10 second wait - no reboot. Any ideas?


Are you sure that’s 10 seconds and not 10 minutes? Also make sure that you’ve set the Allow Hub to Reboot Preference on (it’s a safety check).

4 Likes

:joy: :laughing:

Well spotted - what a schoolboy error. I'll amend that to 10 seconds.

4 Likes

I'm hoping that amending from 10 minutes to 10 seconds will initialise the rule and cancel the two previous wait events generated or the Hub is going going to be up and down a few times. I'm away on holiday later and wanted to ensure everything would work if I needed it while away.

2 Likes

Sorted, all working now - thanks to the eagle eye of @thebearmay I'll do another rule to automate the reboot as @Sebastien has done.

3 Likes

Restarting the rule usually resets the timer, but you can look at Logs | Scheduled Jobs to make sure.

1 Like

Yeah I've just done that before I pressed the button again and there was nothing pending so all good. I'm still wondering how rapidly the free memory should fall, though I don't want to obsess over it too much. At reboot it was around 548,000KB and within 10 mins it's at 484,500KB.

I restarted it when prompted 4 days ago and in those 4 days it went from 548,000 to 312,000. I thought I hadn't added anything recently (as I mentioned in another post), but then remembered I recently added another instance of maker.api for locative. I'm not sure whether that would have had any impact.

MakerAPI can put a strain on the hub if the automation on the other end does a lot of querying. That aside, it is normal for there to be a drop in memory shortly after a reboot, and it is normal to see a gradual drop over time. 80-85K is the normally accepted minimum, so I’d set your reboot value a wee bit north of there - maybe 90-100K depending on your comfort level.

Thanks. For now I've not automated the reboot fully (but will do at some point). I've set up the previous rule allowing me to reboot from a dashboard on my phone (I PIN protected the tile to avoid accidents). I've now set up a second rule to send a notification to my phone if memory goes and stays below 100000 for more than 2 hours.

An alternate way it an http post in a rule

Ie

3 Likes

bringing this back. has recent updates removed that option?
im looking at having a reboot and shutdown button on the dashboard.

thanks

never mind. found it.
need to add this driver [RELEASE] Hub Information Driver v3
then create a virtual device using this driver

2 Likes

crazy how we can be lazy in life.
I have a customer that setup is working great for over a year now. one day, nothing works.
now customers will have a reboot and shutdown button in the dashboard.

of course not to use every week, but I feel if they need it once every 12-18 months, not bad!

2 Likes

Wanted to say thanks for this info, helped me setup a recurring reboot. Very helpful!

Hi, where can I view the hubs free memory. I can't seem to find it. Many thanks in advance :slight_smile:

A popular way to get this information is through the Hub Information Driver:

1 Like

Brill, cool, thanks for this

1 Like

Another option is YOUR.IP.ADDRESS/hub/advanced/freeOSMemoryHistory

2 Likes

I use hub info driver and a tile with some of the values is shown when I click an 'Info' button on my dashboards; but I've also bookmarked that freeOSMemoryHistory url, as it's handy to scroll down through it to see if there are any unexpected large memory drops (which I was seeing in 2.3.6.xxx)

2 Likes