Author Topic: Device to switch on daylight hours only  (Read 5287 times)

bnmont

Device to switch on daylight hours only
« on: October 26, 2017, 01:28:20 pm »
A couple of times Ive had to reboot my OGN setup, its normally on permanently.
Does anyone know of an off the shelf solution to switch on during daylight hours only, this would hopefully overcome my site being down for a few days without me noticing as it would reboot each day.
I currently use a 13 amp socket with inbuilt USB transformer and didnt really want to go timer switch plus transformer. Any ideas?

Thanks Brian

Ian Melville

Re: Device to switch on daylight hours only
« Reply #1 on: October 26, 2017, 02:29:49 pm »
You can use cron in the Linux OS to schedule a reboot. I'm not a Linux person so you will need to look elsewhere for details.

I've not had to reboot mine, are you sure there is not another issue?

bnmont

Re: Device to switch on daylight hours only
« Reply #2 on: October 26, 2017, 06:30:28 pm »
To be honest Ian, I dont know. It seems to stop reporting to the Onglide range tool and I just power down and back up. It then shows up OK. Twice since PWEverton has been running.

Admin

Re: Device to switch on daylight hours only
« Reply #3 on: October 26, 2017, 06:56:04 pm »
I think only twice is good !
A lot of stations have a hardware timer reboot, I think that theire is a lockup somewhere in the ogn code, I think it is related to recovering from internet connections which go up and down

I am pretty sure the pilotaware network code is more resilient

Thx
Lee

bnmont

Re: Device to switch on daylight hours only
« Reply #4 on: October 26, 2017, 07:58:40 pm »
Glad I'm not alone with the problem!
Just trying to work out an easy way to power off and back on during daylight hours so it keepd doing what it is supposed to do.

exfirepro

Re: Device to switch on daylight hours only
« Reply #5 on: October 26, 2017, 10:47:15 pm »
Brian,

The easiest way would be to run the Pi power supply off a timer. I know of several installations which operate on this basis as they are very unlikely to be needed during the hours of darkness, but I have to agree with Ian - you need to investigate why your station is going down. Mine has been running 24/7 since it first went live back in June and the only time it has gone down is when I have done it deliberately e.g. to tweak the configuration. (Hope I haven't just jinxed it!!) 🙁

Regards

Peter

Ian Melville

Re: Device to switch on daylight hours only
« Reply #6 on: October 26, 2017, 11:09:48 pm »
The easiest and cheapest is to use cron. If that doesn't work then buy a timer :)

Paul_Sengupta

Re: Device to switch on daylight hours only
« Reply #7 on: October 27, 2017, 08:43:11 pm »

mmcp42

Re: Device to switch on daylight hours only
« Reply #8 on: October 30, 2017, 07:48:51 am »
cron reboot is a much better solution than abruptly turning off the power
is there a reboot facility within PAW itself, as I'm not comfortable just powering it off
(not that I have much choice, of course!)

Admin

Re: Device to switch on daylight hours only
« Reply #9 on: October 31, 2017, 09:51:29 am »
is there a reboot facility within PAW itself, as I'm not comfortable just powering it off

There is a reboot on the web interface, but I think you are asking for a shutdown, rather than a reboot.
PilotAware should be immune to normal issues of pulling the power cord, this is done by mounting the SD card
as READONLY. All transient files (logs, /tmp, /var/log) are held in RAMFS, and so are not flushed to the disk.

Thx
Lee

Paul_Sengupta

Re: Device to switch on daylight hours only
« Reply #10 on: October 31, 2017, 02:46:07 pm »
The OGN-PAW is also set to Read Only IIRC, so it shouldn't be a problem just pulling the power.

mmcp42

Re: Device to switch on daylight hours only
« Reply #11 on: October 31, 2017, 07:28:19 pm »
The OGN-PAW is also set to Read Only IIRC, so it shouldn't be a problem just pulling the power.
aha I did not know that
clever stuff :)