{"id":26301758,"url":"https://github.com/michealroberts/zwoasi","last_synced_at":"2025-06-12T15:04:05.843Z","repository":{"id":279583122,"uuid":"938153333","full_name":"michealroberts/zwoasi","owner":"michealroberts","description":"Modern, type-safe, zero-dependency python library for controlling ZWO ASI astronomical cameras","archived":false,"fork":false,"pushed_at":"2025-03-21T16:03:28.000Z","size":19155,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T11:05:20.031Z","etag":null,"topics":["asi","astrophotography","camera","photography","zwo","zwoasi"],"latest_commit_sha":null,"homepage":"https://www.zwoastro.com/software","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/michealroberts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-24T14:02:49.000Z","updated_at":"2025-03-21T16:01:46.000Z","dependencies_parsed_at":"2025-03-13T16:24:42.411Z","dependency_job_id":"30f4c537-7377-4e93-8b7f-2dee78a61b0f","html_url":"https://github.com/michealroberts/zwoasi","commit_stats":null,"previous_names":["michealroberts/zwoasi"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michealroberts%2Fzwoasi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michealroberts%2Fzwoasi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michealroberts%2Fzwoasi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michealroberts%2Fzwoasi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michealroberts","download_url":"https://codeload.github.com/michealroberts/zwoasi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253774584,"owners_count":21962199,"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":["asi","astrophotography","camera","photography","zwo","zwoasi"],"created_at":"2025-03-15T07:16:39.392Z","updated_at":"2025-05-12T16:16:17.239Z","avatar_url":"https://github.com/michealroberts.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pypi](https://img.shields.io/pypi/v/zwo.svg)\n![versions](https://img.shields.io/pypi/pyversions/zwo.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![zwoasi/test](https://github.com/michealroberts/zwoasi/actions/workflows/test.yml/badge.svg)](https://github.com/michealroberts/zwoasi/actions/workflows/test.yml)\n\n# zwoasi\n\nModern, type-safe, zero-dependency Python library for controlling ZWO ASI astronomical cameras.\n\n## Installation\n\n```bash\npip install zwo\n```\n\nor\n\nusing your preferred environment / package manager of choice, e.g., `poetry`, `conda` or `uv`:\n\n```bash\npoetry add zwo\n```\n\n```bash\nconda install zwo\n```\n\n```bash\nuv add zwo\n```\n\n## Linux Setup\n\nTo check if you any ZWO ASI cameras connected, run the following command:\n\n```bash\nlsusb | grep 03c3\n```\n\nN.B. The `03c3` is the vendor ID for ZWO.\n\nYou should see something like this as your output:\n\n```bash\nBus 001 Device 016: ID 03c3:620b ZWO ASI6200MM Pro\n```\n\nTo allow non-root users to access the ASI camera, you need to create a udev rule. Firstly, create the .rules file:\n\n```bash\ncat \u003c\u003cEOF \u003e asi.rules\nACTION==\"add\", ATTR{idVendor}==\"03c3\", RUN+=\"/bin/sh -c '/bin/echo 200 \u003e/sys/module/usbcore/parameters/usbfs_memory_mb'\"\nSUBSYSTEMS==\"usb\", ATTR{idVendor}==\"03c3\", MODE=\"0666\"\nEOF\n```\n\nThe following command will copy the rule to the correct location:\n\n```bash\nsudo install asi.rules /lib/udev/rules.d\n```\n\n```bash\nsudo udevadm control --reload-rules \u0026\u0026 sudo udevadm trigger\n```\n\nOnce you have done this, check that the camera is accessible by running the following command:\n\n```bash\nls -l /dev/bus/usb/$(lsusb | grep 03c3:620b | awk '{print $2}')/$(lsusb | grep 03c3:620b | awk '{print $4}' | tr -d :)\n```\n\nYou should see something like this:\n\n```bash\ncrw-rw-rw- 1 root root 189, 0 Jan  1 00:00 /dev/bus/usb/001/001\n```\n\ni.e., the camera is accessible by all users with permissions `crw-rw-rw-` with a mode of `MODE=0666`.\n\nThen when you have verified these steps, run the following command:\n\n```bash\ncat /sys/module/usbcore/parameters/usbfs_memory_mb\n```\n\nIf the output is anything other than `200`, something has gone wrong. To fix, simply follow the steps above again.\n\nOnce you have verified that the camera is accessible, if you reconnect the camera by unplugging it from the UBS port and plugging it back in, you can now use the `zwo` library to control the camera.\n\n## MacOS Setup\n\nThere is no additional setup required for MacOS.\n\n## Windows Setup\n\nThere is no additional setup required for Windows.\n\n## Usage\n\n```python\nfrom zwo import ZWOASICamera, ZWOASICameraParams\n\n# Let's assume the camera ID is 0 (e.g., only 1 camera is connected):\nid = 0\n\n# Create a new camera parameters instance (for demonstration purposes we are\n# connecting to a ASI62000M Pro model) which has a pid of \"620b\":\n# N.B. Replace the pid with the correct one for your camera model.\npid: str = \"620b\"\n\nparams: ZWOASICameraParams = ZWOASICameraParams(pid=pid)\n\n# Create a new camera instance:\nzwo = ZWOASICamera(id, params)\n\n# Check if the camera is ready:\nis_ready = zwo.is_ready()\n\nif not is_ready:\n    print(\"Camera is not ready!\")\n    exit(1)\n```\n\nAs the zwo instance is fully typed, you can use your IDE's autocompletion to see all the available methods and properties.\n\nWe have also provided further usage examples in the [examples](./examples) directory.\n\n## Milestones\n\n- [X] Type-safe modern 3.6+ Python\n- [X] Portable .h, .so and .dylib files for Linux and MacOS\n- [ ] Portable .dll files for Windows\n- [X] Fully unit tested\n- [X] Simpler API (modelled around the ASCOM Alpaca API)\n- [X] Integration testing with HIL testing (hardware-in-the-loop)\n- [X] Zero-external dependencies (no numpy, astropy etc for portability)\n- [X] Example API usage\n- [X] Fully supported ZWO ASI Camera operations\n- [ ] Fully supported ZWO Electronic Automatic Focuser operations\n- [ ] Fully supported ZWO Filter Wheel operations\n- [X] Fully seasoned recipes for usage with numpy, astropy et al.\n- [ ] ASCOM Alpaca APIs w/Fast API\n\n---\n\n### Miscellaneous\n\nFor more information on the ZWO ASI SDK, please visit the [ZWO ASI SDK](https://www.zwoastro.com/software/) website.\n\n### Disclaimer\n\nThis project is not affiliated with ZWO ASI in any way. It is a community-driven project. All trademarks and logos are the property of their respective owners. The ZWO ASI SDK is the property of ZWO ASI.\n\n### License\n\nThis project is licensed under the terms of the MIT license.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichealroberts%2Fzwoasi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichealroberts%2Fzwoasi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichealroberts%2Fzwoasi/lists"}