{"id":15020689,"url":"https://github.com/ryszard/sds011","last_synced_at":"2025-10-26T04:30:56.485Z","repository":{"id":57506627,"uuid":"83034273","full_name":"ryszard/sds011","owner":"ryszard","description":"Nova SDS011 PM sensor serial reader written in Go.","archived":false,"fork":false,"pushed_at":"2018-11-18T13:02:01.000Z","size":88,"stargazers_count":16,"open_issues_count":2,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-09-28T10:22:52.200Z","etag":null,"topics":["air-quality","go","raspberry-pi","sensor"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryszard.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}},"created_at":"2017-02-24T11:21:09.000Z","updated_at":"2024-05-14T05:48:49.000Z","dependencies_parsed_at":"2022-08-29T20:01:20.637Z","dependency_job_id":null,"html_url":"https://github.com/ryszard/sds011","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryszard%2Fsds011","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryszard%2Fsds011/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryszard%2Fsds011/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryszard%2Fsds011/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryszard","download_url":"https://codeload.github.com/ryszard/sds011/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219864035,"owners_count":16555943,"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":["air-quality","go","raspberry-pi","sensor"],"created_at":"2024-09-24T19:55:26.497Z","updated_at":"2025-10-26T04:30:56.015Z","avatar_url":"https://github.com/ryszard.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Nova SDS011 PM sensor serial reader written in Go.\n\n# Quickstart\n\nI am assuming that your SDS011 is connected to a Raspberry Pi, like\nmine. In my experience it's easier to cross compile the reader on your\nlaptop and then scp it to the Pi. The fact that Go compiles everything\nstatically means you don't have to worry about dependencies, which is\nnice.\n\n```\n$ GOOS=linux GOARCH=arm go build  ./go/cmd/sds011 \u0026\u0026 rsync --progress -v -e ssh sds011 pi@pi:\n```\n\nDepending on the version of your Pi, you may need to add `GOARM=6`.\n\nThe output will look something like this:\n\n```\npi@raspberrypi ~ $ ./sds011\n2017-02-24T11:38:44Z,3.2,3.5\n2017-02-24T11:38:46Z,3.2,3.5\n2017-02-24T11:38:49Z,3.1,3.4\n2017-02-24T11:38:50Z,3.1,3.4\n2017-02-24T11:38:53Z,3.2,3.5\n2017-02-24T11:38:54Z,3.2,3.6\n2017-02-24T11:38:56Z,3.2,3.6\n```\n\nThis is CSV containing first the timestamp (in RFC3339 format), then\nthe PM2.5 levels, then the PM10 levels.\n\n# Usage\n\nAs the output of `sds011` is CSV, it should be easy to process. There\nare a few things you can do. First, you can save to a file and either\nprocess it right there, or export it for processing. Second, you can\npipe it into a script that will export it. This is what I am doing, as\ndisk space is scarce on my Pi (one USB port is used by the meter, the\nother by the WiFi dongle, so I there's no other storage connected).\n\n\nIf you are using the SDS011 for air quality measurements at home, you\nprobably don't need the from every second. So, in order to increase\nits lifespan, you can set it to work in a cycle: sleep for some number\nof minutes, wake up for 30s, go back to sleep. To do that, you can use\n`sds011cmd`:\n\n```\n$ GOOS=linux GOARCH=arm go build  ./go/cmd/sds011cmd \u0026\u0026 rsync --progress -v -e ssh sds011 pi@pi:\n$ ssh pi@pi './sds011 set_cycle 30' # set it to 30 minutes, the maximum\n$  ssh pi@pi './sds011cmd  cycle'\n30\n```\n\nThe you can read it with `sds011`. Note that you probably should not\nbe trying to read and sends commands to the sensor at the same time.\n\n# Advanced\n\nIf you need something more complex, you should be able to write a Go\nprogram. Take a look at\nhttps://godoc.org/github.com/ryszard/sds011/go/sds011 for an idea of what you can do.\n\n# License\n\n[Apache 2.0](https://www.tldrlegal.com/l/apache2), please see the file\nLICENSE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryszard%2Fsds011","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryszard%2Fsds011","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryszard%2Fsds011/lists"}