dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 506 forks source link

Aqara Roller Shade Driver E1 #5330

Closed hastime closed 3 years ago

hastime commented 3 years ago

Device

Screenshots

Screenshot 2021-09-28 at 23 13 49

Basic

Screenshot 2021-09-28 at 23 15 19

Identify

Screenshot 2021-09-28 at 23 16 01

Alarms

Screenshot 2021-09-28 at 23 17 30

Device Temperature

Screenshot 2021-09-28 at 23 18 01

Groups

Screenshot 2021-09-28 at 23 19 00

Scenes

Screenshot 2021-09-28 at 23 20 31

On/Off

Screenshot 2021-09-28 at 23 20 59

Level Control

Color Control

Simple Metering

Diagnostics

Other clusters that are not mentioned above

Screenshot 2021-09-28 at 23 21 28 Screenshot 2021-09-28 at 23 22 00 Screenshot 2021-09-28 at 23 22 23 Screenshot 2021-09-28 at 23 22 54 Screenshot 2021-09-28 at 23 23 17
Mimiix commented 3 years ago

Hi,

Can you also make a post on the forum?

hastime commented 3 years ago

Hi,

Can you also make a post on the forum?

Hi I have made a forum post now, thanks, it just needs to be approved by the moderators.

Thanks!

Mimiix commented 3 years ago

Hi I have made a forum post now, thanks, it just needs to be approved by the moderators.

You triggered the spambot for some reason 😄. I approved it. Thanks!

hastime commented 3 years ago

Hi I have made a forum post now, thanks, it just needs to be approved by the moderators.

You triggered the spambot for some reason 😄. I approved it. Thanks!

Thanks! :)

ads1230 commented 3 years ago

Any luck with this?

lwsrbrts commented 3 years ago

I'm very interested in support for this device too.

volantynys commented 3 years ago

Same already have one, would be wonderful to use it to its fullest

kvanisterdael commented 3 years ago

Is there any progress on this?

Mimiix commented 3 years ago

None, as no devs have picked it up.

sanderlv commented 3 years ago

Same here... deconz shows it but not function. https://zigbee.blakadder.com/Aqara_ZNJLBL01LM.html

Holbroser21 commented 3 years ago

@sanderlv I was actually able to pair mine with deConz successfully over the weekend. It doesn't show battery, but otherworks works perfectly in Home Assistant as a blind controller! I am not quite sure what I did, as I spent over an hour attempting to pair it in the end. However, I think there are at least a few steps needed.

First you must have the top and bottom points set on the controller (they can be anything, you can change them later), and obviously, it must be paired and visible in the deConz gui.

At this point it was showing up as a light for me in both Phoscon and Home Assistant, and I spent some time manually reading every cluster, multiple times both with Phoson in searching mode, and not.

Finally, I think what seemed to work was when I used the deConz.configure service in Home Assistant to send data to it over the API. I was only aiming to re-name the entity in deConz, but from there, it seems to have worked without an issue.

If you give it all a go, let me know how you get on

Mimiix commented 3 years ago

@SwoopX Can you help on this?

sanderlv commented 3 years ago

Not sure what you actually mean to do...

I tried to search the deConz.configure but I do not seem to find "what to" service to it? image

I have set a top and bottom limit. But Id no not get any feedback/control: image

I can control up/down via: image

But I do not get any event via: image

Been trying to send some, but I get no action... althought this is error free from homeassitant perspective: image

@Holbroser21 curious what you did where...

Holbroser21 commented 3 years ago

@sanderlv I am just as confused myself to be honest, although obviously very happy it does work. I must have pushed every button/ reset every setting / clicked every box about 5 times while trying to set it up.

The service call I made was just this, where I got the path of the controller from the Phoscon API page: image

Then this is now what I see on the entitiy's page in HA: image

I do have this set in deConz from when I was testing things, but the values apear to have no effect on anything: image

Mimiix commented 3 years ago

@Holbroser21 Me and @sanderlv tried some things on discord. I've noticed he iddn't had the Lumi specific cluster. That's prolly why it didn't work for him yet. He'll try tonight :)

lwsrbrts commented 3 years ago

A couple of things I notice on my E1. My "firmware" date compared to @Holbroser21 is different.

image

And the "Lumi specific" node ID on @Holbroser21's is FCC0 whereas on mine it's the same ID but "Unknown" and selecting it does nothing.

image

I've tried resetting and re-discovering but I always end up with a dimmable light device type.

Mimiix commented 3 years ago

Out of Curiousity @lwsrbrts / @Holbroser21 What Firmware is on your conbee?

lwsrbrts commented 3 years ago

Mine is: 26720700

image

Mimiix commented 3 years ago

@lwsrbrts https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Xiaomi:-Lost-devices-or-functional-issues Can you try this?

lwsrbrts commented 3 years ago

@Mimiix thanks for the idea. No change unfortunately.

Mimiix commented 3 years ago

@Holbroser21 What deCONZ version are you on?

Holbroser21 commented 3 years ago

Nothing special, I'm using the deCONZ add-on in HA, version 6.10.0 (latest), and my Conbee is a V1, firmware 0x26400500 (latest stable)

kvanisterdael commented 3 years ago

@lwsrbrts : I have the same issue; the E1 always shows up as a Dimmable Light:

afbeelding

However if I go into the cluster 'Window covering' I can execute up/down/stop: afbeelding

My deConz version: afbeelding

sanderlv commented 3 years ago

@lwsrbrts : I have the same issue; the E1 always shows up as a Dimmable Light:

afbeelding

However if I go into the cluster 'Window covering' I can execute up/down/stop: afbeelding

My deConz version: afbeelding

Yes, exactly like all but one of us. Although your conbee stick firmware is older than most of us. If upgaded it exposes extra clusters in your aqara (not that it helps, but it's more than you have now :-))

kvanisterdael commented 3 years ago

@sanderlv : I have a RaspBee 1 instead of a Conbee, so that's why the firmware is different; it is the latest firmware available...

SwoopX commented 3 years ago

Guys, please check out the following:

  1. Make sure your running the latest Conbee/Raspbee firmware https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Firmware-Changelog
  2. If you run 2.13.0 or 2.13.1, make sure you update to 2.13.2
  3. If any of the above was not given before you paired the device(s), reset and re-pair while being up to date
  4. Pair in normal/hybrid mode (tab control)
  5. If you followed 1-4, try restarting deconz

One thing worth to note: if the FCC0 cluster has the name of unknown, then there must be something off with the setup. That one got added many versions ago and is since then part of file general.xml

sanderlv commented 3 years ago
1. Make sure your running the latest Conbee/Raspbee firmware https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Firmware-Changelog

-- Yes, I am image

2. If you run 2.13.0 or 2.13.1, make sure you update to 2.13.2

-- Not sure how to/where to update since I am running the addon in home assistant...

3. If any of the above was not given **before** you paired the device(s), reset and re-pair while being up to date

-- Was given

4. Pair in normal/hybrid mode (tab control)

-- Not sure where to do this.

  1. If you followed 1-4, try restarting deconz One thing worth to note: if the FCC0 cluster has the name of unknown, then there must be something off with the setup. That one got added many versions ago and is since then part of file general.xml -- It's not unknown with me: image

EDIT: what I find remarkable, not sure if it hase something to do with it. After restarting decons, I see value "rollershade" where below is Drapery. Drapery comes after "read". image

lwsrbrts commented 3 years ago

Thanks for getting involved @SwoopX

One thing worth to note: if the FCC0 cluster has the name of unknown, then there must be something off with the setup. That one got added many versions ago and is since then part of file general.xml

The installation is from around March 2021 (this year) and is using the SD-card images available from https://phoscon.de/en/raspbee/sdcard at that time - so it's not that old and I have to assume the image doesn't introduce anything off through normal use and updates.

The SD-card image is the stable version rather than beta and all updaes will have been performed through apt.

Flashing the firmware on the ConBee II will have been done using the instructions available here: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Update-deCONZ-manually#update-in-raspbian

It's worth me mentioning that I'm not running beta and am therefore on 2.12.06. If I need to run 2.13.02 that's fine but it's not particularly clear that version is required. Is it?

lwsrbrts commented 3 years ago

After a complete reboot of the RasPi and re-connecting the blind controller, I've now got a Lumi specific FCC0 identifier, alas, the blind controller is still not showing in Home Assistant as a controllable covering.

The API says:

{
    "etag": "9e579fdd4e0b18a0988d654801c8482b",
    "hascolor": false,
    "lastannounced": null,
    "lastseen": "2021-11-17T12:47Z",
    "manufacturername": "LUMI",
    "modelid": "lumi.curtain.acn002",
    "name": "Office Blind",
    "state": {
        "bri": 254,
        "lift": 100,
        "on": true,
        "open": false,
        "reachable": true
    },
    "swversion": "05-12-2021",
    "type": "Dimmable light",
    "uniqueid": "54:ef:44:10:00:1d:74:be-01"
}
sanderlv commented 3 years ago

Mine says on API:

{
   "etag":"575386d68fe8a2f7ae09605e0e8f0767",
   "hascolor":false,
   "lastannounced":"2021-11-16T14:20:30Z",
   "lastseen":"2021-11-17T18:02Z",
   "manufacturername":"LUMI",
   "modelid":"lumi.curtain.acn002",
   "name":"aqara 1",
   "state":{
      "bri":15,
      "lift":6,
      "on":true,
      "open":true,
      "reachable":true
   },
   "swversion":"05-18-2021",
   "type":"Dimmable light",
   "uniqueid":"54:ef:44:10:00:2e:09:5d-01"
}
SwoopX commented 3 years ago

I had a look around on this device and it appears that Xiaomi is (once again) not following the standards here.

Can anyone please try setting attribute 0x0055 of the analog output cluster (0x000D) to have it opened/closed? Should have a range from 0 - 100.

thomasloven commented 3 years ago

That works and moves the curtain to the expected position. And reading from it reports the position when manually changed.

sanderlv commented 3 years ago

what should I put where?

image

kvanisterdael commented 3 years ago

I pulled the latest commits and recompiled my deConz, but the E1 is still visible as a dimmable light in the Phoscon application. What can I do to make this work?

SwoopX commented 3 years ago

Use the REST API with state/lift

kvanisterdael commented 3 years ago

Thanks for your help, but I get following reply:

PUT /api/A53342B49D/lights/3/state HTTP/1.1
Content-Type: text/plain
User-Agent: PostmanRuntime/7.28.4
Accept: */*
Cache-Control: no-cache
Postman-Token: 67062b3a-07b7-4084-9fe0-202526ac5633
Host: 192.168.0.4
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 22

{
"lift": 50,
}

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 199
ETag: "dc196c0835cf5ced44c11600f9f93fe7"

[{"error":{"address":"/lights/3/state","description":"parameter, lift, not available","type":6}},{"error":{"address":"/lights/3/state","description":"missing parameter to set light state","type":5}}]

Weird, because the lift state IS available on device 3:

GET /api/A53342B49D/lights/3 HTTP/1.1
User-Agent: PostmanRuntime/7.28.4
Accept: */*
Cache-Control: no-cache
Postman-Token: 1f9b897b-033f-4dea-97cb-a773583bbdfd
Host: 192.168.0.4
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 370
ETag: "dc196c0835cf5ced44c11600f9f93fe7"

{"etag":"dc196c0835cf5ced44c11600f9f93fe7","hascolor":false,"lastannounced":"2021-11-29T05:41:40Z","lastseen":"2021-11-29T08:00Z","manufacturername":"LUMI","modelid":"lumi.curtain.acn002","name":"Dimmable light 3","state":{"bri":0,"lift":0,"on":false,"open":true,"reachable":true},"swversion":"05-18-2021","type":"Dimmable light","uniqueid":"54:ef:44:10:00:2e:12:0d-01"}
Arjan-21 commented 2 years ago

Use the REST API with state/lift

Thanks for all your help. read the whole topic about this.

I've the same problem as noted above. Also trying to control the blinds with changing the state. I'm able to change bri, but nothing is happened when changing this.

Arjan-21 commented 2 years ago

When I execute from deconz to go up or down it works and "lift" is changing the value. Same happend when I'm passing manually on the device. "Bri" is also changing. When I send a PUT command it changed again in my display, but nothing happend with the blinds.

kvanisterdael commented 2 years ago

@SwoopX : I just installed beta 2.13.03 but it still show up like a dimmable light and the HTTP response still says "parameter, lift, not available". Could you have another look on what could be wrong?

Mimiix commented 2 years ago

Did you re pair?

Arjan-21 commented 2 years ago

Did you re pair?

I did and restart deconz and the pc.

kvanisterdael commented 2 years ago

Re-pair, restart deconz, updated deconz, re-pair... still no luck

SwoopX commented 2 years ago

Hm, that now was a serious amount of digging to find anything... Looks like there must be another place taken into consideration for explicit whitelisting as the device doesn't care about any zigbee spec compliance. Again, just 1 line but responsible for the code jumping to and handling the lift item stuff.

kvanisterdael commented 2 years ago

@SwoopX : thanks a lot! The REST command now works and I can make it move to the correct 'lift' position.

Another question: is it possible to send a STOP command to stop moving immediately via the REST api?

Arjan-21 commented 2 years ago

Do I need to add the code somewhere? I use deConz now for 2/3 weeks. so I've never done this.

Thanks for your help @SwoopX

SwoopX commented 2 years ago

@kvanisterdael That should work as well, you might want to try the below grafik

@Arjan-21 No, not really. Compiling the linked branch and then exchanging the plugin should be sufficient https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Compiling-the-REST-plugin-for-device-specific-testing

kvanisterdael commented 2 years ago

@SwoopX : thanks very much for your help! This works perfectly fine...

Arjan-21 commented 2 years ago

@SwoopX Just updated to 2.13.4 and it works really great. Thank you very much!!

Pete1979 commented 2 years ago

@SwoopX Just updated to 2.13.4 and it works really great. Thank you very much!!

Did you do anything but update deconz? I just migrated from deconz to ZHA yesterday to try to get this roller to work as intended, dident manage to get it working in ZHA tho. But if all i need to do it use deconz again i guess i can migrate back.

Mimiix commented 2 years ago

@Pete1979 ZHA != deconz. you need deCONZ for this.