Close

Zigbee, my future nemesis?

A project log for Let me control you: Hitachi air conditioner

An attempt to wirelessly control an old Hitachi air conditioner

florianFlorian 07/19/2020 at 06:090 Comments

Now that I have demystified the communication protocol of this Hitachi air conditioner, it's time to work on what is gonna be the most difficult and time consuming part of this project for me: building a Zigbee interface to enable remote control from Home Assistant.

For the past month I've been gathering information, learning basics about Zigbee, looking for hardware solutions and trying to have a Zigbee module working. Here is a kind of summary of what I've got so far.

1) I learnt there is 3 different types of devices in a Zigbee network: router, coordinator and end device. Because I want to go for a simple solution I will make an "end device".

2) Searching for DIY Zigbee on Google got me to look at XBee module and CC2530 based module.

3) Because I judged XBee modules to be quite big, I digged in this SoC made my Texas Instrument and found that CC2530 based modules can either be directly programmed (Intel 8051) and used stand-alone or flashed with a specific firmware to be used as a so-called "ZigBee Network Processor (ZNP)" with an external MCU (like controlling an ESP8266 with an Arduino via AT commands). My 8051 programming skills being really rusty and not being interested in learning the SDK and the tooling from TI, I decided to go for the ZNP solution.

4) I searched for a CC2530 based module on AliExpress and found a cheap and tiny transmitter/receiver module. Link to the actual product: https://www.aliexpress.com/item/32803052003.html?spm=a2g0s.9042311.0.0.40bc4c4dzhaeel

5) I received the modules in about 2 weeks. I made a simple breakout board for one and tried to flash Z-Stack 3.0.2 following this excellent tutorial. Because I don't have a CC debugger, I used an alternative flashing method using an Wemos D1 and CClib (source: Zigbee CCLib Flashing). After a bit more than 2 hours, the flashing was successful but the module UART didn't seem to work. I checked that P2_0 (CFG1) was tied to GND and I carefully followed the CC2530-ZNP power-up procedure described in Z-Stack ZNP Interface Specification but I never got the SYS_RESET_IND from the module.

6) I tried to reflash the module using another programming method which used CCLoader (tutorial: flashing CCLoader) but despite a successful flashing it didn't work either.

7) After trying to flash multiple firmwares (router, coordinator, stock) I found on forums and GitHub using both programming methods I also tried to flash the other module I bought but never managed to have the UART working.

8) I bought a CC debugger from China hoping it's just a problem with the flashing method... Until I receive it, I will search for more information about end device firmware, Zigbee communication work-flow and Home Assistant integration.

Discussions