Replies: 17 comments 24 replies
-
Please let me know if it works for you, or any improvements. I just set up my allsky thanks to this community and noticed this still wasn't fixed. |
Beta Was this translation helpful? Give feedback.
-
@DSCustoms, you really don't want to be modifying Allsky code like I suggest adding a "Allsky Script" module prior to the "Overlays data on the image" module, where the script would do your "grep" and write the output to the TEMPERATURE_FILE (${ALLSKY_TMP}/temperature.txt"). If that works we would likely make your script an official one so others could use it. Of course once I get off my butt and update Allsky to handle temperature for RPi cameras that support it, the change won't be needed. |
Beta Was this translation helpful? Give feedback.
-
many thx! |
Beta Was this translation helpful? Give feedback.
-
Ok, so I'm making a file in /allsky/ called rpi_hq_temp.sh
chatgpt had to help me with this a little. ;) Can a real programmer fix it? then run chmod +x rpi_hq_temp.sh adding the allsky_script module before "overlays data on an image" on both day and night capture flows in the module manager, set the file location as /home/(my dir)/allsky/rpi_hq_temp.sh Slap on the lens cap, turn on @EricClaeys can you confirm what module flow the dark frames are taken with? I put the script in day and night capture. I know the script works, I can run it manually and it'll create the temperature file, which then is picked up by saveImage.sh and saved into the filename of the dark. But I can't get the script module to run my code and the debug doesn't work. What am I missing? |
Beta Was this translation helpful? Give feedback.
-
@Alex-developer, @DSCustoms, thanks for doing this. I will make some changes depending on what Alex says. |
Beta Was this translation helpful? Give feedback.
-
@DSCustoms, FYI, I got involved with Allsky because I noticed a lot of little things that "didn't work", just like you! |
Beta Was this translation helpful? Give feedback.
-
The scripts should never run as sudo - it'll hose up the file permissions. Below is a modified version of your script. You may want to put your script somewhere other than ~/allsky, because it'll get remove whenever you upgrade. I put my scripts in What did you mean by:
You can take darks during daytime or nighttime but darks are only subtracted at nighttime. That's all done during the initial save of the image to allsky/tmp.
|
Beta Was this translation helpful? Give feedback.
-
For libcamera cameras, it should be noted that you should only take dark frames when two conditions are true:
|
Beta Was this translation helpful? Give feedback.
-
When taking dark frames Allsky disables Auto-white balance. To use png change the |
Beta Was this translation helpful? Give feedback.
-
This "new code" would be integrated in a futur release ? |
Beta Was this translation helpful? Give feedback.
-
Im confused about this whole thread, I cant find any documentation on the RPi HQ camera supporting internal temperature reading. I added the extra arguments to the libcamera-still and see that its writing a file but the temperature value in the metadata file is always zero. Can someone set me straight? thanks |
Beta Was this translation helpful? Give feedback.
-
For those coming to this thread looking for a more turn-key how-to, here's how I got temperatures working for dark frames (Pi 4 + HQ camera + Allsky Version: v2023.05.01_04).
Let your darks run (reference the documentation if unsure how) and you should get properly named darks in the folder:
I'll come back to edit this later with whether or not temperatures are properly reported in the overlays as well. EDIT: Temperature is working in the overlay |
Beta Was this translation helpful? Give feedback.
-
@gingerbreadassassin, Connor, thanks for doing this. Please note that only a few of the RPi cameras support temperature. |
Beta Was this translation helpful? Give feedback.
-
I have created my darkframes with your script and they are also in the corresponding directory. So far so good. However, it seems to me that Allsky then always uses the same dark frame when recording, regardless of the temperature. In my opinion, Allsky only uses the internal camera temperature during dark frame correction, which can only be read out via the script for RPi cameras, but not the generated "${ALLSKY_TMP}/temperature.txt". How do I get the evaluation via the "${ALLSKY_TMP}/temperature.txt" into the processing of the images? |
Beta Was this translation helpful? Give feedback.
-
it is because over the night there are temperature changes of about 4 degrees Celsius but in the video i have some dark pixels. This are hot pixels that only appear in the darkframes over 30 degree Celsius. |
Beta Was this translation helpful? Give feedback.
-
Set Dark subtraction is done in darkSubtract.sh which is called from saveImage.sh. |
Beta Was this translation helpful? Give feedback.
-
@ThomasW69, Allsky only uses the internal camera temperature during dark frame correction, which can only be read out via the script for RPi cameras, but not the generated "${ALLSKY_TMP}/temperature.txt". Are you saying that for RPi cameras the temperature.txt file is not being read? If so, then it's a bug and no dark subtraction will occur. The temperature.txt file is looked at in saveImage.sh. |
Beta Was this translation helpful? Give feedback.
-
Taking dark frames with rpi HQ camera
To get the sensor temperature add --metadata /home/(your pi name)/allsky/config/overlay/extra/libcamera.txt --metadata-format txt to the Extra Arguments setting in the WebUI. This will update the libcamera.txt file after every image with data about the image - a timestamp, the exposure used, the sensor temperature (if the camera supports it), and other data.
Do the following
cd allsky
cd scripts
sudo nano saveImage.sh
At the top, after /bin/bash paste the following code
Then scroll down to line 124 and delete the following block of code
Replace it with this code
close ctrl-x
save y
enter
sudo reboot
Now the allsky software will save the temperature data from the rpi hq camera to the libcamera.txt file when you take photos, and create dark frames with the correct filenames!
Put the lens cover on, and put the whole enclosure in a dark bag, I use the one I handle photographic film in.
Set “take dark frames” to yes. Save and restart.
I put the whole thing in the freezer for an hour, then start it back up while taking dark frames and just log every photo. Do this a few times and you’ll get a nice range of temps.
When you are bored of this, turn off “take dark frames” and turn on “use dark frames”
Took a bunch of effort to figure out as I barely code :)
Beta Was this translation helpful? Give feedback.
All reactions