How to daily reboot

The place for discussion about the 4-channel WinterHill DATV Receiver
PE5PVB
Posts: 161
Joined: Sun Sep 02, 2012 6:51 pm

How to daily reboot

Post by PE5PVB » Mon Jan 06, 2025 10:18 am

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?

g0mjw
Posts: 2515
Joined: Sat Sep 20, 2014 9:15 am

Re: How to daily reboot

Post by g0mjw » Mon Jan 06, 2025 3:52 pm

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

PE5PVB
Posts: 161
Joined: Sun Sep 02, 2012 6:51 pm

Re: How to daily reboot

Post by PE5PVB » Mon Jan 06, 2025 4:08 pm

For that I need a piece of software which monitors the function of Winterhill and if not OK reboot the application.

g0mjw
Posts: 2515
Joined: Sat Sep 20, 2014 9:15 am

Re: How to daily reboot

Post by g0mjw » 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

PE5PVB
Posts: 161
Joined: Sun Sep 02, 2012 6:51 pm

Re: How to daily reboot

Post by PE5PVB » Tue Jan 07, 2025 9:51 pm

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

DL5BCA
Posts: 181
Joined: Tue Jun 30, 2020 11:59 am

Re: How to daily reboot

Post by DL5BCA » Sat Mar 08, 2025 10:44 am

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
I always have crazy ideas.
Please don't be surprised.

PE5PVB
Posts: 161
Joined: Sun Sep 02, 2012 6:51 pm

Re: How to daily reboot

Post by PE5PVB » 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.

g0mjw
Posts: 2515
Joined: Sat Sep 20, 2014 9:15 am

Re: How to daily reboot

Post by g0mjw » Sat Mar 08, 2025 12:39 pm

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
Last edited by g0mjw on Sun Mar 09, 2025 9:02 am, edited 1 time in total.

G4EWJ
Posts: 1452
Joined: Wed Feb 17, 2010 10:11 am

Re: How to daily reboot

Post by G4EWJ » Sat Mar 08, 2025 8:46 pm

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

PE5PVB
Posts: 161
Joined: Sun Sep 02, 2012 6:51 pm

Re: How to daily reboot

Post by PE5PVB » Sat Mar 08, 2025 9:08 pm

Yes I send the streams on LAN to our playout PC

Post Reply

Return to “The WinterHill DATV Receiver”