Also, I cannot seem to find any useful coding examples of how to built own ZigBee devices. So is there actually some sort of library which already implements the ZigBee protocol which can be used?
Ah okay then I was confusing it with Z-Wave I guess.
Okay while Serial.print() is “easy”, you would be bound to implement the protocol for your home automation device using single commands. I was hoping that I was not the first one to do that, and that there might be a library already which covers the most commonly used functionality already.
Duh… I forgot to link that. There is a library, but it’s old.
To be fair, I abandoned doing my own Zigbee devices because there is a LOT of effort involved in building out the code for specific types of devices (motion, temp, etc). I went the Arduino/WiFi route for my DIY devices as there’s much more robust documentation and support, Plus, they are less prone to interference issues compared to Zigbee devices. Don’t get me wrong, I love my Zigbee devices and my mesh is solidly built, but sometimes wifi > zigbee.
Okay I see. Well, wifi might be easier, especially when you can easily have some MQTT interface working, but still I wanted to see if zigbee was an option.
For one, every connected device in a wireless network leads to less bandwith on the network. Then, if wireless lan is used, the device is already within my LAN, which it is not if another network type is used (security considerations). Next whatever you build using wifi will most likely need more work on the server side (home assistant), while a compliant zigbee device should just work (at least in theory, or better, in my head).
But while I am a developer and have fun when building stuff, I probably won’t go that route if it won’t be worth the increased efforts, or there is no good support for developers regarding zigbee.
It’s for this very reason I went with Unifi equipment for my network. I have had over 100 clients on my network without so much as a blip in performance. The starting costs are greater, yes, but the returns are well worth it.
1 word: VLANs. If you don’t have a router (or managed switch) that supports VLANs, get one. NONE of my IoT stuff ever touches my main VLAN. None. Ever.
Ish? Zigbee devices still need to match known profiles (quirks) in HA (or any home automation system for that matter) in order to work. To be fair, the communication medium is less important than the device itself being known to the platform. Sure, I could whip up a custom motion sensor and throw a XBee shield on it. But, telling HA that my little, custom doohickey is a motion sensor is a more difficult than it looks. I could piggy back on other motion sensors and copy their fingerprints, but that doesn’t guarantee it’ll work.
There’s still a lot of “gotchas” in building custom Zigbee devices. But, that doesn’t mean it’s not fun to try!