Building own zigbee device using arduino + zigbee shield

Tags: #<Tag:0x00007f73960bf200>

I am curious if it would be easily possible to create a custom device using some arduino + zigbee shield?

When googling for this, I came across:
a) https://store.arduino.cc/arduino-wireless-sd-shield
b) https://www.digi.com/products/embedded-systems/digi-xbee/rf-modules
c) https://www.digi.com/products/embedded-systems/digi-xbee/rf-modules/2-4-ghz-modules/xbee-zigbee
d) https://eckstein-shop.de/Module_3

So if I get it right, I might need:

  1. arduino board itself
  2. the wireless shield from a)
  3. one module for the shield which supports zigbee ( c) or d))

Is that right? Now if I go to https://eckstein-shop.de/Waveshare-ZigBee-Module-Core2530-B-XBee-compatible-CC2530F256-24GHz I am a bit confused because it says “ZigBee” but at the same time “2.4GHz” (which is the WLAN frequency, and ZigBee should be 8xx??)

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?

the frequency of Zigbee is nearly the same as WLAN … something around 2,4 Ghz.

Zigbee and WiFi 2.4ghz share the same spectrum and channels. There is no 8xx spectrum for Zigbee.

Writing code for a Zigbee shield on an Arduino is actually pretty simple. All commands come in and go out using the Serial.print() command.

This is the resource I used when I was toying around with my XBee boards: https://www.cooking-hacks.com/documentation/tutorials/xbee-arduino-raspberry-pi-tutorial

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.

2 Likes

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. :smiley:

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!

Okay so sounds pretty much like its not really worth the effort :slight_smile:

Searching for also Z-Wave, I found https://z-uno.z-wave.me/

Seems like this could be a rather simple but viable alternative :slight_smile: However the Z-Uno seems to be rather expensive …

I’ve made an arduino zigbee shield solves this problem…