maxandersen
(Max Rydahl Andersen)
January 5, 2021, 10:09am
1
i’m trying to make a blueprint for ikea tradfri wireless dimmer and i have it working for reducing brightness but not the other way around.
I’m wondering if someone can spot what is wrong.
Current version is at blueprint for ikea tradfri wireless dimmer · GitHub
the triggers should just be 1,195 and 0,195 and I see them in the zha_events but for some reason only 1,195 are making its way trhough.
Can you please show the data for the two events?
maxandersen
(Max Rydahl Andersen)
January 5, 2021, 11:02am
3
Sure, it generates quite a few events - i’ll paste both “blocks” of data, here is for turning right:
zha_event
data:
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_with_on_off
args:
- 0
- 70
origin: LOCAL
time_fired: '2021-01-05T10:59:26.370612+00:00'
context:
id: 3925f304858c5f37c06e5d04fb41b04d
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_with_on_off
args:
- 0
- 70
origin: LOCAL
time_fired: '2021-01-05T10:59:26.402001+00:00'
context:
id: cba0637b9bc33dc59d6bcce8b49b41fb
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_with_on_off
args:
- 0
- 70
origin: LOCAL
time_fired: '2021-01-05T10:59:26.434400+00:00'
context:
id: 4f63c00d36d7303ff543908b23ed5f67
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_with_on_off
args:
- 0
- 70
origin: LOCAL
time_fired: '2021-01-05T10:59:26.465983+00:00'
context:
id: f5d4b0aaad2c8a90dace9a0b24aa9c2f
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_with_on_off
args:
- 0
- 70
origin: LOCAL
time_fired: '2021-01-05T10:59:26.498116+00:00'
context:
id: 0ff590db0fb24873067711f84cd6b280
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: stop
args: []
origin: LOCAL
time_fired: '2021-01-05T10:59:26.530168+00:00'
context:
id: 2a0ada3c25d7d70c513732b0ed231e97
parent_id:
user_id:
event_type: zha_event
data:
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: stop
args: []
origin: LOCAL
time_fired: '2021-01-05T10:59:26.561629+00:00'
context:
id: d8740cbfebf9379529515e3f29e21fa9
parent_id:
user_id:
event_type: zha_event
data:
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_with_on_off
args:
- 0
- 70
origin: LOCAL
time_fired: '2021-01-05T10:59:26.593727+00:00'
context:
id: 3ea91a84017e145ada0b811e61b65d42
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 255
- 1
origin: LOCAL
time_fired: '2021-01-05T10:59:26.625845+00:00'
context:
id: a20c86f5f20355322e95a979719b9788
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 255
- 1
origin: LOCAL
time_fired: '2021-01-05T10:59:26.657949+00:00'
context:
id: 0a1c27d7750f1dbe0eb7ce47cf9a41e7
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 255
- 1
origin: LOCAL
time_fired: '2021-01-05T10:59:26.689465+00:00'
context:
id: 2742f7562ed5c721333640f19d4311d9
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 255
- 1
origin: LOCAL
time_fired: '2021-01-05T10:59:26.721846+00:00'
context:
id: d68bc26d5afc832820dc66a6358bdefd
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 255
- 1
origin: LOCAL
time_fired: '2021-01-05T10:59:27.410090+00:00'
context:
id: 7ca3fe84daedf700d66b13b0863badb4
parent_id:
user_id:
and here is when turning left:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move
args:
- 1
- 195
origin: LOCAL
time_fired: '2021-01-05T11:01:12.666579+00:00'
context:
id: 0f43e1ca94d04a752b727e3e3bc64e13
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move
args:
- 1
- 195
origin: LOCAL
time_fired: '2021-01-05T11:01:12.697422+00:00'
context:
id: 81d6d08b46ec0d25fed22f034d7599f5
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move
args:
- 1
- 195
origin: LOCAL
time_fired: '2021-01-05T11:01:12.729716+00:00'
context:
id: 9e285d9df05df4bd1df814546e7e38a3
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move
args:
- 1
- 195
origin: LOCAL
time_fired: '2021-01-05T11:01:12.761262+00:00'
context:
id: d2ba753325bb32fa3044ff843cb15d71
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move
args:
- 1
- 195
origin: LOCAL
time_fired: '2021-01-05T11:01:12.793320+00:00'
context:
id: ef9ec37ceef309d6ea822f5c852f5b86
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move
args:
- 1
- 195
origin: LOCAL
time_fired: '2021-01-05T11:01:12.833251+00:00'
context:
id: 628c72d4ed67905e57715820c1182ee2
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 0
- 1
origin: LOCAL
time_fired: '2021-01-05T11:01:12.873200+00:00'
context:
id: d638c97eb107c385d0fb8008846d7247
parent_id:
user_id:
event_type: zha_event
--
--
event_type: zha_event
data:
device_ieee: 00:0b:57:ff:fe:92:8a:53
unique_id: 00:0b:57:ff:fe:92:8a:53:1:0x0008
device_id: 6d728905ca4ac0db750bdf1d1f0c3ffa
endpoint_id: 1
cluster_id: 8
command: move_to_level_with_on_off
args:
- 0
- 1
origin: LOCAL
time_fired: '2021-01-05T11:01:13.705823+00:00'
context:
id: 9efeff202f6ed4945d38581ea04273d6
parent_id:
user_id:
you’ll see right is a move or move_with_on_or_off 0,195 and left is same but with 1,195.
maxandersen
(Max Rydahl Andersen)
January 5, 2021, 11:04am
4
hmm - now that see this capture it looks like 0,70 is the right one …that is just weird as https://github.com/zigpy/zha-device-handlers/blob/61dedab318a8986b2b0a7bffe5116bbc40bed214/zhaquirks/ikea/dimmer.py says it shuoldn’t…
let me try 0,70
maxandersen
(Max Rydahl Andersen)
January 5, 2021, 11:04am
5
btw. does blueprints autoreload or is restart needed for changes to take effect?
That’s what I wanted to point out, I can’t see 0, 195
Reload automations shouöd be enough.
maxandersen
(Max Rydahl Andersen)
January 5, 2021, 11:27am
7
yeah, figured out reload but even when changing to look for 0, 70 its not being picked up. and i can’t spot why
Hmm that’s strange, sorry can’t help here as I don’t use ZHA.
maxandersen
(Max Rydahl Andersen)
January 5, 2021, 11:36am
9
now just made the only change of of 1, 195 to 0, 195 and now it picks it up.
so it does see the event but for some reason the second condition is not triggered.
I don’t think it is zha specific here though - must be some bug in the condition matching …either in HA or in my automatoin…but I can’t spot it
dproffer
(David Proffer)
January 5, 2021, 8:46pm
10
I see different structure for the ‘args:’ for different devices, could this be a problem? For example the Aqara Cube is ‘KV’-like, where others just have the values, no keys, for args:
args:
value: 81.0
flip_degrees: 90
activated_face: 2.0
maxandersen
(Max Rydahl Andersen)
January 5, 2021, 10:36pm
11
maxandersen:
args:
- 0
- 1
you can see the values above in my earlier post - its just a list of values:
args:
- 0
- 1
and exact same structure and I can get it to match/trigger if I change the first condition section, but the seocnd one just seem to get ignored.