Skip to content

Commit

Permalink
Updated to ver 0.8 and other changes
Browse files Browse the repository at this point in the history
Updated to ver 0.8 (should have been done in prior update).
Mention allowing users to change timelapse bitrate.
Other changes that were missed in prior update.
  • Loading branch information
EricClaeys committed Aug 14, 2021
1 parent b302888 commit 9ec0bfb
Showing 1 changed file with 33 additions and 23 deletions.
56 changes: 33 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is the source code for the Wireless Allsky Camera project described [on Ins
In order to get the camera working properly you will need the following hardware:

* A camera (Tested cameras include Raspberry Pi HQ camera, ASI120MC*, ASI120MM*, ASI120MC-S, ASI120MM-S, ASI224MC, ASI178MC, ASI185MC, ASI290MC, ASI1600MC
* A Raspberry Pi (2, 3, 4 or zero)
* A Raspberry Pi (2, 3, 4 or Zero)

**Note:*** Owners of USB2.0 cameras such as ASI120MC and ASI120MM may need to do a [firmware upgrade](https://astronomy-imaging-camera.com/software/) (This changes the camera to use 512 byte packets instead of 1024 which makes it more compatible with most hardware.)

Expand All @@ -24,7 +24,7 @@ The Datyson T7 camera seems to be supported as well. The firmware needs to be up

You will need to install Raspbian on your Raspberry Pi. Follow [this link](https://www.raspberrypi.org/documentation/installation/installing-images/) for information on how to do it.

Make sure you have a working internet connection by setting it either through the GUI or [the terminal](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md).
Make sure you have a working internet connection by setting it either through the GUI or [the terminal](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md). The GUI is highly recommended since it simplifies administration of the AllSky software.

Start by installing git. You may already have it installed:

Expand Down Expand Up @@ -54,6 +54,13 @@ sudo ./install.sh

There is no 1-click update yet so until then, the easiest is to backup your config files, delete the allsky directory and follow the installation instructions again.

Please note that version 0.8 added many new settings and changed the name of several existing settings. For example, there are now separate brightness levels for daytime and nighttime, called "daybrightness" and "nightbrightness". Version 0.7 only had "brightness" that applied to both day and nighttime. It's very important that you save a copy of your current settings prior to upgrading to version 0.8 so you can restore them properly.
The GUI interface uses these new settings so it's also important to update AllSky **prior to** updating the GUI.

Also note that in version 0.8, the default image file created and uploaded is called either "image.jpg" or "liveview-image.jpg", depending on how you set things up. The prior "image-resize.jpg" is no longer created. Keep that in mind if you copy the image to a remote web server - it will need to know about the new name.

Some users have reported ASI TIMEOUT errors with their ZWO cameras in verion 0.8. This can often be fixed by changing the "autousb" and/or "usb" settings - see below.

## Configuration

Here's a quick overview of the configuration files.
Expand All @@ -69,49 +76,53 @@ nano settings.json
| width | 0 | 0 means max width. Look up your camera specifications to know what values are supported |
| height | 0 | 0 means max height. Look up your camera specifications to know what values are supported |
| dayautoexposure | 1 | Set to 0 to disable auto-exposure during **daytime**. Auto-exposure delivers properly exposed images throughout the day even if the overall brightness of the sky changes (cloud cover, sun, etc). Since daytime exposures are short, there is not daytime "maxexposure". This option is usually only disabled for testing. |
| dayexposure | 1 | **Day** time manual exposure time in milliseconds. Normally daytime auto-exposure will be used; if so, this value is used as a starting exposure. |
| dayexposure | 0.5 | **Day** time manual exposure time in milliseconds. Normally daytime auto-exposure will be used; if so, this value is used as a starting exposure. |
| daybrightness | 50 | Varies between 0 and 600. This setting changes the amount of light in **daytime** images. |
| daydelay | 5000 | Time in milliseconds to wait between 2 frames during the day. |
| daybin | 1 | bin 2 collects the light from 2x2 photosites to form 1 pixel on the image. bin 3 uses 3x3 photosites, etc. Increasing the bin results in smaller images and reduces the need for long exposure. Look up your camera specifications to know what values are supported. This variable is usually only changed for testing. |
| daybin | 1 | bin 2 collects the light from 2x2 photosites to form 1 pixel on the image. bin 3 uses 3x3 photosites, etc. Increasing the bin results in smaller images and reduces the need for long exposure. Look up your camera specifications to know what values are supported. This variable is usually only changed during the day for testing. |
| nightautoexposure | 1 | Set to 0 to disable auto-exposure at **night**. Auto-exposure delivers properly exposed images throughout the night even if the overall brightness of the sky changes (cloud cover, moon, aurora, etc). When set to 1, *maxexposure* value will be used as the delay between timelapse frames. |
| nightmaxexposure | 20000 | This is the maximum exposure for **night** images when using auto-exposure.
| nightexposure | 10000 | **Night** time exposure in milliseconds. |
| nightautogain | 0 | Set to 1 to allow auto-gain at **night**. This mode will adjust the gain of night images when the overall brightness of the sky changes (cloud cover, moon, aurora, etc). **Avoid using autoexposure and autogain together** as it produces unpredicatble results (dark frames, but not always).|
| nightautogain | 0 | Set to 1 to allow auto-gain at **night**. This mode will adjust the gain of night images when the overall brightness of the sky changes (cloud cover, moon, aurora, etc). **Avoid using autoexposure and autogain together** as it can produce unpredicatble results (dark frames, but not always).|
| nightmaxgain | 200 | Maximum gain for **night** images when using auto-gain.|
| nightgain | 50 | Gain for **Night** images. Varies from 0 to 600. During the day, gain is always set to 0. |
| nightdelay | 10 | Time in milliseconds to wait between 2 frames at night. |
| nightbin | 1 | Similar to "daybin" but for night. |
| nightbrightness | 50 | Varies between 0 and 600. This setting changes the amount of light in **nighttime** images. |
| gamma | 50 | Varies between 0 and 100. This setting increases or decreases contrast between dark and bright areas. This is not supported by all cameras. |
| autowhitebalance | 0 | Sets auto white balance. When used, "wbr" and "wbb" are used as starting points. |
| wbr | 53 | Varies between 0 and 100. This is the intensity of the red component of the image. |
| wbb | 90 | Varies between 0 and 100. This is the intensity of the blue component of the image. |
| delay | 10 | Time in milliseconds to wait between 2 frames at night. |
| type | 1 | Image format. 0=RAW 8 bits, 1=RGB 24 bits, 2=RAW 16 bits |
| quality | 95 | Compression of the image. 0(low quality) to 100(high quality) for JPG images, 0 to 9 for PNG |
| autousb | 0 | Set to 1 to enable auto USB bandwidth. This option is primarily for testing. |
| usb | 40 | This is the USB bandwidth. Varies from 40 to 100. |
| type | 99 | Image format. 0=RAW 8 bits, 1=RGB 24 bits, 2=RAW 16 bits, 99=auto (if you have a color camera it will use RGB; mono cameras use RAW16 if the output file is a .png, otherwise they use RAW8). |
| quality | 95 | Compression of the image. 0 (low quality) to 100 (high quality) for JPG images, 0 to 9 for PNG |
| autousb | 0 | Set to 1 to enable auto USB bandwidth. If you get ASI TIMEOUT errors try changing this. |
| usb | 80 | This is the USB bandwidth. Varies from 40 to 100. If you get ASI TIMEOUT errors try changing this up and down. |
| filename | image.jpg | this is the name used across the app. Supported extensions are JPG and PNG. |
| flip | 0 | 0=Original, 1=Horizontal, 2=Vertical, 3=Both |
| text | text | Text overlay. **Note**: It is replaced by timestamp if time=1 |
| extratext | | (ZWO ONLY) The FULL path to a text file which will be displayed under the Exposure/Gain. The file can contain multiple lines which will be displayed underneath each other |
| flip | 0 | 0=No flip, 1=Horizontal, 2=Vertical, 3=Both |
| text | n/a | Text overlay that appears below the time, in the same font. |
| extratext | | (ZWO ONLY) The FULL path to a text file which will be displayed under other information. The file can contain multiple lines which will be displayed underneath each other. |
| extratextage | 600 | (ZWO ONLY) If using the extra text file then it must be updated within this number of seconds, if not it will not be displayed. Set to 0 to ignore this check and always didplay it |
| textlineheight | 30 | (ZWO ONLY) The line height of the text displayed in the image, if you chnage the font size then adjust this value if required |
| textx | 15 | Horizontal text placement from the left |
| texty | 35 | Vertical text placement from the top |
| fontname | 0 | Font type for the overlay. 0=Simplex, 1=Plain, 2=Duplex, 3=Complex, 4=Triplex, 5=Complex small, 6=Script simplex, 7=Script complex |
| fontcolor | 255 255 255 | Font color in BGR. NOTE: When using RAW 16 only the B and G values are used i.e. 255 128 0 |
| smallfontcolor | 0 0 255 | Small Font color in BGR. NOTE: When using RAW 16 only the B and G values are used i.e. 255 128 0 |
| fontcolor | 255 255 255 | Font color in BGR. NOTE: When using RAW 16 only the first two values are used i.e. 255 128 0 |
| smallfontcolor | 0 0 255 | Small Font color in BGR. NOTE: When using RAW 16 only the first two values are used i.e. 255 128 0 |
| fontsize | 7 | Font size |
| fonttype | 0 | Controls the smoothness of the fonts. 0=Antialiased, 1=8 Connected, 2=4 Connected. |
| fontline | 1 | font line thickness |
| outlinefont | 0 | Set to 1 to add an outline to the text overlay to improve contrast. |
| latitude | 60.7N | Latitude of the camera. N for North and S for South
| longitude | 135.05W | longitude of the camera. E for East and W for West |
| angle | -6 | Altitude of the sun above or below the horizon at which capture should start/stop. Can be negative (sun below horizon) or positive (sun above horizon). 0=Sunset, -6=Civil twilight, -12=Nautical twilight, -18=Astronomical twilight.
| time | 1 | Replaces the text overlay with the time the picture was taken. |
| timeformat | %Y%m%d %H:%M:%S | Determines the format of the displayed time. See strftime(3). Use _ (underscore) for spaces. |
| showTime | 1 | Display the time the picture was taken? |
| timeformat | %Y%m%d %H:%M:%S | Determines the format of the displayed time. Run "man 3 strftime" to see the options. |
| showTemp | 1 | Display the camera sensor temperature? |
| temptype | C | Determines what unit(s) the temperature will be displayed in: C=Celsius, F=Fahrenheit, B=Both. |
| showExposure | 1 | Display the exposure time in the overlay? If auto-exposure is enable, "(auto)" will appear after the exposure. |
| showGain | 1 | Display the gain in the overlay? If auto-gain is enable, "(auto)" will appear after the gain. |
| showBrightness | 1 | Display the brightness level in the overlay? |
| darkframe | 0 | Set to 1 to enable dark frame capture. In this mode, overlays are hidden. |
| showDetails | 1 | Displays the exposure, gain and temperature in the overlay (OBSOLETE) |
| notificationimages | 1 | Set to 0 to disable notification images, e.g., "Camera off during day" if daytime images are not being taken. |

The second file called **config.sh** lets you configure the overall behavior of the camera. Options include functionalities such as upload, timelapse, dark frame location, keogram.
Expand All @@ -129,7 +140,7 @@ nano config.sh
| TIMELAPSE | true | Build a timelapse at the end of the night |
| TIMELAPSEWIDTH | 0 | Overwrite the width of the generated timelapse, must be divisible by 2
| TIMELAPSEHEIGHT | 0 | Overwrite the height of the generated timelapse, must be divisible by 2
| TIMELAPSE_BITRATE | 2000k | Bitrate of the timelapse video. Higher numbers produce better quality but bigger files. Don't forget to include the trailing "k".
| TIMELAPSE_BITRATE | 2000k | Bitrate the timelapse video will be created with. Higher values produce better quality video but larger files. Make sure to include the trailing "k".
| FPS | 25 | The timelapse frame rate (frames per second)
| KEOGRAM | true | Builds a keogram at the end of the night |
| UPLOAD_KEOGRAM | false | Set to true to upload the keogram to your server |
Expand All @@ -156,14 +167,13 @@ nano config.sh
| RESIZE_UPLOADS_SIZE | 962x720 | Sets the width x height of resized images being uploaded |
| THUMBNAIL_SIZE_X | 100 | Sets the width of thumbnails |
| THUMBNAIL_SIZE_Y | 75 | Sets the height of thumbnails |
| REMOVE_BAD_IMAGES | false | Scan for, and remove corrupt or too bright/too dark images before generating keograms and startrails |
| REMOVE_BAD_IMAGES | false | Remove corrupt or too bright/too dark images and their thumbnails before generating keograms and startrails |
| REMOVE_BAD_IMAGES_THRESHOLD_LOW | 1 | Images whose mean brightness is below this percent will be removed |
| REMOVE_BAD_IMAGES_THRESHOLD_HIGH | 90 | Images whose mean brightness is above this percent will be removed (max: 100) |
| UHUBCTL_PATH | n/a | If you have the "uhubctl" command installed (it resets the USB bus), enter its path name |
| UHUBCTL_PORT | n/a | Enter the USB port the camera is on. Port 1 is USB 2.0 and port 2 is USB 3.0 |
| IMG_DIR | allsky | Location of the image the website will use. "allsky" is /var/www/html/allsky. Set to "current" to use /home/pi/allsky. |
| IMG_PREFIX | liveview- | An optional prefix on the website image file name, before "image.jpg" (or whatever your image is called) |
| TEMPERATURE | C | How to display the temperature in image overlays as well as on the "System" page of the web GUI. |
| CAMERA_SETTINGS_DIR | /etc/raspap | Path to the camera settings file |
| CAMERA_SETTINGS | /home/pi/allsky/settings.json | Name of the camera settings file. **Note**: If using the GUI, this path will change to /etc/raspap/settings.json |

Expand All @@ -180,7 +190,7 @@ nano scripts/ftp-settings.sh
| USER | username | Your ftp user name |
| PASSWORD | password | Your ftp password |
| HOST | example.com | Your host server or IP |
| IMGDIR | /allsky/ | The absolute path to your image-resize.jpg on the server |
| IMGDIR | /allsky/ | The absolute path to your image.jpg on the server |
| MP4DIR | /allsky/videos/ | The absolute path to your videos directory on the server |
| KEOGRAM_DIR | /allsky/keograms/ | The absolute path to your keograms directory on the server |
| STARTRAILS_DIR | allsky/startrails/ | The absolute path to your startrails directory on the server |
Expand Down Expand Up @@ -277,7 +287,7 @@ http://your_raspberry_IP/public.php

![](http://www.thomasjacquin.com/allsky-portal/screenshots/darkframe.jpg)

The dark frame subtraction feature was implemented to remove hot pixels from night sky images. The concept is the following: Take an image with a cover on your camera lens and subtract that image later to all images taken throughout the night.
The dark frame subtraction feature removes hot pixels from night sky images. The concept is the following: Take an image with a cover on your camera lens and subtract that image later to all images taken throughout the night.

You only need to follow these instructions once.

Expand Down

0 comments on commit 9ec0bfb

Please sign in to comment.