{"id":13802108,"url":"https://github.com/osresearch/ZbPy","last_synced_at":"2025-05-13T12:32:23.584Z","repository":{"id":151576672,"uuid":"230239541","full_name":"osresearch/ZbPy","owner":"osresearch","description":"MicroPython IEEE802.15.4 / Zigbee parser","archived":false,"fork":false,"pushed_at":"2020-09-12T10:08:50.000Z","size":264,"stargazers_count":48,"open_issues_count":2,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-16T00:42:18.742Z","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/osresearch.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}},"created_at":"2019-12-26T09:57:04.000Z","updated_at":"2025-02-27T02:54:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"bdd647b0-b83e-462b-9664-d38a98de7c66","html_url":"https://github.com/osresearch/ZbPy","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/osresearch%2FZbPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2FZbPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2FZbPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osresearch%2FZbPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osresearch","download_url":"https://codeload.github.com/osresearch/ZbPy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253942616,"owners_count":21988098,"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":"2024-08-04T00:01:36.154Z","updated_at":"2025-05-13T12:32:23.258Z","avatar_url":"https://github.com/osresearch.png","language":"Python","readme":"# Gecko Zigbee Python interface\n\nThis is a pure Python implementation of a IEEE802.15.4 and ZigBee network stack\nthat works with MicroPython.\n\nIt was developed for the Silicon Labs Gecko boards used in\nIkea Tradfri devices.  The firmware port of MicroPython lives in\n[osresearch/micropython/ports/efm32](https://github.com/osresearch/micropython/tree/efm32/ports/efm32).\nThe underlying ZigBee radio interface also lives in the machine specific\nport for that board; this is the hardware agnostic software stack that\nprocesses the packets.\n\nFor more information on the project, see [Ikea+Micropython lightning talk](https://trmm.net/Ikea).\n\n# Installing\n\n![Ikea Tradfri remote with header attached](images/ikea-remote.jpg)\n\nSee the\n[README](https://github.com/osresearch/micropython/blob/efm32/ports/efm32/README.md)\nin the MicroPython port for details on building and installing using OpenOCD + SWD.\n\nUsing [`ampy.py`](https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy) you can\ninstall all of the code from the `ZbPy` directory into the flash on the device.\n\n# ZigBee network layers\n\n* Phyiscal layer (handled by the radio, supported via `import Radio`)\n* IEEE802.15.4: `import ZbPy.IEEE802154`\n* NWK - Network Layer: `import ZbPy.ZigbeeNetwork`\n* Security Layer (not really a layer, an optional part of the NWK header)\n* APS - Application Support Layer: `import ZbPy.ZigbeeApplication`\n* ZCL - ZigBee Cluster Library: `import ZbPy.ZigbeeCluster`\n\n\nMost of the layers are sufficiently implemented to join an\nexisting Zigbee network, receive a 16-bit short network address,\ndecrypt+validate and encrypt+mac messages encrypted with the\n[AES-CCM mode](https://en.wikipedia.org/wiki/CCM_mode).\n\nThe Application and Cluster layers are only partially\nimplemented right now; the messages are decoded but not\nmapped to functionality.\nPerhaps parts of [ZigPy](https://github.com/zigpy/zigpy) can be \nported to MicroPython to provide these mappings.\n\n\n# Debugging Zigbee\n\nIt is easiest to use `zbsniff` in this tree, talking to an\nIkea device on `/dev/ttyACM0`, which will output a PCAP file\non stdout.  You can pipe this to `wireshark` to trace what\nis going on:\n\n```\nzbsniff | wireshark -k -i -\n```\n\nHowever, there is lots of \"noise\" in the Zigbee protocol\nwith repeat messages, acks, etc that make the wireshark\ndisplay messy.\n\nDon't display acks: `!(wpan.frame_type == 0x2)`\nDon't display repeats: `(!(wpan.frame_type == 0x1) || wpan.src16 == zbee_nwk.src)`\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosresearch%2FZbPy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosresearch%2FZbPy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosresearch%2FZbPy/lists"}