Fresh pies every day

Posted on
Tue Jul 18, 2017 4:13 pm
Hackencrash offline
User avatar
Posts: 167
Joined: Dec 16, 2015
Location: UK

Fresh pies every day

I have 3 pi's

When I do an uptime on them it's several days, even though the piBeacon plugin is set to reboot them at 2am.

I've tried changing the reboot command to: sync; sync;reboot -f but this makes no difference.

When I select either: REBOOT rPi through ssh command or: Reboot rPi Force through socket both appear to work OK.

The properties file on the rPi's appears to be updated correctly.

Please can you explain the mechanics of how the daily reboot should work so that I can diagnose further?

If it's of any interest, I've never managed to get this working in the long time that I've been enjoying this fantastic plugin.

Thank you

Posted on
Thu Jul 27, 2017 3:41 am
Hackencrash offline
User avatar
Posts: 167
Joined: Dec 16, 2015
Location: UK

Re: Fresh pies every day

These are, I think, the relevant parts of the ~/pibeacon/parameters file on the rPi:

Code: Select all
"enableRebootCheck": "restartLoop,pingBoot"
"rPiRestartCommand": ""
"rebootCommand": "sudo sync; sync;sudo reboot -f"
"rebootHour": 2
"rebootWatchDogTime": "4"

Posted on
Thu Jul 27, 2017 11:38 am
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Fresh pies every day

will look into it later today ..

Posted on
Thu Jul 27, 2017 2:25 pm
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Fresh pies every day

do
Code: Select all
ssh pi@x.x.x.x.x
cd pibeacon
nano parameters

you should find (not together though):
Code: Select all
 "rebootCommand": "reboot now",
  "rebootHour": xx,
  "rebootWatchDogTime": "-1",


change xx to the current hour (0-23) and save (ctrl-o) and exit (ctrl-x)

the RPI should reboot within 1-2 minute. .. depending on your loop time / refresh rates ..

if that works, it should also work at 1 am .. I have not tried with 0 hours

if that does not work, your rpi could be bad (or likely a bug) ..
the new version should tell you about it in the indigo log file

also there is a permanent log file in the pibeacon directory . you should have lines like these in there.
Code: Select all
20170727-01:22:51  master  master rebooting / shutdown reboot now   reboot at 2017-07-27 01:22:51.674656  regular_reboot_at_1_hours_requested



Karl

and by looking at it I found a bug somewhere else.. that might have an impact (the SPS check had a bug and forces getsensorvalues.py to restart every 5 minutes... it still works, but should not do that)

Posted on
Fri Jul 28, 2017 7:48 am
Hackencrash offline
User avatar
Posts: 167
Joined: Dec 16, 2015
Location: UK

Re: Fresh pies every day

Hi Karl,

My RebootCommand and RebootWatchDogTime values are different to yours as can be seen by my second post above.

I changed the rebootHour from 2 to 13 in my case as the time on my rPi was 13:44. However, 45 minutes later and this rPi still hasn't rebooted.

Here is a tail of the ~/pibeacon/permanentLog.log file taken just now. Note that it does appear to be rebooting on some days (notice the gaps between the dates), but it is missing the reboot that should have taken place 45 minutes ago and note that it is the 28th today.

Code: Select all
20170711-02:00:00  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-07-11 02:00:00.534994  regular_reboot_at_2_hours_requested
20170712-02:00:01  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-07-12 02:00:01.496611  regular_reboot_at_2_hours_requested
20170718-02:00:01  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-07-18 02:00:01.782468  regular_reboot_at_2_hours_requested
20170719-02:00:00  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-07-19 02:00:00.275634  regular_reboot_at_2_hours_requested
20170725-02:00:01  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-07-25 02:00:01.826513  regular_reboot_at_2_hours_requested
20170726-02:00:03  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-07-26 02:00:03.519663  regular_reboot_at_2_hours_requested
I did a ps -ef | grep .py and I can see that both master.py and beaconloop.py are running.

Posted on
Fri Jul 28, 2017 9:27 am
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Fresh pies every day

It is a question of timing. If the pi programs read the config file at the right time it works. And that is triggered by the plugin sending the config file.
Have a version that does it right. Want to test for one night.



Sent from my iPhone using Tapatalk

Posted on
Thu Aug 03, 2017 1:29 am
Hackencrash offline
User avatar
Posts: 167
Joined: Dec 16, 2015
Location: UK

Re: Fresh pies every day

2 out of 3 rPi's rebooted with the new version, but that's not necessarily to say that the reboot isn't fixed.

I'll rebuild this rPi tonight as it could be foobar'd in some other way - will let you know.

Posted on
Sat Aug 05, 2017 3:36 pm
johnfdl offline
Posts: 85
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: Fresh pies every day

I was so excited when I saw the thread title....I love fresh pies. :D

Posted on
Sat Aug 05, 2017 5:29 pm
durosity offline
User avatar
Posts: 3544
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Fresh pies every day

johnfdl wrote:
I was so excited when I saw the thread title....I love fresh pies. :D


What’s your favourite pie? I’d say a nice rhubarb pie with custard!

Computer says no.

Posted on
Sat Aug 05, 2017 6:40 pm
roussell offline
User avatar
Posts: 959
Joined: Aug 18, 2008
Location: Alabama

Re: Fresh pies every day

Lemon is the one true pie


Sent from my iPhone using Tapatalk

Posted on
Sat Aug 05, 2017 6:53 pm
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Fresh pies every day

As for reboot.
If the rpi (ie master.py) starts before the boot time it will not boot that day. It has go over that time to set bootenable true


Sent from my iPhone using Tapatalk

Posted on
Sun Aug 06, 2017 10:44 am
jay (support) offline
Site Admin
User avatar
Posts: 14669
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Fresh pies every day

durosity wrote:
What’s your favourite pie? I’d say a nice rhubarb pie with custard!


Buttermilk (or my grandmother's chocolate)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Aug 06, 2017 11:11 am
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Fresh pies every day

as I am on a no carb diet (-17 lbs =- 7.5kg) I take it with bacon

Posted on
Mon Aug 07, 2017 5:09 am
Hackencrash offline
User avatar
Posts: 167
Joined: Dec 16, 2015
Location: UK

Re: Fresh pies every day

LOL!

I have rebuilt the pi that was not rebooting after the update to piBeacon (using the new SSD image) and here is the permanentLog.log output for today:

Code: Select all
20170805-20:31:08  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-08-05 20:31:08.074673  change_in_ramdisk_for_logfiles
20170806-02:00:08  master  master rebooting / shutdown sudo sync;sync;sudo reboot -f   reboot at 2017-08-06 02:00:08.801555  regular_reboot_at_2_hours_requested
It is missing the 2am reboot for this morning (9th), yet everything else looks to be OK.

What do you think I should do?

P.S. The other 2 rPi's are absolutely fine

Posted on
Mon Aug 07, 2017 9:07 am
kw123 offline
User avatar
Posts: 5840
Joined: May 12, 2013
Location: Dallas, TX

Re: Fresh pies every day

I can't look into code for 3 weeks. will need to wait sorry. karl

Who is online

Users browsing this forum: No registered users and 1 guest