Page 1 of 2

How to daily reboot

Posted: Mon Jan 06, 2025 10:18 am
by PE5PVB
Hi,

The Winterhill at our repeater site sometimes jumps to "timeout" on all inputs or the receiver just stops. Manual restart works fine, but is not a good solution.

Can someone explain me how to plan a daily reboot of the Winterhill at 0.00h and 12.00h?

Re: How to daily reboot

Posted: Mon Jan 06, 2025 3:52 pm
by g0mjw
As it is running on linux, a suitable file in /etc/cron.daily to reboot the pi might be a solution, but that relies on the system not crashing. Personally, I use a mechanical mains timer, the ones designed to turn the lights on and off when you are not at home, they tend to work.

For info on cron https://en.wikipedia.org/wiki/Cron

What you really need to do is monitor and detect the timeouts and restart the winterhill application rather than reboot the machine.

Mike

Re: How to daily reboot

Posted: Mon Jan 06, 2025 4:08 pm
by PE5PVB
For that I need a piece of software which monitors the function of Winterhill and if not OK reboot the application.

Re: How to daily reboot

Posted: Mon Jan 06, 2025 4:50 pm
by g0mjw
Yes, that's what I was suggesting you develop, bash or shell script perhaps? One that checks for a lockup and acts accordingly. The question is how do you know it has locked up. Is there some indicator? It will only work if you have a way to tell it has locked up, e.g. a process is no longer running or no data etc. I don't know if you can do this via the winterhill api. I would think so.

For a daily reboot at say 23:59, add this to crontab -

Type sudo crontab -e // That opens the editor

then add a line

59 23 * * * /sbin/shutdown -r now

Save it.

Mike

Re: How to daily reboot

Posted: Tue Jan 07, 2025 9:51 pm
by PE5PVB
Done that, but it doesn't work. When checking uptime it says over 4 days. So that was the last time I manually rebooted it.
Do I have to enable CRON somewhere?
g0mjw wrote:
Mon Jan 06, 2025 4:50 pm
Yes, that's what I was suggesting you develop, bash or shell script perhaps? One that checks for a lockup and acts accordingly. The question is how do you know it has locked up. Is there some indicator? It will only work if you have a way to tell it has locked up, e.g. a process is no longer running or no data etc. I don't know if you can do this via the winterhill api. I would think so.

For a daily reboot at say 23:59, add this to crontab -

Type sudo crontab -e // That opens the editor

then add a line

59 23 * * * /sbin/shutdown -r now

Save it.

Mike

Re: How to daily reboot

Posted: Sat Mar 08, 2025 10:44 am
by DL5BCA
Hello,

restarting the Raspberry hard is not a good idea.

First the program winterhill should be closed.

I shut down my Winterhill with these commands:

ssh pi@192.168.178.57 sudo /home/pi/winterhill/whstop-3v20.sh ; timeout 10 ; sudo shutdown now

The IP-Adress is the adress of the winterhill-raspberry.
The "shutdown" command can certainly be changed to a reboot - but I haven't done that yet.

Put this commands in a "stop.bat" textfile and call it with cronetab

i hope it helps.

73 Thomas DL5BCA

Re: How to daily reboot

Posted: Sat Mar 08, 2025 10:54 am
by PE5PVB
I have the problem that Winterhill jumps to time-out on all inputs a few times a day. Any fix would be Great.

Re: How to daily reboot

Posted: Sat Mar 08, 2025 12:39 pm
by g0mjw
PE5PVB wrote:
Sat Mar 08, 2025 10:54 am
I have the problem that Winterhill jumps to time-out on all inputs a few times a day. Any fix would be Great.
Thomas has provided a solution right above your post. Did you not understand how to implement that? It is crontab, not cronetab. Google should throw up examples - e.g. the top hit was https://bc-robotics.com/tutorials/setti ... pberry-pi/

Edit: I have a similar problem with my home router locking up after a few days, I think it knows when I am away from home so choses to do it then when I can't easily reset it. With no firmware fix likely, I reboot it at 2am via a time switch. Sometimes the older methods are the most reliable. However, I realise now you said several times a day which implies something is wrong, like a memory leak or buffer over run. If that's bug can't be found, or until it is found, probably best to reboot it as suggested above, from another PI that is keeping a watch on the situation.

Mike

Re: How to daily reboot

Posted: Sat Mar 08, 2025 8:46 pm
by G4EWJ
PE5PVB, remind me how you are using WH. Are you sending the TS off your local network from a repeater?

Do you have the OFFNET_TIME in winterhill.ini set to a large value like 2 billion, to prevent the timeout?

I'm sure I've had this conversation before, but I cannot remember with whom.

Brian

Re: How to daily reboot

Posted: Sat Mar 08, 2025 9:08 pm
by PE5PVB
Yes I send the streams on LAN to our playout PC