|
Post by SDL on Jun 9, 2021 17:55:12 GMT -8
Well, tell me how it is failing. Go through and summarize all of the data and let's look at it again (trust me, I need the summaries! Too many things for me to keep track of).
BP
|
|
|
Post by Powderjockey on Jun 13, 2021 19:21:38 GMT -8
Well, tell me how it is failing. Go through and summarize all of the data and let's look at it again (trust me, I need the summaries! Too many things for me to keep track of). BP Where would any log files be located other than /var/log?
|
|
|
Post by Powderjockey on Jun 14, 2021 16:55:55 GMT -8
I've long had trouble getting the SkyWeather to reboot and start the SkyWeather automatically start. I’ve followed the different methods for auto starting, but nothing has worked. I always had to manually start SkyWeather every 5 days, if I remembered.
Late last fall, I noticed the system, when started manually on the 5th day, would only operate for for a short time, then nothing. No temperature, no rain consumption, no wind, nothing. So I would manually restart the system, start SkyWeather and a day or two later, the system had stopped. This continued all thru winter and I wanted to wait until spring to try and rectify the problem.
In the spring I decided to start changing parts out to see if the problem would go away. Firstly, I changed the WiFi receiver. I placed a USB received on the board and killed the on-board device so only one WiFi device would be seen. Then I added a WiFi extender to my system so that the extended was only 12’ away from the SkyWeather unit. That did nothing to assist in the problem. Then I changed the RPi board from a 3B+ to a 4B. The same problems still persisted. After that I decided perhaps the micro SD card was damaged or corrupt. So, I changed the micro SD card. These cards are both Sandisk Ultra 32 GB.The problem persists. I still need to manually reboot the system and manually restart SkyWeather with about a one day operational period.
I also changed the USB power adapter to provide a higher output.
|
|
|
Post by SDL on Jun 16, 2021 12:03:34 GMT -8
How odd. Dow, do you want to chime in here with your debugging expertise? This doesn't sound like a network problem.
BP
|
|
dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on Jun 16, 2021 14:00:52 GMT -8
Powderjockey, A few things come to mind on the SkyWeather script on startup.
1. If the wifi takes a while to get started, then I think there was some thread under SkyWeather2 that was identifying that is a possible failure point. In /etc/rc.local, where the SkyWeather startup and possibly dash_app commands are, you could have a sleep statement for 30 seconds to allow the network to have more time to get configured.
2. Has your wifi router been updated or possibly has more stuff it is handling? Sometimes we forget that Netflix and music streams take a lot of bandwidth. Maybe that isn't it, but it is an issue everyone has to stay aware of.
3. The right way to have the content of the startup up the script in /etc/rc.local looks like the following and works well for SkyWeather2. I think if you have the older SkyWeather, you can ditch the dash_app, leave it commented out, and change "SkyWeather2" to "SkyWeather":
#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing.
# Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi
## Uncomment the following line for a startup delay for networking scripts to acquire configuration ## info from wifi router. #sleep 30
cd /home/pi/SDL_Pi_SkyWeather2 nohup sudo python3 SkyWeather2.py & chmod 666 nohup.out
#sleep 2 #cd /home/pi/SDL_Pi_SkyWeather2/dash_app #nohup sudo python3 index.py & #chmod 666 nohup.out
exit 0
4. I'd recommend switching the SkyWeather script into debug mode if it supports that, similar to what is available in the SkyWeather2 script. The nohup.out file that the script writes to is the log file for SkyWeather and SkyWeather2. I'd clear it out of any info, put the script into debug mode, and restart. Let it run for one to six days and lets see what that log shows. That logfile will show what version of the SkyWeather script you have.
Hope this helps, Dow
|
|
|
Post by SDL on Jun 16, 2021 15:29:14 GMT -8
Let's take another SD Card and put the standard OS on and see how long it takes the system to bomb. That will tell us more information.
BP
|
|
|
Post by Powderjockey on Jun 17, 2021 14:24:13 GMT -8
Let's take another SD Card and put the standard OS on and see how long it takes the system to bomb. That will tell us more information. BP Like, just the OS and no SkyWeather software?
|
|
|
Post by Powderjockey on Jun 18, 2021 7:13:14 GMT -8
Powderjockey, A few things come to mind on the SkyWeather script on startup. 1. If the wifi takes a while to get started, then I think there was some thread under SkyWeather2 that was identifying that is a possible failure point. In /etc/rc.local, where the SkyWeather startup and possibly dash_app commands are, you could have a sleep statement for 30 seconds to allow the network to have more time to get configured. 2. Has your wifi router been updated or possibly has more stuff it is handling? Sometimes we forget that Netflix and music streams take a lot of bandwidth. Maybe that isn't it, but it is an issue everyone has to stay aware of. 3. The right way to have the content of the startup up the script in /etc/rc.local looks like the following and works well for SkyWeather2. I think if you have the older SkyWeather, you can ditch the dash_app, leave it commented out, and change "SkyWeather2" to "SkyWeather": #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing.
# Print the IP address _IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi
## Uncomment the following line for a startup delay for networking scripts to acquire configuration ## info from wifi router. #sleep 30
cd /home/pi/SDL_Pi_SkyWeather2 nohup sudo python3 SkyWeather2.py & chmod 666 nohup.out
#sleep 2 #cd /home/pi/SDL_Pi_SkyWeather2/dash_app #nohup sudo python3 index.py & #chmod 666 nohup.out
exit 0
4. I'd recommend switching the SkyWeather script into debug mode if it supports that, similar to what is available in the SkyWeather2 script. The nohup.out file that the script writes to is the log file for SkyWeather and SkyWeather2. I'd clear it out of any info, put the script into debug mode, and restart. Let it run for one to six days and lets see what that log shows. That logfile will show what version of the SkyWeather script you have. Hope this helps, Dow Dow, thanks. How do I add the debug mode to the script? I changed the /etc/rc.local to the script above, changing the python3 to python, etc. Forgot to clear the nohup.out file. I see from watching the Blynk app, the outside temp seems to be stuck. It is reporting 28.5C since last night and it is 15C right now. The inside temp is appropriate for the time of day and the 15C outside. Everything else seems to change during the time I was watching it. I added a D-Link DAP-1610 WiFi extender to provide a good solid link. But for some reason, the extender changes the Static IP address of my SkyWeather unit. Need to look at that set up as well.
|
|
dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on Jun 21, 2021 8:34:02 GMT -8
The variable SWDEBUG should be set to True, not False in config.py. That should trigger a lot more logging of what is going on. You can use nano or vim to edit the config.py file. You ought to clear out the contents of the nohup.out file or just delete it before you start the SkyWeather script. That way you will have only debug level logging occurring and not have it mixed with the lower level of normal logging that is already in there. Dow
|
|
|
Post by Powderjockey on Jun 21, 2021 10:09:24 GMT -8
The variable SWDEBUG should be set to True, not False in config.py. That should trigger a lot more logging of what is going on. You can use nano or vim to edit the config.py file. You ought to clear out the contents of the nohup.out file or just delete it before you start the SkyWeather script. That way you will have only debug level logging occurring and not have it mixed with the lower level of normal logging that is already in there. Dow When I go home for lunch, I will the change to the config.py file, delete the nohut.put file and restart everything. The temperature is something that seem to stick at some point and never recovers. I'll keep you posted.
|
|
|
Post by SDL on Jun 21, 2021 10:27:30 GMT -8
This is SkyWeather and not SkyWeather2? Correct?
BP
|
|
|
Post by Powderjockey on Jun 21, 2021 10:49:24 GMT -8
This is SkyWeather and not SkyWeather2? Correct? BP That is correct.
|
|
|
Post by Powderjockey on Jun 23, 2021 8:13:24 GMT -8
Is this program still open? forum.switchdoc.com/thread/1107/am2315-exchange-programDow, thanks. How do I add the debug mode to the script?
I changed the /etc/rc.local to the script above, changing the python3 to python, etc. Forgot to clear the nohup.out file.
I see from watching the Blynk app, the outside temp seems to be stuck. It is reporting 28.5C since last night and it is 15C right now. The inside temp is appropriate for the time of day and the 15C outside. Everything else seems to change during the time I was watching it.
I added a D-Link DAP-1610 WiFi extender to provide a good solid link. But for some reason, the extender changes the Static IP address of my SkyWeather unit. Need to look at that set up as well. From the latest reboot, the outside temp is stuck at 28.5C. The Dew Point as well seems to not move.
|
|
|
Post by SDL on Jun 24, 2021 14:49:00 GMT -8
Did you use a good SD Card? Post a picture.
Take a look at Dow Hursts postings on logs and let's see why it is crashing.
BP
|
|
|
Post by Powderjockey on Jun 27, 2021 13:36:49 GMT -8
Here is the card. The nohup.out file is too large to submit. 29 MB.
|
|