Closed WirthmU closed 2 years ago
@WirthmU When on the website, press F12, then >>
, then Network
, then refresh the browser and see what image it's trying to read. It will probably be in red.
I suspect it's related to the "image-resize-YYYYMMDDHHMMSS.jpg" in the log file instead of "image-YYYYMMDDHHMMSS.jpg". Is your Image Name
in the WebUI set to image-resize.jpg
? If so, I suggest setting it to image.jpg
.
The Image Name
in the WebUI ist set to image-resize.jpg
. This used to work on this camera and it still does work on the second AllSky which has not been updated to the latest version. Even if I change the name to image.jpg
it still does not work.
Is there a way to force upload of the current image?
The Image Name
in the WebUI needs to match what's in the imageName
setting in the Website's config.js
file. See if yours does. If it does match, then please do the F12 thing per my last post.
Also, set your Debug Level in the WebUI to 4 and restart Allsky, then attach the log file. That will tell me if it's trying to upload the current image.
Debug Level is set to 4. All places for the file name are set to image.jpg. The log-file looks like this:
May 30 17:12:41 allsky allsky.sh[8178]: STARTING EXPOSURE at: 2022-05-30 17:12:41 @ 124 us
May 30 17:12:41 allsky allsky.sh[8178]: > Kill command: pgrep 'libcamera-still' | xargs kill -9 2> /dev/null
May 30 17:12:41 allsky allsky.sh[8178]: > Capture command: libcamera-still --output '/home/pi/allsky/tmp/image-20220530171241.jpg' --timeout 1 --nopreview --width 4056 --height 3040 --shutter 124 --gain 1 --exif IFD0.Artist=li_124_1 --awbgains 2.8,2 --rotation 180 --saturation 0 --brightness 1 --quality 100 > /tmp/capture_RPiHQ_debug.txt 2>&1
May 30 17:12:43 allsky allsky.sh[8178]: > exposure: 0.000 sec, mean: 0.475, mean_value: 0.500, diff: 0.025
May 30 17:12:43 allsky allsky.sh[8178]: > MeanCnt: 11, historySize: 3
May 30 17:12:43 allsky allsky.sh[8178]: > i=1: mean_history[0]=0.527 exp_history[0]=-461
May 30 17:12:43 allsky allsky.sh[8178]: > i=2: mean_history[1]=0.498 exp_history[1]=-467
May 30 17:12:43 allsky allsky.sh[8178]: > i=3: mean_history[2]=0.475 exp_history[2]=-467
May 30 17:12:43 allsky allsky.sh[8178]: > mean_forecast: 0.451, values: 9, mean_diff: 0.022
May 30 17:12:43 allsky allsky.sh[8178]: > ExposureChange: 6 (3)
May 30 17:12:43 allsky allsky.sh[8178]: > Mean: 0.478, diff: 0.022, Exposure level:-461 (6), Exposure time:139 us, analoggain:1.00
May 30 17:12:43 allsky allsky.sh[8178]: > Got exposure: 500 us, shutter: 139 us, quickstart: 0, mean=0.475
May 30 17:12:43 allsky allsky.sh[8178]: > Saving DAY image 'image-20220530171241.jpg'
May 30 17:12:43 allsky allsky.sh[8178]: Sleeping 60.0 seconds...
May 30 17:12:43 allsky allsky.sh[8572]: DEBUG: saveImage.sh DAY /home/pi/allsky/tmp/image-20220530171241.jpg EXPOSURE_US=124 BRIGHTNESS=100 MEAN=0.474720 AUTOEXPOSURE=1 AUTOGAIN=0 AUTOWB=0 WBR=2.800000 WBB=2 GAIN=0 GAINDB=1.00 BIN=1 FLIP=0 BIT_DEPTH=8
May 30 17:12:44 allsky allsky.sh[8572]: saveImage.sh: Resizing '/home/pi/allsky/tmp/image-20220530171241.jpg' to 1014x760
May 30 17:13:43 allsky allsky.sh[8178]: STARTING EXPOSURE at: 2022-05-30 17:13:43 @ 139 us
May 30 17:13:43 allsky allsky.sh[8178]: > Kill command: pgrep 'libcamera-still' | xargs kill -9 2> /dev/null
May 30 17:13:43 allsky allsky.sh[8178]: > Capture command: libcamera-still --output '/home/pi/allsky/tmp/image-20220530171343.jpg' --timeout 1 --nopreview --width 4056 --height 3040 --shutter 139 --gain 1 --exif IFD0.Artist=li_139_1 --awbgains 2.8,2 --rotation 180 --saturation 0 --brightness 1 --quality 100 > /tmp/capture_RPiHQ_debug.txt 2>&1
May 30 17:13:46 allsky allsky.sh[8178]: > exposure: 0.000 sec, mean: 0.469, mean_value: 0.500, diff: 0.031
May 30 17:13:46 allsky allsky.sh[8178]: > MeanCnt: 12, historySize: 3
May 30 17:13:46 allsky allsky.sh[8178]: > i=1: mean_history[1]=0.498 exp_history[1]=-467
May 30 17:13:46 allsky allsky.sh[8178]: > i=2: mean_history[2]=0.475 exp_history[2]=-467
May 30 17:13:46 allsky allsky.sh[8178]: > i=3: mean_history[0]=0.469 exp_history[0]=-461
May 30 17:13:46 allsky allsky.sh[8178]: > mean_forecast: 0.464, values: 9, mean_diff: 0.028
May 30 17:13:46 allsky allsky.sh[8178]: > ExposureChange: 7 (1)
May 30 17:13:46 allsky allsky.sh[8178]: > Mean: 0.472, diff: 0.028, Exposure level:-454 (7), Exposure time:159 us, analoggain:1.00
May 30 17:13:46 allsky allsky.sh[8178]: > Got exposure: 500 us, shutter: 159 us, quickstart: 0, mean=0.469
May 30 17:13:46 allsky allsky.sh[8178]: > Saving DAY image 'image-20220530171343.jpg'
May 30 17:13:46 allsky allsky.sh[8178]: Sleeping 60.0 seconds...
May 30 17:13:46 allsky allsky.sh[8613]: DEBUG: saveImage.sh DAY /home/pi/allsky/tmp/image-20220530171343.jpg EXPOSURE_US=139 BRIGHTNESS=100 MEAN=0.469374 AUTOEXPOSURE=1 AUTOGAIN=0 AUTOWB=0 WBR=2.800000 WBB=2 GAIN=0 GAINDB=1.00 BIN=1 FLIP=0 BIT_DEPTH=8
May 30 17:13:47 allsky allsky.sh[8613]: saveImage.sh: Resizing '/home/pi/allsky/tmp/image-20220530171343.jpg' to 1014x760
No signs of any upload activity.
@WirthmU Change IMG_UPLOAD="yes"
to IMG_UPLOAD="true"
.
What a silly typing mistake of me. Please excuse the trouble and thank you for the continous support @EricClaeys !I
t seems to try to upload - but there is a permission problem on the NAS. I have set the folders to 777 but still no success:
May 31 10:38:38 allsky allsky.sh[43665]: saveImage.sh: Resizing '/home/pi/allsky/tmp/image-20220531103835.jpg' to 1014x760
May 31 10:38:39 allsky allsky.sh[43678]: upload.sh: FTP '/home/pi/allsky/tmp/image-20220531103835.jpg' to '/web/Bern/allsky_2/image.jpg', TEMP_NAME=SaveImage-12423
May 31 10:38:39 allsky allsky.sh[43682]: /home/pi/allsky/scripts/upload.sh: line 177: /home/pi/allsky/tmp/lftp_cmds.txt: Permission denied
May 31 10:38:45 allsky allsky.sh[43678]: upload.sh: FTP '/home/pi/allsky/tmp/image-20220531103835.jpg' finished
If I do it by hand it works:
pi@allsky:~/allsky/tmp $ sudo bash /home/pi/allsky/scripts/upload.sh /home/pi/allsky/tmp/image.jpg /web/Bern/allsky_2/ image.jpg
upload.sh: FTP '/home/pi/allsky/tmp/image.jpg' to '/web/Bern/allsky_2/image.jpg', TEMP_NAME=x-368
@WirthmU No problem. It gave me the opportunity to add another check to the "installation wizard" I want to create that checks everything. It will now also check that all true/false variables are either "true" or "false". I'm sure you aren't the first one to do this.
Try doing it by hand but don't use "sudo". Allsky runs as "pi", not "root". The WebUI and Website run as "www-data", but upload.sh
is run from Allsky.
First, though, I'd do this:
ls -ld /home/pi/allsky/tmp
That's the directory it's trying to create the lftp_cmds.txt
file in when it gets permission denied. Is your tmp directory on the NAS, or on your Pi? If on the NAS, it would probably be a LOT easier just to make it a memory filesystem - it'll be faster too. There's a WiKi page for that.
@WirthmU Any update?
It's working now!
I did do a re-install with the latest version here on GitHub yesterday.
There is no live view on the Website although the settings in config.sh did not change:
Allsky service is running:
I have a second AllSky camera running with a prevoius version of the software with exactly the same config.sh and ftp-settings.sh which is working perfectly fine.