herve
Junior Member
Posts: 54
|
Post by herve on Apr 10, 2021 14:35:57 GMT -8
Hello dow4hurst
Thank you for the very useful information about linux.
After all, I am an absolute beginner in Linux with a very limited knowledge.
Due to the problems I now have with starting Skyweather2, I am aware that I need to update my linux knowledge urgently.
Thank you
Hervé
|
|
|
Post by Jason on Apr 10, 2021 18:18:34 GMT -8
When the service starts manually, are you seeing data collected?
Thanks,
Jason
|
|
|
Post by Jason on Apr 10, 2021 18:19:31 GMT -8
Additionally, did you perform the sudo systemctl enable skyweather2 step?
Thanks,
Jason
|
|
herve
Junior Member
Posts: 54
|
Post by herve on Apr 11, 2021 0:03:30 GMT -8
Jason When I restart the skyweather2 service manually I see data collected. In the dashboard the "green LEDs" are on and the weather data are updated regularly as you can see in the image of a few minutes ago About the instruction sudo systemctl enable skyweather2: I only performed this instruction once: after I setup the skyweather2 service as you explained is your message Apr 9, 2021 at 12:16am. Hervé
|
|
herve
Junior Member
Posts: 54
|
Post by herve on Apr 11, 2021 1:19:41 GMT -8
Jason I just ran the instruction sudo systemctl enable skyweather2 again and then rebooted. The problem remains: when checking with sudo systemctl status skyweather2 I keep getting an error. When I then manually do sudo systemctl stop skyweather2 followed by sudo systemctl start skyweather2, everything runs normally. A status controle with sudo systemctl status skyweather2 gives then: Since I always have to manually stop-start the skyweather2 service, I wonder what will happen with the 5 day reboot that is provided in the software. Thanks Hervé
|
|
|
Post by Jason on Apr 11, 2021 2:32:23 GMT -8
I’m really puzzled! For now, let’s try to add the following settings to the service definition file in the section [Service]:
Restart=on-failure RestartSec=5s
Once you’ve made the changes, you’ll need to reload the systemd daemon using sudo systemctl daemon-reload.
Thanks,
Jason
|
|
herve
Junior Member
Posts: 54
|
Post by herve on Apr 11, 2021 8:47:54 GMT -8
Jason I did what you proposed: I added the two lines to the service definition and reloaded the systemd daemon. After a reboot I did a status check and got no errors anymore! The dasboard is oké and is updated regularly. I hope my startup problem is solved. I hope the 5 day reboot that is provided in the software will not give a problem... As you saw in my message of Apr 9, 2021 at 11:11pm there seem to be a problem with the HM3301 dustsensor although I see AQI-values in the dashboard. What could be the reason of this dustsensor errors? In any case, I would like to thank you very much for all your efforts and help! Thanks Hervé
|
|
|
Post by gorddel on Apr 11, 2021 9:33:41 GMT -8
If I remember correctly, the SkyWeather2 service would exit during boot startup if the network was not ready when the SkyWeather2.py process was started. I resolved this by setting the "Wait for network ready at boot" option using raspi-config: sudo raspi-config 1 - System Options S6 - Network at boot
I expect Jason's suggestion of setting the service restart option will work just as well.
I also changed the "file" option to "append" on the logging lines in the skyweather2.service file to allow the log and error files to be appended instead of the files being overwritten when the service restarts: from:
StandardOutput=file:/home/pi/SDL_Pi_SkyWeather2/logs/skyweather2.out StandardError=file:/home/pi/SDL_Pi_SkyWeather2/logs/skyweather2.err
to: StandardOutput=append:/home/pi/SDL_Pi_SkyWeather2/logs/skyweather2.out StandardError=append:/home/pi/SDL_Pi_SkyWeather2/logs/skyweather2.err
Gord
|
|
herve
Junior Member
Posts: 54
|
Post by herve on Apr 11, 2021 12:13:56 GMT -8
Hello Gord
Thank you. I will implement the proposed additions. That will certainly improve stability at the startup.
Thanks
Hervé
|
|
|
Post by Jason on Apr 11, 2021 12:34:39 GMT -8
|
|
|
Post by Jason on Apr 12, 2021 5:20:50 GMT -8
Jason I did what you proposed: I added the two lines to the service definition and reloaded the systemd daemon. After a reboot I did a status check and got no errors anymore! View AttachmentThe dasboard is oké and is updated regularly. I hope my startup problem is solved. I hope the 5 day reboot that is provided in the software will not give a problem... As you saw in my message of Apr 9, 2021 at 11:11pm there seem to be a problem with the HM3301 dustsensor although I see AQI-values in the dashboard. What could be the reason of this dustsensor errors? In any case, I would like to thank you very much for all your efforts and help! Thanks Hervé Regarding the dust sensor error, I'm definitely puzzled. If there was a path issue with the execution of the service, I would expect the service to fail on reboot and manual start. Can you post the full contents of your skyweather2.service file? Thanks, Jason
|
|
herve
Junior Member
Posts: 54
|
Post by herve on Apr 12, 2021 6:04:20 GMT -8
Jason This is my skyweather2.service file Thanks Hervé
|
|