|
Post by Ms. A on Apr 22, 2021 8:54:07 GMT -8
No, the key is always present when I run the SkyWeatherConfigure.py
|
|
|
Post by Ms. A on Apr 22, 2021 8:56:55 GMT -8
|
|
|
Post by Jason on Apr 22, 2021 9:22:47 GMT -8
Does the output of the following command show your station key?
grep -o '\"STATIONKEY\":\s\"[a-zA-Z0-9]*\"' SkyWeather2.JSON Thanks,
Jason
|
|
|
Post by Ms. A on Apr 22, 2021 9:35:07 GMT -8
Unless I typed the command wrong, it did not show me the station key. imgur.com/dktAVEB
|
|
|
Post by Jason on Apr 22, 2021 9:48:31 GMT -8
Could you please run sudo python3 SkyWeatherConfigure.py and enter and save your station key. This time don't reboot the Pi. Instead, confirm the key is present in SkyWeather2.JSON using the grep command above and then run sudo python3 testSkyCamera.py and see if the key is present in the output.
Thanks,
Jason
|
|
|
Post by Ms. A on Apr 22, 2021 10:27:53 GMT -8
It is literally giving me the exact same output as the last screen shot I sent you: imgur.com/dktAVEB
|
|
|
Post by Jason on Apr 22, 2021 10:33:00 GMT -8
Very odd. Assuming you’re running all commands as sudo, you have the necessary permissions to write to the file SkyWeather2.JSON from the SkyWeatherConfigure.py script. Yet, it doesn’t appear as though the file is being updates.
In the terminal window where you are running SkyWeatherConfigure.py, are you seeing any error messages as you navigate and work in the web browser?
Thanks,
Jason
|
|
|
Post by SDL on Apr 22, 2021 15:21:30 GMT -8
This could be a "sudo" problem as Jason says. You have to run sudo python3 SkyWeatherConfigure.py, enter your station key and then save and exit.
You don't have the station key in the JSON file.
BP
|
|
|
Post by Ms. A on Apr 26, 2021 5:24:50 GMT -8
No, I don't see any error messages as I work in the web browser.
|
|
|
Post by Ms. A on Apr 26, 2021 5:26:43 GMT -8
I have done that so many times, and when I go to the browser and the configure page, my station key is there. It just doesn't translate over to the JSON file and i'm not sure why?
|
|
|
Post by Ms. A on Apr 26, 2021 5:36:49 GMT -8
Would it be beneficial for me to hit "reset to defaults" on the configure page to "start over"?
|
|
|
Post by SDL on Apr 26, 2021 7:32:55 GMT -8
are you starting it as:
"sudo python3 index.py"?
BP
|
|
|
Post by Ms. A on Apr 26, 2021 8:24:07 GMT -8
no? I didn't see that in any of the directions? did I miss something? I start it as cd cd SDL_pi_SkyWeather2 sudo python3 SkyWeatherConfigure.py Then I open my browser (I've been working through Edge... It's the only one allowed at school) and then type 192.168.1.250:8001/ (IP address of my Pi) Is this incorrect?
|
|
|
Post by Jason on Apr 26, 2021 11:07:32 GMT -8
That is the correct way to launch the configuration tool and should allow for writing of the file.
Thanks,
Jason
|
|
dow4hurst
Full Member
SkyWeather2 Newbie
Posts: 117
|
Post by dow4hurst on Apr 26, 2021 15:20:14 GMT -8
Ms. A, I was reading through the thread. You originally had the SkyWeather2 updating weatherstem. Then, it quit and now it seems you can't write data to the SD card. If the file system has been remounted as read only, due to a filesystem error, then that would prevent any writes. Turning the raspberry pi off without going through a shutdown procedure can cause file system corruption. I would think you wouldn't be able to reboot the device normally if you turned it off and back on again, so don't do that yet. It is weird you don't seem to able to update the JSON file and this is one possible reason.
If you haven't rebooted the pi in a while, try this code to check for read only filesystems. We would be looking for /dev/root to be mounted as read only if this is what has happened.
awk '$4~/(^|,)ro($|,)/' /proc/mounts
That should only show tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
but if /dev/root is read only, where the /home/pi directory is located, then you would see it show up in the list. It's a hail mary, but worth checking.
Don't reboot the pi, but to shutdown and restart the pi you would normally use this command:
sudo shutdown -r now
but if you have a pi where the SkyWeather2 python script has crashed, but you can still access via ssh and run commands, then rebooting with this seems to work well. This preserves the filesystem too by forcing the disk to sync.
echo s | sudo tee /proc/sysrq-trigger;echo u | sudo tee /proc/sysrq-trigger;echo b | sudo tee /proc/sysrq-trigger that is all one command, but is multiple magic sysrq commands back to back. It forces a sync, unmounting of the filesystem, and then reboot of the device.
If the root filesystem is read only, then I'd like others to advise what would be the next step. I think you could turn off the pi, and try repairing the filesystem using a different computer that has linux. But, lets see if there is this problem first.
Dow Hurst
|
|