Hi Alexander,
A long time ago I was a M.Eng student with a thesis project so understand the pain of moving from whiteboard to breadboard. My ability to help is sadly limited by never having developed using the ZigBee stack, but here goes…
The key question is what do you want ZigBee do to for you?
There’s a world of difference between using ZigBee as a network layer to send hand-crafted serial via an AT-command controlled Digi radio module, to having something that appears as a consumer-level device and can be adopted into HASS as a ZED with auto-discovery.
I suspect the confusion is the difference between a ZigBee coordinator (ZC) and a ZigBee end device (ZED). Most users of HASS are interested in creating a low-cost USB device to control commercial ZigBee modules (ZC) - not developing the modules themselves (ZED). The link above is closer as it creates a router for better mesh radio coverage, but still not a sensor or actuator exposing controls via an API.
Many HASS hobbyist projects use something like an ESP8266/ ESP32 uP flashed with Tasmota / ESPhome firmware to create custom devices connecting over WiFi and MQTT with several application layer enhancements to add auto-discovery and configuration in HASS. The process is low-code or no-code via configuration of pre-built libraries, rather than direct compilation of an Arduino sketch. Naturally, an Espressif micro with WiFi uses a lot more power than ZigBee but the ease of development wins out.
Notice how one device requires a mix of different standards to work - understanding the separation of physical layer, up to application layer in an OSI 7-layer model is often hard work with lots of lovely grey areas! ![:exploding_head: :exploding_head:](https://community.home-assistant.io/images/emoji/twitter/exploding_head.png?v=10)
I’d start with a more hardware oriented forums. Creating a custom ZigBee end-device has a few hits on HackADay. Tasmota also seems to support Zigbee but again more as a ZC than a ZED. This suggests there are open-source ZigBee Arduino libraries out there to be found as that’s what Tasmota is based on. AdaFruit seems to suggest ZigBee profiles make devices easy, but doesn’t include links to back the statement up!
ZigBee used to be managed by the ZigBee Alliance but ISTR they re-branded as the Connectivity Standards Alliance. I don’t know how much is FOSS, and how much has a developer NDA. Sadly, the difference between a bare board module from AliExpress and an expensive developer kit is often what you’re asking for - documentation and example code.
In commercial environments, the cost of the dev kit is tiny compared to the cost of the software engineer’s time. In academic environments though you can often get evaluation stuff for free - ask the vendors for help. This works for a one-off thesis, but not if your course of 30x tries the same thing!
Confusingly, interest in the IEEE 802.15.4 transport is increasing as the Matter/ Thread standards get ready for release. Thread is very similar to ZigBee, with a similar network but different application layers, with Matter bridging different networks. As you’re using ZigBee, ignore Google I/O and the developer docs for Matter.
To interface custom sensors and actuators into HASS, my own projects have used:
- ESP8266 running Tasmota, connected via WiFi, using MQTT with auto-discovery.
- Raspberry Pi Zero, connected via WiFi, running Raspbian and custom Python using MQTT with auto-discovery.
- ESP8266 running ESPhome, connected via WiFi, using HASS APIs directly.
After years of bit-bashing in machine code and C, Python or no-code configuration toolkits are so much easier. If you are starting from scratch, 80% of your project time will be getting a toolchain setup for the ATmega with the libraries needed to flash a LED (the uP equivalent of "Hello World\n"
)! ![:slight_smile: :slight_smile:](https://community.home-assistant.io/images/emoji/twitter/slight_smile.png?v=10)
All the best,
James