How to set / read curtain cover positions!? (using an Aquara lumi.curtain.agl001)

I am using Node-RED for automatons inside Home Assistant (both on latest version).

I try to control a curtain-pair using two ‘Aqara lumi.curtain.agl001’ (zigbee) motors.
My problem is that I do not manage to set or get the curtain cover positions

There is a service called “set_cover_position”, however I can not make that to work. Below some pictures of my actual test-setup.

Above you see that I did define three devices:

a button intended to set the cover position to “0” (closed)
a button intended to set the cover position to “100” (open)
and a slider to set the cover position to something between 0 - 100
That does not work. Problem is that a / the position should arrive from the button / slider event, and I have now I idea how to do that

For reference the only thing I could get working (but that is NOT the intention), is a service node with a fixed position defined inside like this

For even easier testing I also used an "inject node" directly connected to the "CurtainSetCoverPos node". As said regretfully I did not manage to get it working

So my questions are:

  1. how to pass a position value from some input (button / slider / etc) to the “set_cover_position service” !?
  2. and … if possible … how to read the actual position form the curtain motor !?

Welcome to the forums @louis,

As your using Home Assistant Specific nodes, you may be better of asking the HA community.
Most here do not use Home Assistant, and are Node RED users only.

I do not understand that. Does not take away that you are probably right :grimacing:

In my perception, you have the following layers:

  • communication (zigbee, Z-wave, wifi)
  • command layer ZHA etc
  • inter working layer Matter ....
  • automation layer e.g. Node Red
  • environment e.g. Home Assistent, Tuya etc etc
  • on top layers google home (voice control etc)

So in that "layered" model Node-RED can not function without layers beneath it. So I wonder how the overall stack used in the "Node-RED" model looks like

PS, I asked the same (original) question in the HA forum (but I expected more success here)

For reference the only thing I could get working (but that is NOT the intention), is a service node with a fixed position defined inside like this

That Data field, what can you select there, I assume you should be able to pass a msg(.payload) as data input ? What does the documentation of the node describe ? I believe the home assistant nodes have quite extensive documentation available.

Perhaps I fixed it, but I am not sure. The curtain control is surely not yet working as it should. Apart from this issue which I may be solved, a better zha-driver would surely be appreciated.

But for now I tried the following

What is may be working (no errors)

Try setting the Data field to J: (JSONata)

Screenshot 2023-01-13 at 20.03.32

Then set the value to {"position": payload }

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.