Skip to content

Commit b8925fc

Browse files
authored
Merge pull request #4419 from AllskyTeam/v2024.12.06_02
V2024.12.06_02
2 parents 8b311b0 + 84f0dc0 commit b8925fc

109 files changed

Lines changed: 3420 additions & 1431 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ endif
2323
%:
2424
@make -C src $@
2525
@make -C config_repo $@
26-
@make -C notification_images $@
26+
@make -C notificationImages $@
2727
@make -C scripts $@
2828

2929
deps:
@@ -39,7 +39,7 @@ else
3939
@echo `date +%F\ %R:%S` Starting install...
4040
@make -C src $@
4141
@make -C config_repo $@
42-
@make -C notification_images $@
42+
@make -C notificationImages $@
4343
@make -C scripts $@
4444
@if [ $(PKGBUILD) -eq 1 ]; then \
4545
[ ! -e $(DESTDIR)$(libexecdir) ] && mkdir -p $(DESTDIR)$(libexecdir) \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Allsky Camera ![Release](https://img.shields.io/badge/Version-v2024.12.06_01-green.svg) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MEBU2KN75G2NG&source=url)
1+
# Allsky Camera ![Release](https://img.shields.io/badge/Version-v2024.12.06_02-green.svg) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=MEBU2KN75G2NG&source=url)
22

33
This is the source code for the Allsky Camera project described [on Instructables](http://www.instructables.com/id/Wireless-All-Sky-Camera/).
44
 
@@ -13,6 +13,7 @@ This is the source code for the Allsky Camera project described [on Instructable
1313
In order to run the Allsky software you need:
1414

1515
* A Raspberry Pi Zero 2, Pi 2, Pi 3, Pi 4, Pi 5, or Le Potato.
16+
* A version of the Raspberry Pi OS. Other operating systems like Ubuntu are NOT supported. If possible use the newest Bookworm 64-bit release of Pi OS with the "Desktop" version. Bullseye will also work. __Buster support will be dropped in the next major release__.
1617
* A camera:
1718
* Any ZWO camera sold before February 1, 2025,
1819
* or one of the following cameras:
@@ -33,7 +34,6 @@ In order to run the Allsky software you need:
3334

3435
 
3536
> __NOTES:__
36-
> - Only the Raspberry Pi OS is supported. Other operating systems like Ubuntu are NOT supported. If possible use the newest Bookworm 64-bit release. Bullseye will also work. __Buster support will be dropped in the next major release__.
3737
> - The ZWO ASI120-series cameras are __not__ recommended due to their tendency to produce poor-quality images.
3838
> - The Pi Zero with its limited memory and _very_ limited CPU power is not recommended. You probably won't be able to create keograms, startrails, or timelapse videos.
3939
> - The Pi Zero 2 with its limited memory and somewhat limited CPU power is not recommended unless cost is the only concern. Creating keograms, startrails, and timelapse videos may or may not be possible.

allsky.sh

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ if [[ ! -d ${ALLSKY_CONFIG} ]]; then
1919
MSG="*** ====="
2020
MSG+="\nAllsky needs to be installed. Run: cd ~/allsky; ./install.sh"
2121
MSG+="\n*** ====="
22-
echo -e "${RED}${MSG}${NC}" >&2
22+
E_ "${MSG}" >&2
2323

24-
# Can't call addMessage.sh or copy_notification_image.sh or almost anything
24+
# Can't call addMessage.sh or copyNotificationImage.sh or almost anything
2525
# since they use ${ALLSKY_CONIG} and/or ${ALLSKY_TMP} which don't exist yet.
2626
set_allsky_status "${ALLSKY_STATUS_NEVER_RUN}"
2727
doExit "${EXIT_ERROR_STOP}" "no-image" "" ""
@@ -36,9 +36,9 @@ usage_and_exit()
3636
MSG+="\n '--help' displays this message and the help message from the capture program, then exits."
3737
MSG+="\n '--preview' displays images on your screen as they are taken."
3838
if [[ ${RET} -eq 0 ]]; then
39-
echo -e "${YELLOW}${MSG}${NC}"
39+
W_ "${MSG}" >&2
4040
else
41-
echo -e "${RED}${MSG}${NC}"
41+
E_ "${MSG}" >&2
4242
exit "${RET}"
4343
fi
4444
}
@@ -59,7 +59,7 @@ while [[ $# -gt 0 ]]; do
5959
PREVIEW="true"
6060
;;
6161
-*)
62-
echo -e "${RED}ERROR: Unknown argument: '${ARG}'${NC}." >&2
62+
E_ "ERROR: Unknown argument: '${ARG}'." >&2
6363
OK="false"
6464
;;
6565
*)
@@ -76,7 +76,7 @@ if [[ ${HELP} == "true" ]]; then
7676
fi
7777

7878
# Make it easy to find the beginning of this run in the log file.
79-
echo " ***** Starting AllSky *****"
79+
echo " ***** Starting Allsky *****"
8080

8181
# Make sure ${CAMERA_TYPE} is valid; if not, exit with a message.
8282
verify_CAMERA_TYPE "${CAMERA_TYPE}"
@@ -116,24 +116,24 @@ ARGS_FILE="${ALLSKY_TMP}/capture_args.txt"
116116
# or it's been at least a week since the last reminder.
117117
if [[ -d ${PRIOR_ALLSKY_DIR} ]]; then
118118
DO_MSG="true"
119-
if [[ -f ${OLD_ALLSKY_REMINDER} ]]; then
119+
if [[ -f ${ALLSKY_OLD_REMINDER} ]]; then
120120
CHECK_DATE="$( date -d '1 week ago' +'%Y%m%d%H%M.%S' )"
121121
CHECK_TMP_FILE="${ALLSKY_TMP}/check_date"
122122
touch -t "${CHECK_DATE}" "${CHECK_TMP_FILE}"
123-
[[ ${OLD_ALLSKY_REMINDER} -nt "${CHECK_TMP_FILE}" ]] && DO_MSG="false"
123+
[[ ${ALLSKY_OLD_REMINDER} -nt "${CHECK_TMP_FILE}" ]] && DO_MSG="false"
124124
rm -f "${CHECK_TMP_FILE}"
125125
fi
126126
if [[ ${DO_MSG} == "true" ]]; then
127127
MSG="Reminder: your prior Allsky is still in '${PRIOR_ALLSKY_DIR}'."
128128
MSG+="\nIf you are no longer using it, it can be removed to save disk space."
129129
"${ALLSKY_SCRIPTS}/addMessage.sh" --id AM_RM_PRIOR --type info --msg "${MSG}" \
130130
--cmd "Click here to remove."
131-
touch "${OLD_ALLSKY_REMINDER}" # Sets the last time we displayed the message.
131+
touch "${ALLSKY_OLD_REMINDER}" # Sets the last time we displayed the message.
132132
fi
133133
fi
134134

135135
# If there's some checkAllsky.sh output, remind the user.
136-
if [[ -f ${CHECK_ALLSKY_LOG} ]]; then
136+
if [[ -f ${ALLSKY_CHECK_LOG} ]]; then
137137
DO_MSG="true"
138138
REMINDER="${ALLSKY_LOGS}/checkAllsky_reminder.txt"
139139
if [[ -f ${REMINDER} ]]; then
@@ -147,17 +147,17 @@ if [[ -f ${CHECK_ALLSKY_LOG} ]]; then
147147
MSG="<div class='errorMsgBig errorMsgBox center-div center-text'>"
148148
MSG+="Reminder to make these changes to your settings"
149149
MSG+="</div>"
150-
MSG+="$( < "${CHECK_ALLSKY_LOG}" )"
150+
MSG+="$( < "${ALLSKY_CHECK_LOG}" )"
151151
"${ALLSKY_SCRIPTS}/addMessage.sh" --id AM_RM_CHECK --type warning --msg "${MSG}" \
152152
--cmd "<hr><span class='errorMsgBig'>If you made the changes click here.</span>"
153153
touch "${REMINDER}" # last time we displayed the message
154154
fi
155155
fi
156156

157157
# This file contains information the user needs to act upon after an installation.
158-
if [[ -f ${POST_INSTALLATION_ACTIONS} ]]; then
158+
if [[ -f ${ALLSKY_POST_INSTALL_ACTIONS} ]]; then
159159
# If there's an initial message created during installation, display an image and stop.
160-
F="${POST_INSTALLATION_ACTIONS}_initial_message"
160+
F="${ALLSKY_POST_INSTALL_ACTIONS}_initial_message"
161161
if [[ -f ${F} ]]; then
162162
# There is already a message so don't add another,
163163
# and there's already an image, so don't overwrite it.
@@ -167,7 +167,7 @@ if [[ -f ${POST_INSTALLATION_ACTIONS} ]]; then
167167
doExit "${EXIT_ERROR_STOP}" "no-image" "" ""
168168
else
169169
MSG="Reminder: Click here to see the action(s) that need to be performed."
170-
PIA="${POST_INSTALLATION_ACTIONS/${ALLSKY_HOME}/}"
170+
PIA="${ALLSKY_POST_INSTALL_ACTIONS/${ALLSKY_HOME}/}"
171171
"${ALLSKY_SCRIPTS}/addMessage.sh" --id AM_RM_POST --type warning --msg "${MSG}" --url "${PIA}" \
172172
--cmd "\nOnce you perform them, click here to remove this message."
173173
fi
@@ -194,7 +194,7 @@ if [[ ${CAMERA_TYPE} == "ZWO" ]]; then
194194
rm -f "${RESETTING_USB_LOG}"
195195

196196
MSG="Too many consecutive USB bus resets done (${NUM_USB_RESETS})."
197-
echo -e "${RED}*** ${FATAL_MSG} ${MSG} Stopping Allsky.${NC}" >&2
197+
E_ "*** ${FATAL_MSG} ${MSG} Stopping Allsky." >&2
198198
IMAGE_MSG="${ERROR_MSG_PREFIX}"
199199
IMAGE_MSG+="\nToo many consecutive\nUSB bus resets done!\n${SEE_LOG_MSG}"
200200
doExit "${EXIT_ERROR_STOP}" "Error"
@@ -206,7 +206,7 @@ if [[ ${CAMERA_TYPE} == "ZWO" ]]; then
206206

207207
MSG="WARNING: Resetting USB ports ${REASON/\\n/ }"
208208
if [[ ${ON_TTY} == "true" ]]; then
209-
echo "${YELLOW}${MSG}; restart ${ME} when done.${NC}" >&2
209+
W_ "${MSG}; restart ${ME} when done." >&2
210210
else
211211
echo "${MSG}, then restarting." >&2
212212
# The service will automatically restart this script.
@@ -216,7 +216,7 @@ if [[ ${CAMERA_TYPE} == "ZWO" ]]; then
216216
echo "${NUM_USB_RESETS}" > "${RESETTING_USB_LOG}"
217217

218218
# Display a warning message
219-
"${ALLSKY_SCRIPTS}/generate_notification_images.sh" --directory "${ALLSKY_TMP}" \
219+
"${ALLSKY_SCRIPTS}/generateNotificationImages.sh" --directory "${ALLSKY_TMP}" \
220220
"${FILENAME}" "yellow" "" "85" "" "" \
221221
"" "5" "yellow" "${EXTENSION}" "" \
222222
"WARNING:\n\nResetting USB bus\n${REASON}.\nAttempt ${NUM_USB_RESETS}."
@@ -274,7 +274,7 @@ fi
274274
# Make sure the settings file is linked to the camera-specific file.
275275
if ! MSG="$( check_settings_link "${SETTINGS_FILE}" )" ; then
276276
"${ALLSKY_SCRIPTS}/addMessage.sh" --type error --cmd "${MSG}"
277-
echo "ERROR: ${MSG}" >&2
277+
E_ "ERROR: ${MSG}" >&2
278278
fi
279279

280280
# Make directories that need to exist.
@@ -305,12 +305,12 @@ rm -f "${ALLSKY_NOTIFICATION_LOG}" # clear out any notificatons from prior runs.
305305
# Optionally display a notification image.
306306
if [[ ${USE_NOTIFICATION_IMAGES} == "true" ]]; then
307307
# Can do this in the background to speed up startup.
308-
"${ALLSKY_SCRIPTS}/copy_notification_image.sh" --expires 0 "StartingUp" 2>&1 &
308+
"${ALLSKY_SCRIPTS}/copyNotificationImage.sh" --expires 0 "StartingUp" 2>&1 &
309309
fi
310310

311311
# Only pass settings that are used by the capture program.
312312
if ! ARGS="$( "${ALLSKY_SCRIPTS}/convertJSON.php" --capture-only )" ; then
313-
echo "${ME}: ERROR: convertJSON.php returned: ${ARGS}"
313+
E_ "${ME}: ERROR: convertJSON.php returned: ${ARGS}"
314314
set_allsky_status "${ALLSKY_STATUS_ERROR}"
315315
exit "${EXIT_ERROR_STOP}"
316316
fi
@@ -360,6 +360,8 @@ RETCODE=$?
360360
if [[ ${RETCODE} -eq ${EXIT_OK} ]]; then
361361
[[ ${CAMERA_TYPE} == "ZWO" ]] && rm -f "${RESETTING_USB_LOG}"
362362
set_allsky_status "${ALLSKY_STATUS_STOPPED}"
363+
# The user probably stopped Allsky, and the WebUI's status will show "Stopped".
364+
# In case the user wants to see the last image, do NOT call copyNotificationImage.sh.
363365
doExit "${EXIT_OK}" ""
364366
fi
365367

@@ -370,6 +372,9 @@ if [[ ${RETCODE} -eq ${EXIT_RESTARTING} ]]; then
370372
else
371373
NOTIFICATION_TYPE="Restarting"
372374
fi
375+
if [[ ${USE_NOTIFICATION_IMAGES} == "true" ]]; then
376+
"${ALLSKY_SCRIPTS}/copyNotificationImage.sh" "${NOTIFICATION_TYPE}"
377+
fi
373378
set_allsky_status "${ALLSKY_STATUS_RESTARTING}"
374379
doExit 0 "${NOTIFICATION_TYPE}" # use 0 so the service is restarted
375380
fi
@@ -384,7 +389,7 @@ if [[ ${RETCODE} -eq ${EXIT_RESET_USB} ]]; then
384389
NOTIFICATION_TYPE="Restarting"
385390
fi
386391
if [[ ${USE_NOTIFICATION_IMAGES} == "true" ]]; then
387-
"${ALLSKY_SCRIPTS}/copy_notification_image.sh" "${NOTIFICATION_TYPE}"
392+
"${ALLSKY_SCRIPTS}/copyNotificationImage.sh" "${NOTIFICATION_TYPE}"
388393
fi
389394
set_allsky_status "${ALLSKY_STATUS_ERROR}"
390395
doExit 0 "" # use 0 so the service is restarted

config_repo/allskyDefines.inc.repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ define('ALLSKY_UTILITIES', 'XX_ALLSKY_UTILITIES_XX');
99
define('ALLSKY_TMP', 'XX_ALLSKY_TMP_XX');
1010
define('ALLSKY_IMAGES', 'XX_ALLSKY_IMAGES_XX');
1111
define('ALLSKY_MESSAGES', 'XX_ALLSKY_MESSAGES_XX');
12-
define('ALLSKY_CHECK_ALLSKY_LOG', 'XX_ALLSKY_CHECK_ALLSKY_LOG_XX');
12+
define('ALLSKY_CHECK_ALLSKY_LOG', 'XX_ALLSKY_CHECK_LOG_XX');
1313
define('ALLSKY_WEBUI', 'XX_ALLSKY_WEBUI_XX');
1414
define('ALLSKY_WEBSITE', 'XX_ALLSKY_WEBSITE_XX');
1515
define('ALLSKY_WEBSITE_LOCAL_CONFIG_NAME', 'XX_ALLSKY_WEBSITE_LOCAL_CONFIG_NAME_XX');

config_repo/options.json.repo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"minimum" : "_min",
5656
"maximum" : "_max",
5757
"default" : "_default",
58-
"description" : "Maximum daytime <span class='WebUISetting'>Auto-Exposure<span> time in milliseconds (1000ms = 1 sec).<br>Click <a allsky='true' external='true' href='/documentation/settings/allsky.html#daymaxautoexposure'>here</a> to see how this setting impacts the time between exposures.",
58+
"description" : "Maximum daytime <span class='WebUISetting'>Auto-Exposure</span> time in milliseconds (1000ms = 1 sec).<br>Click <a allsky='true' external='true' href='/documentation/settings/allsky.html#daymaxautoexposure'>here</a> to see how this setting impacts the time between exposures.",
5959
"label" : "Max Auto-Exposure",
6060
"label_prefix" : "Daytime",
6161
"type" : "float",
@@ -873,7 +873,7 @@
873873
{
874874
"name" : "debuglevel",
875875
"default" : 1,
876-
"description" : "Debug level. <span class='WebUIValue'>0</span> is errors only. <span class='WebUIValue'>4</span> is for Allsky developers use.",
876+
"description" : "Debug level. Use <span class='WebUIValue'>3</span> while debugging. See the <a external='true' allsky='true' href='/documentation/settings/allsky.html#debuglevel'>documentation</a> for meaning of the levels.",
877877
"label" : "Debug Level",
878878
"type" : "select_integer",
879879
"usage" : "capture",
@@ -1195,7 +1195,7 @@
11951195
{
11961196
"name" : "imageremovebadhigh",
11971197
"minimum" : 0,
1198-
"maximum" : 0.5,
1198+
"maximum" : 0.999,
11991199
"default" : 0.9,
12001200
"description" : "Delete images whose mean is above this value.<br><span class='WebUIValue'>0</span> disables this check.",
12011201
"label" : "Remove Bad Images Threshold High",
@@ -1405,7 +1405,7 @@
14051405
{
14061406
"name" : "timelapseextraparameters",
14071407
"default" : "",
1408-
"description" : "Optional additional timelapse creation parameters. Run <code>ffmpeg -?</code> to see the options.<br>If quality is poor or the video does not plan on Apple devices, try adding <code>-level 3.1</code>.",
1408+
"description" : "Optional additional timelapse creation parameters. Run <code>ffmpeg -?</code> to see the options.<br>If quality is poor or the video does not play on Apple devices, try adding <code>-level 3.1</code>.",
14091409
"label" : "Extra Parameters",
14101410
"label_prefix" : "Daily Timelapse",
14111411
"type" : "widetext",

config_repo/requirements-32.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ astropy
1111
suncalc
1212
Adafruit-Blinka
1313
vcgencmd
14+
certifi
1415
requests

config_repo/requirements-64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ astropy
1111
suncalc
1212
Adafruit-Blinka
1313
vcgencmd
14+
certifi
1415
requests

config_repo/requirements-bookworm-32.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ astropy
1111
suncalc
1212
Adafruit-Blinka
1313
vcgencmd
14+
certifi
1415
requests

config_repo/requirements-bookworm-64.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ astropy
1111
suncalc
1212
Adafruit-Blinka
1313
vcgencmd
14+
certifi
1415
requests

config_repo/requirements-buster.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ paho-mqtt
1010
suncalc
1111
Adafruit-Blinka
1212
vcgencmd
13+
certifi
1314
requests

0 commit comments

Comments
 (0)