{"id":27201639,"url":"https://github.com/markmac99/auroracam","last_synced_at":"2025-04-09T21:57:16.547Z","repository":{"id":258710607,"uuid":"869599121","full_name":"markmac99/auroracam","owner":"markmac99","description":"A simple aurora monitoring camera","archived":false,"fork":false,"pushed_at":"2025-03-19T21:00:21.000Z","size":707,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T21:57:10.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markmac99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-08T15:06:33.000Z","updated_at":"2025-03-19T21:00:25.000Z","dependencies_parsed_at":"2024-10-20T08:38:02.580Z","dependency_job_id":"c9b59fca-6a62-4b4b-9418-2829a7c79c44","html_url":"https://github.com/markmac99/auroracam","commit_stats":null,"previous_names":["markmac99/auroracam"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fauroracam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fauroracam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fauroracam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmac99%2Fauroracam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmac99","download_url":"https://codeload.github.com/markmac99/auroracam/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119359,"owners_count":21050754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-09T21:57:15.848Z","updated_at":"2025-04-09T21:57:16.532Z","avatar_url":"https://github.com/markmac99.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Simple Aurora Camera\r\n\r\nThe scripts in this folder implement a very simple aurora camera using a barebones IP camera.  As well as the Atom mini-pc mentioned below I have installed it on a Raspberry Pi4 running Bookworm 64-bit, but any small computer would do as long as its running a variant of Linux and has Python 3.7 or later. \r\n\r\n## How it works\r\nA python script captures an image from the camera every few seconds. At the end of the night, the saved images are made into an MP4 and hhe host is rebooted to ensure a clean start for the next day. The software also captures during the day, creating a separate set of data and timelapse. \r\n\r\n### Startup\r\nThe software runs as a service and starts automatically. To stop or start it, type the following in a Terminal window:  \r\n``` bash\r\nsystemctl --user stop auroracam\r\nsystemctl --user start auroracam\r\n``` \r\n\r\n### Configuration File\r\nThis holds the IP address, camera location and name, and the location of data and logs as well as the name of any S3 bucket if thats being used. You can also tweak the gain to set the camera to at night though the default should be good.  See the section on Installation for more information. \r\n\r\n### Camera Configuration\r\nThe camera is configured by the software (using the python-dvr library) and no manual tweaks should be needed. The exposure and gain are automatically changed at dawn and dusk. \r\n\r\nNote 2024-10-08 i realised i am not setting some parameters correctly (such as disabing the OSD and setting the video mode). Will update this shortly. \r\n\r\n## Hardware\r\nThe camera module I'm using is an IMX307 but an IMX291 should also work. When ordering the camera module, specify No Lens and With 48V PoE cable.  I'm using the 4mm F/0.95 lens we use for meteor hunting.  Here's links to the ones i bought, but be warned that links at AliExpress expire and / or get changed so you may need to hunt around:  [Camera](https://www.aliexpress.com/item/1005002676397053.html?spm=a2g0o.order_list.order_list_main.5.638a1802CB1j2M) and [lens](https://www.aliexpress.com/item/1005003145991079.html?spm=a2g0o.order_list.order_list_main.16.638a1802CB1j2M). \r\n\r\nYou'll also need a waterproof housing. Suitable CCTV housings can be got from Aliexpress too eg [this one](https://www.aliexpress.com/item/32355130687.html?spm=a2g0o.order_list.order_list_main.25.78581802njHV4Y). Make sure you choose the Plate and Bracket option.\r\n\r\nI'm running the software on an Intel ATOM Z8350 miniPC with 4GB memory running Armbian but I also have it running on a Raspberry Pi4b. \r\n\r\n## webserver\r\nA webserver is set up during installation and can be used to view the latest data, historical images and logs.  The webserver can be accessed at http://yourpisname/ where `yourpisname` is the hostname of the raspberry Pi. To make it easier to find, i recommend you give it a unique name such as \"auroracam\". Note that the site is http not https. \r\n\r\n### Installation\r\nOn the target computer, run the following  \r\n\r\n``` bash\r\nmkdir -p ~/source/auroracam\r\ncd ~/source/auroracam\r\nwget https://raw.githubusercontent.com/markmac99/auroracam/refs/heads/master/install.sh\r\nbash ./install.sh\r\n```\r\n\r\n### Now edit `config.ini` and fill in following\r\n  * IPADDRESS - the IP address of your camera\r\n  * LAT, LON, ALT - your latitude \u0026 longitude in degrees (+ for East) and elevation above sealevel in metres. \r\n  * other values can be left at their defauults. \r\n  \r\nNow reboot the pi. Shortly after reboot it should start capturing data - you will see the lights on the camera cable flickering every few seconds.  \r\n\r\n## Advanced Configuration \r\n### uploading to AWS S3 or an FTP server\r\nThe images and MP4 can also be uploaded to an AWS S3 bucket or sFTP server by specifying details in the config file. Images are uploaded every 30 seconds.  \r\n\r\n  * S3UPLOADLOC - if you want to upload to AWS S3 storage, provide a bucket name eg *s3://mybucket*. \r\n  * IDKEY - a CSV file containing the AWS key and secret.\r\n \r\n  * FTPSERVER, FTPUSER, FTPKEY - the server, userid and ssh keyfile to use\r\n  * FTPUPLOADLOC - the folder on the server to upload to\r\n  \r\n## Data Archival\r\nThe process generates a lot of data. Automatic housekeeping is performed and will compress, then delete\r\nolder data. You can specify how many days to keep via the ini file.\r\n\r\nIf you have access to an sftp server you can also configure the system to archive zip files of data for safe keeping. You will need to  update the ARCHIVE section of the config file with the server, user, user's ssh key location, and the target folder. \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmac99%2Fauroracam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmac99%2Fauroracam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmac99%2Fauroracam/lists"}