|
Post by Powderjockey on Dec 23, 2019 15:34:26 GMT -8
Thanks, it might be while. I have a fear that one or more of the boards may be fried due the recent 2" of snow and then 2 days of nothing but rain. Tried to re-power it but I did not hear the couple of light clicks after the re-boot. Nothing, and I can not get to it using either ssh or vnc. Christmas is upon us and I'll try to get at it over the next few days.
|
|
|
Post by Powderjockey on Dec 29, 2019 8:50:25 GMT -8
|
|
|
Post by SDL on Dec 30, 2019 17:03:08 GMT -8
Boy, what is going on for you? Our autostart code (rc.local) works like a champ on multiple units.
I have not heard this from one other person.
BP
|
|
|
Post by Powderjockey on Jan 2, 2020 19:39:44 GMT -8
Boy, what is going on for you? Our autostart code (rc.local) works like a champ on multiple units. I have not heard this from one other person. BP Any further suggestions? I ran htop and it shows pigpiod has been running for 6 plus hours, vs the SkyWeather.py for 3 hours. I think the pigpiod is starting at boot, but the rest of the stuff is not. On another note, I reset the GFI receptacle and everything seems to have booted and is working.
|
|
|
Post by SDL on Jan 3, 2020 7:41:56 GMT -8
Boy, I suspect your power, but that is only a guess.
BP
|
|
|
Post by Powderjockey on Jan 12, 2020 18:32:57 GMT -8
Boy, I suspect your power, but that is only a guess. BP Ok, I went back to the instructables and went thru it line by line and tested it and found, what I hope, is the problem. Prior: cd / cd SDL_Pi_SkyWeather sudo pigpiod sudo python SkyWeather.py cd / Changed: cd ~ cd SDL_Pi_SkyWeather sudo pigpiod sudo python SkyWeather.py cd ~ The 5 day reboot will on the 15th, so I will advise if this works. Testing by running the script, it did.
|
|
|
Post by SDL on Jan 13, 2020 13:29:03 GMT -8
You are absolutely right about the first one would not work. You will be in the wrong directory. The second one will work!
Now the mystery is solved. It wasn't just because of you being you, it was the code!
BP
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Feb 10, 2020 6:53:37 GMT -8
Actually, you need to understand how systemd works with rc.local. In fact, if an error occurs in the script (here rc.local), it will exit and not continue. That is the curse of rc.local and no builtin error handler! In your case, you made a "cd /" then a "cd SDL_Pi_SkyWeather". problem here is that the "SDL_Pi_SkyWeather" didn't exist under "/" thus the "cd" program returned an error-code different from 0 (0 = good, anyting higher is bad). You would have probably spotted it using: sudo systemctl status rc-local It would have shown you what failed.
What we can do, is add error-handler code to rc.local. It would look like this.
cd ~ errlvl=$? if [ $errlvl -gt 0 ] then echo "Unable to change to directory ~. Emergency exit!" exit 1 fi
cd SDL_Pi_SkyWeather errlvl=$? if [ $errlvl -gt 0 ] then echo "Unable to change to directory SDL_Pi_SkyWeather. Emergency exit!" exit 1 fi
sudo pigpiod errlvl=$? if [ $errlvl -gt 0 ] then echo "pigpiod did not start correctly. Emergency exit!" exit 1 fi
sudo python SkyWeather.py if [ $errlvl -gt 0 ] then echo "SkyWeather.py did not start correctly. Emergency exit!" exit 1 fi
With that code, the script would exit at each and every step the rc.local would exit too when started through systemd.
|
|
|
Post by SDL on Feb 10, 2020 16:00:53 GMT -8
We will use that in the next release of the SD card. Thank you!
BP
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Feb 11, 2020 1:46:06 GMT -8
Test it please. I didn't add it to my setup (Not this one). I use a very similar error-lvl handler in my media-centers.
|
|
|
Post by Jonathan on Jul 4, 2020 13:13:26 GMT -8
I'm experiencing a similar issue; every 3 days or so, the weather station quits broadcasting data to both WeatherStem and Blink, and I'm not able to connect via VNC. So I'm regularly unplugging it and plugging it back in.
Thoughts?
|
|
smurphy
Full Member
Posts: 169
Raspberry Pi: Yes
Other Device: many ...
|
Post by smurphy on Jul 6, 2020 0:18:30 GMT -8
I noticed that if the network is not working correctly, the python script behaves strangely (That is, before lightning struck it and disabled it. Still wa not able to get it down the roof). What you cna do is run a cron job that will restart the SkySoft once a night, or reboot the box once a night. But that will cause quite some SD-Card wearing !
|
|
|
Post by SDL on Jul 8, 2020 7:01:59 GMT -8
SD Cards are a lot better than they used to be. Rebooting once a night wil still last a really long time. Project Curacao3 SkyWeather has been rebooting a couple times a day due to a solar power supply problem for 6 months. Still working like a champ. Why is it doing that? I think there is a loose wire in the SolarMAX Lead Acid system that moves once in a while. I'd go down and fix it, but all Americans are banned from Curacao right now because of the virus. So I just watch the Caribbean. skyweather.weatherstem.com/curacaoLooks nice there now. BP
|
|
|
Post by Powderjockey on Jul 15, 2020 15:36:54 GMT -8
Ok, even after starting over from scratch, and Buster, this still does not auto restart on the 5th day. The pigpiod starts and that is it. I'm using the process advised in the manuals.
|
|
|
Post by SDL on Jul 16, 2020 8:50:26 GMT -8
Powederjockey,
It starts up by hand correct? If you execute each of the statements in your boot up sequence?
If you remove the power from the raspberry Pi and plug it in again, does it start up?
If you can't resolve this, then comment out the 5 day reboot sequence.
BP
|
|