Now that I've demystified the communication protocol of the Hitachi air conditioner, it's time to tackle 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 the basics of Zigbee, searching for hardware solutions and trying to get a Zigbee module working. Here is a summary of my progress:
1) I learned there is three 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 solutions led me to XBee modules and CC2530 based modules.
3) After considering the XBee modules, I found them to be too large for my needs. I then researched the CC2530, a System-on-Chip (SoC) made by Texas Instruments. It can be programmed directly (Intel 8051) and used stand-alone or flashed with specific firmware to function as a ZigBee Network Processor (ZNP) with an external MCU (like controlling an ESP8266 with an Arduino via AT commands). Since my 8051 programming skills were rusty and I wasn't interested in learning the SDK, I decided to go with the ZNP solution.
4) I searched for a CC2530-based modules on AliExpress and found a cheap and small transmitter/receiver module. Here is a 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. Since I didn't have a CC debugger, I used an alternative flashing method with a Wemos D1 and CClib (source: Zigbee CCLib Flashing). 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 reflashing the module using another programming method with CCLoader (tutorial: flashing CCLoader), but despite a successful flashing it still didn't work.
7) I tried flashing various firmwares (router, coordinator, stock) that I found on forums and GitHub using both flashing methods. I also tried flashing the second module I received, but none of the attempts got the UART working.
8) I've now ordered a CC debugger from China in the hope that the problem lies with the flashing method... Until I receive it, I plan to continue researching information about end device firmware, the Zigbee communication work-flow and Home Assistant integration.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.