Aqara Roller Shade Driver E1

Hey,
I’ve updated my zigbee dongle to the latest version 20230507
And that hasn’t resolved my issue

The device reports a change in position 100 to 0 without out the motor ever running

info  2023-12-09 11:42:19: MQTT publish: topic 'zigbee2mqtt/Living Room Blinds', payload '{"battery":81,"charging_status":false,"linkquality":105,"motor_state":"pause","position":100,"power_outage_count":18,"running":false,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
info  2023-12-09 11:42:21: MQTT publish: topic 'zigbee2mqtt/Living Room Blinds', payload '{"battery":81,"charging_status":false,"linkquality":109,"motor_state":"pause","position":0,"power_outage_count":18,"running":false,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'
info  2023-12-09 11:42:27: MQTT publish: topic 'zigbee2mqtt/Living Room Blinds', payload '{"battery":81,"charging_status":false,"linkquality":109,"motor_state":"pause","position":0,"power_outage_count":19,"running":false,"state":"OFF","update":{"installed_version":-1,"latest_version":-1,"state":null},"update_available":null}'

could you help explain the other things you have done to stop this from happening.

it’s really causing me a headache

1 Like

I’ve managed to solve all the problems.
Just updated conbee II to the latest version, restarted HA, re-paired and it worked!

So before you start looking around for a solution make sure you have updated conbee II stick.
Then, make sure you are running the latest HA version (I don’t know on which version, but the quirk was included very recently). So if you are running a pretty old version of HA it won’t work for sure (unless if you start playing with custom quirks etc etc etc)

Hey, sorry for delay with response.
As I see, you use zigbee2mqtt, but I use ZHA, most probably it affects the final result.

In my case, the issue with resetting roller position to 0 was related to WindowCoveringRollerE1 cluster, which didn’t update the value of current_position_lift_percentage and it was always 0.

By some reason, ZHA polled data from this cluster and reset device state to zero, accordingly.

I would suggest trying the following things:

  1. Try to enable some kind of debug logs for zigbee2mqtt and inspect logs for similar issue with WindowCoveringRollerE1.
  2. Also, to check value of WindowCoveringRollerE1.current_position_lift_percentage you could find your device in settings, then (for ZHA):
    Device Info > 3 dots (right from “reconfigure button”) > Manage Zigbee Device >
    select WindowCoveringRollerE1 from cluster and select attribute current_position_lift_percentage > Read Attribute.
    After that, you will see the current value of this attribute.


If your roller have position in real life different from the value of current_position_lift_percentage, so it could be the issue, but I don’t know for sure.

In my case, ZHA just stopped polling position from WindowCoveringRollerE1 after updating firmware and start polling from the AnalogOutputRollerE1 cluster, which has correct data.

P.S.
I didn’t dig deeper to understand why it happened

1 Like

For those who don’t mind using the Aqara hub. Just add devices to the hub and add to HA via matter integration. Quick, seamless and easy.

Hello guys,

I also have the problem that the entity does not update after the motor has moved. That’s why I also created an additional automation for updating a template entity with the values from the motor. The motor is connected via Z2MQTT Addon.
Perhaps these instructions will help someone.

What is needed:

  • Helpers:

    • Switches (input_boolean):
      Curtain Opening
      Curtain Closing
      Curtain Stopping
    • Number (input_number):
      Curtain Position
  • Template entity in the configuration.yaml:

cover:
  - platform: template
	covers:
  	curtain_window:
    	device_class: curtain
    	friendly_name: "Curtain Window"
    	unique_id: "curtainWindow1"
    	position_template: "{{ states('input_number.curtain_position') }}"
    	open_cover:
      		service: input_boolean.turn_on
      		target:
        			entity_id: input_boolean.curtain_opening
    	close_cover:
      		service: input_boolean.turn_on
      		target:
        			entity_id: input_boolean.curtain_closing
    	stop_cover:
      		service: input_boolean.turn_on
      		target:
        		entity_id: input_boolean.curtain_stopping
    	set_cover_position:
      		service: input_number.set_value
      		target:
        			entity_id: input_number.curtain_position
      		data:
        			value: "{{ position }}”
  • Add the automation and replace some fields:
    • Replace this letters:
      AQARAROLLERSHADE_NAME → your entity of the roller shade in HA. Should be in the MQTT integration.

    • FRIENDLY_NAME_Z2MQTT → this is the name that you have defined as the display name in the Z2MQTT configuration

    • Add this automation (do not forget to replace the letters and doublecheck, whether the entity names of the helpers are the same):

alias: Curtain Update
description: ""
trigger:
  - platform: homeassistant
	event: start
  - platform: state
	entity_id:
  	- input_boolean.curtain_opening
	id: OPENING
	to: "on"
  - platform: state
	entity_id:
  	- input_boolean.curtain_closing
	id: CLOSING
	to: "on"
  - platform: state
	entity_id:
  	- input_number.curtain_position
	id: POSITION
  - platform: state
	entity_id:
  	- input_boolean.curtain_stopping
	to: "on"
	id: STOPPING
condition: []
action:
  - choose:
  	- conditions:
      	- condition: trigger
        	id:
          	- OPENING
    	sequence:
      	- device_id: c8a063ee429fa095a18224e2368dd76a
        	domain: cover
        	entity_id: bdb5909fd41cae3eff714d4d3946453e
        	type: open
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 2
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
          	until:
            	- condition: state
              	entity_id: cover.AQARAROLLERSHADE_NAME
              	state: open
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
          	payload: "{\"state\": \"\"}"
      	- service: input_number.set_value
        	metadata: {}
        	data:
          	value: >-
            	{{ state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') |
            	float(0) }}
        	target:
          	entity_id: input_number.curtain_position
      	- service: input_boolean.turn_off
        	metadata: {}
        	data: {}
        	target:
          	entity_id: input_boolean.curtain_opening
  	- conditions:
      	- condition: trigger
        	id:
          	- CLOSING
    	sequence:
      	- device_id: c8a063ee429fa095a18224e2368dd76a
        	domain: cover
        	entity_id: bdb5909fd41cae3eff714d4d3946453e
        	type: close
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 2
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
          	until:
            	- condition: state
              	entity_id: cover.AQARAROLLERSHADE_NAME
              	state: closed
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
          	payload: "{\"state\": \"\"}"
      	- service: input_number.set_value
        	metadata: {}
        	data:
          	value: >-
            	{{ state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') |
            	float(0) }}
        	target:
          	entity_id: input_number.curtain_position
      	- service: input_boolean.turn_off
        	metadata: {}
        	data: {}
        	target:
          	entity_id: input_boolean.curtain_closing
  	- conditions:
      	- condition: and
        	conditions:
          	- condition: trigger
            	id:
              	- POSITION
          	- condition: state
            	entity_id: input_boolean.curtain_opening
            	state: "off"
          	- condition: state
            	entity_id: input_boolean.curtain_closing
            	state: "off"
          	- condition: state
            	entity_id: input_boolean.curtain_stopping
            	state: "off"
    	sequence:
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/set
          	payload: >-
            	{"position": {{ states("input_number.curtain_position") | int
            	}}}
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 1
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
          	until:
            	- condition: template
              	value_template: >-
                	{{ states('input_number.curtain_position') | int  ==
                	state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') | int
                	}}
  	- conditions:
      	- condition: trigger
        	id:
          	- STOPPING
    	sequence:
      	- service: mqtt.publish
        	metadata: {}
        	data:
          	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/set
          	payload: "{\"state\": \"STOP\"}"
      	- repeat:
          	sequence:
            	- service: input_boolean.turn_off
              	metadata: {}
              	data: {}
              	target:
                	entity_id: input_boolean.curtain_closing
            	- service: input_boolean.turn_off
              	metadata: {}
              	data: {}
              	target:
                	entity_id: input_boolean.curtain_opening
            	- service: input_boolean.turn_off
              	metadata: {}
              	data: {}
              	target:
                	entity_id:
                  	- input_boolean.curtain_stopping
          	until:
            	- condition: and
              	conditions:
                	- condition: state
                  	entity_id: input_boolean.curtain_opening
                  	state: "off"
                	- condition: state
                  	entity_id: input_boolean.curtain_closing
                  	state: "off"
                	- condition: state
                  	entity_id: input_boolean.curtain_stopping
                  	state: "off"
      	- repeat:
          	sequence:
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 1
                	milliseconds: 0
            	- service: mqtt.publish
              	metadata: {}
              	data:
                	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
                	payload: "{\"state\": \"\"}"
            	- delay:
                	hours: 0
                	minutes: 0
                	seconds: 2
                	milliseconds: 0
            	- service: input_number.set_value
              	metadata: {}
              	data:
                	value: >-
                  	{{ state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') |
                  	float(0) }}
              	target:
                	entity_id: input_number.curtain_position
          	until:
            	- condition: template
              	value_template: >-
                	{{ states('input_number.curtain_position') | int  ==
                	state_attr('cover.AQARAROLLERSHADE_NAME', 'current_position') | int
                	}}
	default:
  	- service: mqtt.publish
    	metadata: {}
    	data:
      	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
      	payload: "{\"state\": \"\"}"
  	- service: mqtt.publish
    	metadata: {}
    	data:
      	topic: zigbee2mqtt/FRIENDLY_NAME_Z2MQTT/get
      	payload: "{\"battery\": \"\"}"
mode: restart
1 Like

I have just got one of these and so far so good. I have mine inverted so open is closed and close is open but otherwise seems to be doing all the things.

If anyone has advice on how to change open to closed and vice versa, so the icon represents what is actually happening that, would be awesome. Otherwise pretty happy.

I recently bought this Aqara device and had the same issues as described above. I can confirm that after updating firmware on my Sonoff zigbee stick and removing/re-pairing in Zigbee2MQTT (this step is important!) all the problems are gone now and the device is working as expected.

Aye confirmation here also using Sonoff Zigbee 3.0 Plus stick. You need to update the firmware, otherwise the device will ultimately lose connection and you cannot even repair it.

Updating firmware fixed the pairing process, and now I can also see the temperature and battery levels, which were previously “Unknown” and always at 0.3c