{"id":20526553,"url":"https://github.com/nikvoronin/co2.monitor","last_synced_at":"2026-05-05T20:37:06.770Z","repository":{"id":190812716,"uuid":"683388344","full_name":"nikvoronin/Co2.Monitor","owner":"nikvoronin","description":"CO2 Monitor Sample. ZyAura ZG-01 sensor based modules.","archived":false,"fork":false,"pushed_at":"2023-08-26T13:20:40.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T11:27:05.723Z","etag":null,"topics":["co2","co2-monitor","co2-sensor","csharp","dotnet","hidsharp","usb","usb-hid","windows","zyaura"],"latest_commit_sha":null,"homepage":"","language":"C#","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/nikvoronin.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}},"created_at":"2023-08-26T12:13:15.000Z","updated_at":"2023-08-29T13:32:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5e9c7b1-61f3-4dc3-a522-6fca55844039","html_url":"https://github.com/nikvoronin/Co2.Monitor","commit_stats":null,"previous_names":["nikvoronin/co2.monitor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FCo2.Monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FCo2.Monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FCo2.Monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikvoronin%2FCo2.Monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikvoronin","download_url":"https://codeload.github.com/nikvoronin/Co2.Monitor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242133430,"owners_count":20077095,"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":["co2","co2-monitor","co2-sensor","csharp","dotnet","hidsharp","usb","usb-hid","windows","zyaura"],"created_at":"2024-11-15T23:14:43.237Z","updated_at":"2026-05-05T20:37:06.724Z","avatar_url":"https://github.com/nikvoronin.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Co2.Monitor\n\n`ZyAura ZG-01` sensor based modules.\n\n![Generic Device Look](https://user-images.githubusercontent.com/22738239/73683926-7a247c80-46c3-11ea-99cb-a086262aa693.jpg)\n\n- Product: USB-zyTemp\n- Manufacturer: Holtek Semiconductor, Inc.\n- SerialNumber: 2.00\n- VID: 0x04D9\n- PID: 0xA052\n\n## Programming with HidSharp\n\n![Console Application Log](https://user-images.githubusercontent.com/11328666/263465860-6dd01731-dba8-4fe9-9ae6-c22ed64ec415.jpg)\n\nFind and try to get a device with pair of vid/pid:\n\n```csharp\nHidDevice? hid =\n    DeviceList.Local\n    .GetHidDevices( VID, PID )\n    .FirstOrDefault();\n```\n\nOpen hid stream, then set feature flags with zero filled array `magic_table`:\n\n```csharp\nusing var hidStream = hid.Open();\n\nbyte[] magic_table = new byte[9];\nhidStream.SetFeature( magic_table );\n```\n\nWe are ready to read (poll) data packets:\n\n```csharp\nvar raw = hidStream.Read()[1..];\n```\n\n## Related Projects\n\n- [CLI for MasterKit CO2 Monitor](https://github.com/dmage/co2mon)\n- [CO2 meter](https://github.com/vfilimonov/co2meter). A Python library for USB CO2 meter\n- [co2meter Exporter](https://github.com/rnurgaliyev/co2meter_exporter). Go-lang exporter to Prometheus.\n\n## Additional Reading List\n\n- [CO2 Meter Hacking](https://revspace.nl/CO2MeterHacking). Protocol reversing and description.\n- [Reverse-Engineering a low-cost USB CO₂ monitor](https://hackaday.io/project/5301-reverse-engineering-a-low-cost-usb-co-monitor). I'm trying to get data out of a relatively low-cost (80€) CO₂ monitor that appears to have a USB connection for data as well as for power. by Henryk Plötz\n- [USB Device Tree Viewer V3.8.8](https://www.uwe-sieber.de/usbtreeview_e.html)\n- `ru` [Forewarned is forearmed. Part 3](https://habr.com/ru/companies/masterkit/articles/248403/). by MasterKit (device rebrander)\n- [AN146-RAD-0401-serial-communication](http://co2meters.com/Documentation/AppNotes/AN146-RAD-0401-serial-communication.pdf). RS-232 serial protocol description\n- [Reading a zyTemp Carbon Dioxide Monitor using Tkinter on Linux](https://blog.tfiu.de/reading-a-zytemp-carbon-dioxide-monitor-using-tkinter-on-linux.html)\n\n## Protocol Analysis\n\n### Unique Packet Ids\n\n- Communication: 6D, 6E, 71, 50, 57, 56, 41, 43, 42, 4F, 52\n- Startup: 63, 64, 28, 29, 26, 25, 71, 45, 79, 75, 2E, 41, 47, 49, 72, 69, 4B, 51, 6F, 6C, 76, 77, 7A, 78, 53, 3D, 60, 54, 7B, 55, 4E, 3A, 58, 70, 73, 68, 2F, 4C, 3B, 5D, 5E, 66, 4D, 5B, 59, 65, 6E, 5C, 74\n\n### Startup Data Snapshot\n\n```plain\n281563A00D000000        5475\n291649880D000000        5705\n261CD7190D000000        7383\n252990DE0D000000        10640\n710000710D000000        0\n457FFFC30D000000        32767\n79FEE75E0D000000        65255\n751220A70D000000        4640\n2E04B0E20D000000        1200\n414380040D000000        17280\n470376C00D000000        886\n490A6ABD0D000000        2666\n724C26E40D000000        19494\n6919AA2C0D000000        6570\n4B4DF78F0D000000        19959\n510201540D000000        513\n6FC350820D000000        50000\n6C0835A90D000000        2101\n766014EA0D000000        24596\n77128E170D000000        4750\n7A0FD55E0D000000        4053\n780000780D000000        0\n532666DF0D000000        9830\n3D8000BD0D000000        32768\n603DF3900D000000        15859\n54224DC30D000000        8781\n7B0A3DC20D000000        2621\n5500BE130D000000        190\n4E0D87E20D000000        3463\n3A04013F0D000000        1025\n58635F1A0D000000        25439\n700BB8330D000000        3000\n730A05820D000000        2565\n6803208B0D000000        800\n2F1333750D000000        4915\n4C00004C0D000000        0\n3B0190CC0D000000        400\n5D00005D0D000000        0\n5EFFF3500D000000        65523\n660000660D000000        0\n4D0064B10D000000        100\n5B0190EC0D000000        400\n5901F24C0D000000        498\n650190F60D000000        400\n6E001E8C0D000000        30\n5C07D0330D000000        2000\n749EFF110D000000        40703\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Fco2.monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikvoronin%2Fco2.monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikvoronin%2Fco2.monitor/lists"}