Aqara E1 Switch Firmware

Design and implementation of relacement firmware for Aqara E1 Zigbee light switches

Aqara produce affordable, well built, Zigbee โ€œcompatibleโ€ light switches. Despite backing by Xiaomi - a Zigbee Alliance participant - many of their devices are not Zigbee certified, don’t conform to the standard, and lack functionality one might expect in a Zigbee light switch.

This project produced alternative firmware for these switches to overcome these limitations and add broad new functionality.

Aside from the GPIO configuration, the firmware isn’t Aqara E1 specific and is suitabe for any JN5189 based device.

Repo

Coming soon

Aqara E1: Replacing the firmware in the Aqara E1 light switch

This is the first part of a five-part post detailing the design and implementation of new firmware for the Aqara E1 Zigbee light switches:Replacing the firmware in the Aqara E1 light switch Reverse engineering the PCBPlanned new firmware featuresWriting new firmwareZigbee2MQTT, the NXP Zigbee stack, and OTA updates start-summary-here Aqara are one of the few manufacturers producing affordable, well built, Zigbee “compatible” light switches that are both available in my part of the world, and suitable for local electrical installations. Aqara are a brand of Xiaomi-backed Lumi United Tech.

Aqara E1: Reverse engineering the PCB

This is the second part of a five-part post detailing the design and implementation of new firmware for the Aqara E1 Zigbee light switches:Replacing the firmware in the Aqara E1 light switchReverse engineering the PCB Planned new firmware featuresWriting new firmwareZigbee2MQTT, the NXP Zigbee stack, and OTA updates start-summary-here Any new firmware needs to know the GPIOs After confirming that the chip had write access in ISP mode, the next step was to determine the appropriate inputs and outputs.

Aqara E1: Planned new firmware features

This is the third part of a five-part post detailing the design and implementation of new firmware for the Aqara E1 Zigbee light switches:Replacing the firmware in the Aqara E1 light switchReverse engineering the PCBPlanned new firmware features Writing new firmwareZigbee2MQTT, the NXP Zigbee stack, and OTA updates start-summary-here Before progressing too far into the design/coding process, it’s useful to put down on “paper” a list of required and desired functionality, as well as a very preliminary idea of how the various pieces might be implemented.

Aqara E1: Writing new firmware

This is the fourth part of a five-part post detailing the design and implementation of new firmware for the Aqara E1 Zigbee light switches:Replacing the firmware in the Aqara E1 light switchReverse engineering the PCBPlanned new firmware featuresWriting new firmware Zigbee2MQTT, the NXP Zigbee stack, and OTA updates start-summary-here Sanity check - Blinky For an initial sanity check, I modified the NXP SDK’s blinky example for the 4 LEDs of the Aqara QBKG41LM (DIO lines identified here) to make sure that it would accept and run new firmware.

Aqara E1: Zigbee2MQTT, the NXP Zigbee stack, and OTA updates

This is the final part of a five-part post detailing the design and implementation of new firmware for the Aqara E1 Zigbee light switches: Replacing the firmware in the Aqara E1 light switchReverse engineering the PCBPlanned new firmware featuresWriting new firmwareZigbee2MQTT, the NXP Zigbee stack, and OTA updates start-summary-here Part of my project to write new firmware for the Aqara E1 Zigbee light switches involved implementing the Zigbee Cluster Library OTA Update function. It didn’t go particularly smoothly, with two main obstacles. Firstly: