HomeAlexaAqara Roller Shade Driver E1 & Zigbee2MQTT

Aqara Roller Shade Driver E1 & Zigbee2MQTT

Aqara E1 - my way!

In my prep for conservatory automation, I had to check if Aqara Roller Shade Driver E1 (review) is compatible with Zigbee2MQTT. I plan custom automation for 3 overly expensive blinds (which we paid over £2k for) to open and close as needed. These were mandatory, as without the blinds, the temperature inside the conservatory would reach 60℃ by 10 am on a sunny day, killing whatever plans were stored inside.

Aqara Roller Shade E1 on the inside

Aqara E1
Aqara E1 roller driver

Since this is a less formal article, one that Aqara won’t kill me for taking devices apart, let’s start with checking Aqara Roller Shade Driver E1 on the inside. We will know what are we dealing with before we move into Zigbee2MQTT and NodeRED automation.

In my review, I mentioned that Aqara Roller Shade Driver E1 come with a built-in battery and USB-C charging port. Aqara mentions that we can actually run the units constantly plugged in (something I will probably end up doing as the position of these in the conservatory will be inaccessible for easy charging).

Aqara E1 taken apart
Aqara E1 taken apart

It’s easy to get inside thanks to 4 Torx screws. Inner poking reveals a smaller than expected battery (room for upgrades) 7.4V 1000mAh. I was expecting a 5V battery, but it looks like the voltage might be regulated better with the included battery.

After a small struggle, I yanked the main board which hosts a daughter PCB: LM19-ZGB-CN-B-T1 module with NXP JN5189 module at its heart. I’m surprised to see every imagined GPIO broken out on the PCB for easy access and testing. Something not commonly present on consumer-grade hardware. Anyone willing to take this to the next step, won’t have any issues connecting.

Lastly, a geared, encoded motor handles the chain movement and keeps the position in memory. Enough of poking around let’s play.

Aqara Roller Shade Driver E1 in Zigbee2MQTT

You will be forgiven for not knowing that the E1 driver is a westernised re-hash of Xiaomi Roller Shade Driver also made by Aqara. Unsupported natively in the west by the Xiaomi ecosystem, Aqara brought the design to the west in September.

It means that folks who already got their hands on the Chinese version of the device did the initial work on support for the Aqara E1 driver in Zigbee2MQTT and all I have to do is to verify that the same settings work for western SKUs.

In practice.

I had no issues pairing my zzh Electrolama coordinator to Aqara Roller Shade Driver E1. It binds to the Xiaomi E1 configuration from natively supported devices. However, not everything is supported. If you never paired a device before, I have a complete guide to that as well to walk you through and troubleshoot basic issues when pairing.

Electrolama ZZH coordinator
Electrolama ZZH coordinator

In the Aqara ecosystem, Aqara Roller Shade Driver E1 has the ability to report the state changes done from buttons or 3rd party triggers like Alexa or Google Assistant. Unfortunately, this is not the case in Zigbee2MQTT. While you can set the device to any position, you won’t be able to get a dynamic readout on status change. It’s disappointing, as UI would not reflect changes done by the 3rd party. Don’t worry, I will show you how to mitigate the changes done from smart assistants so the only thing you will have to worry about are changes done via built-in buttons.

Despite the support page saying that the link quality and battery information is submitted passively by the device, I was not able to obtain any information. It means that my global profile for tracking the battery statuses of all ZigBee devices on the network won’t be able to capture and store the battery levels and issue a warning.

Setting hardware limits

Before using commands, set the hard limits for the device so you won’t roll your blinds up forever. You need to pair the device to set these. Once paired, press both buttons until the LED blinks, then drive the roller into the upper position and confirm the upper hardware limit by pressing the up button 5 times. Set the shade to a lower position and press the down button 5 times to confirm the hardware limit. You should see LED blinking to confirm that.

Commands

The typical command structure works well, but there are some custom commands that you can submit to Aqara Roller Shade Driver E1. Use zigbee2mqtt/<devicename>/set topic to pass your commands over.

{"state": "on"} & {"state": "open"}    #open fully
{"state": "off"} & {"state": "close"}  #close fully
{"state": "stop"}                      #pause action
{"position": 50}                       #set curtain to 50%

If you want to reverse the way the position is reported you can open your configuration.yaml or device.yaml and add the custom option to your device entry:

'0x54ef4410001d828a':
  friendly_name: '0x54ef4410001d828a'
  invert_cover: true

#true assigns 0% to position open & 100% to position closed
#false assigns 100% to position open & 0% to position closed

While I wasn’t able to obtain the current position dynamically, you can request the position by sending a status update to zigbee2mqtt/<devicename>/get.

{"state": ""}                          #get position & linkquality

This data is also available when pause action is sent to the device. Pressing physical buttons and stopping the driver won’t issue the position change message.

NodeRED-ing

Aqara E1 Blind controller in Dashboard
Blind controller in Dashboard

It’s fine, we can work with that. It means that each time an action is executed, we have to query the device. I will do that and update the device information stored in the flow variable. That data can be used to drive the user interface.

To use the sample flow make sure you will rename all Name Device* flows as the names have to be individual for each controller. With each flow, I like to introduce new features that add interesting functions to the device to keep it fresh. I try to keep the number of 3rd party nodes to a minimum so your automation last even when the maintainer abandons the project.

This time around I have added two new features integrated directly into the code:

  • toggle to open/close blinds at sunrise/sunset
  • toggle to open/close blinds based on “too hot”/”too cold” conditions

In a similar vein, you can use my alarm sync project to open the blinds based on the alarms set on Android devices. The world is your oyster! Let’s play.

How does it work?

Optional features: Time and Temp modes

Sunset & sunrise hours are taken from my daylight tracking project. It uses a ticker and a global variable that tells my NodeRED if it’s bright or light outside. It’s a great project for all who don’t have a LUX meter to determine light levels. If you are looking for a really cool Zigbee Temperature, Humidity and Luminosity sensor – check this device out to expand your array of sensors.

Aqara can shut the blinds at sunset and open them at sunrise with a single click. The same applies to the temperature toggle. When enabled, Aqara E1 will close the curtain if it’s too hot/cold based on the selected icon setting and setpoint.

Both toggles are optional and can be removed from the dashboard when not needed. If you are looking at timer based operation, feel free to set routines up as smart assistant integration is also included.

Smart Assistants

Alexa & Google Assistant in NodeRED
Alexa & Google Assistant in NodeRED

NodeRed is good, but we need to add Alexa and Google Assistant. I’ve done that 100s times over so I will refer you to the individual articles for each assistant so you understand it deeper. I will cover changes made to keep the UI updated.

Alexa

To connect to Alexa services, I use the Alexa-Home-Skill. It’s not perfect as it lacks the blind setting, but it’s the most reliable Alexa virtual device controller. Set it up for ON/OFF and % use and use it as lights for voice commands. It means you have to tell Alexa to turn things ON/OFF rather than open-close, but you can bypass this by setting up appropriate routines that respond to open/close instead.

Information from the Alexa node is split into 2 payloads. One reacts to true/false, the other passes the numerical values over. Both payloads update the user interface and changes are visible after 5 sec in your Dashboard.

Google Assistant

To integrate Google Assistant I use Smart Nora. It’s an upgrade from Nora and the use is exactly the same as in my Nora tutorial so don’t be worried when you see a different name in the linked tutorial.

The node identifies as a blinds controller, however, it doesn’t have a control card in Google Home. You can use “Hey, Google Open X” and the payload in NodeRED is always submitted in %. This means that if you going to reverse the output in device configuration in Zigbee2MQTT you will have some translations to do.

Dashboard

Dashboard controller

I made a small card, that allows you to open/close/stop the operation and set the curtains to a specific value. If you can’t see the image for the blinds, inject the picture URL at the start and you will be ok. The flow works as is and other than the update to the device name, you don’t have to modify anything else.

I kept it in a separate group, to visualise the disconnect from the Smart Assistants updates. Each time there is an external update, it triggers local elements to update and re-issues state updates via MQTT.

Aqara ZigBee 3.0 line up so far:

Final thoughts

I hope the battery information will be exposed soon. Despite trying to modify the converter for Aqara Roller Driver E1, It made no difference and the battery info isn’t posting. The good news is that it works with the latest version of the Zigbee2MQTT and custom coordinator. If you have any questions about this flow, feel free to ask via this Reddit thread.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

0
To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

0
Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

0
Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

DIY Smart Washing Machine – for about 15 bucks!

0
Learn how to add washing machine notifications to your Google Home on the cheap

Sonoff Zigbee Bridge – review

0
Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

Smart Home

Remotes aren’t done with us yet: SwitchBot Remote

0
If you hate having 20 remotes hidden in your sofa, or your parents despise talking to Alexa to turn the lights on - SwitchBot Universal Remote is here to deal with all this!

We’ve seen this before: SwitchBot K10+ PRO

0
This is an odd one. Building on the success of SwitchBot K10+ they released SwitchBot K10+ PRO - but is the experience actually better?

Is this the smart panel we have waited for?

0
ITEAD has released a new smart panel: Sonoff NSPanel Pro 120 - have they learned the lesson from the terrible launch of the original Pro? Let's see what's new.

Aqara FP1E detects motionless humans

0
This isn't exactly a new device, it's an interaction of the original Aqara presence sensor. Aqara FP1E brings Matter, ZigBee and new triggers to your smart home

SwitchBot S10: cleaning re-imagined!

0
SwitchBot S10 promises unattended vacuuming and mopping so you can focus on things you love and care for. Does it deliver?