#trying to make / find an automation for ikea tradfri button

1 messages · Page 1 of 1 (latest)

quiet lodge
#

hi, im trying to find an automation / blueprint to use my ikea tradfri button with full on / off and dimming capabilities. ive tried epmatt's blueprints but they arent working for some reason.

delicate ember
#

could you share the blueprint?

quiet lodge
#

Controller automation for executing any kind of action triggered by the provided IKEA E1743 TRÅDFRI On/Off Switch & Dimmer. Supports Zigbee2MQTT, ZHA, deCONZ.

This Hook blueprint allows to build a controller-based automation to control a light. Supports brightness and color control both for white temperature and rgb lights.

delicate ember
#

can you confirm whether or not there are any traces for the automation you set up with the controller blueprint?

quiet lodge
#

yeah there are traces when i turn it off or on, and traces for the controller when i hold the button, but no traces or actions when i hold the button for the hook

#

im trying controllerX at the moment and it seems to work better tho

#

nvm its too slow LOL

vital nest
#

I use epmatt's blueprints extensively with those Tradfri dimmers and they work flawlessly for me.

quiet lodge
#

hmm, even for the hold press?

vital nest
#

Yep. Are you using just the blueprint, or also the hooks?

quiet lodge
#

hooks too

#

yea im trying it again and holding it triggers the controller automation but not the hook automation

vital nest
#

You can try setting up with just the blueprint. Eg. Under the long press action, just call the action light.turn_on and set the new brightness with a template.

quiet lodge
quiet lodge
#

so for the long press button i tell it to change brightness by 5% and then enable up button long press loop until release right?

vital nest
#

Yep

quiet lodge
#

nope doesnt seem to work

vital nest
#

What's in the automation trace when you hold the button?

quiet lodge
#

seems to ignore everything lol

#

i just learned about traces btw im really not good with them hahah

vital nest
#

Ok. Are you using ZHA or Z2M?

quiet lodge
#

ZHA

vital nest
#

I've seen this behaviour before. Let's do some investigating.

quiet lodge
#

sure

vital nest
#

Go to Dev Tools > Events. Under Listen, enter zha_event and Start Listening.

#

Then, hold down yr button. Then after a while, release. What do you see in terms of events being fired?

quiet lodge
#

these 2

#

bottom one is starting to hold, top one is release

vital nest
#

Ok. Now open the blueprint yaml in a text editor.

quiet lodge
#

sure

vital nest
#

If you scroll down, you'll see a section under variables:. Find actions_mapping, under which you should see zha and button_up_long. What do you see after button_up_long?

quiet lodge
#

i only have this in my yaml

vital nest
#

This is your automation yaml. Can you find the raw blueprint yaml?

quiet lodge
#

its on github, but i cant import it since it has the input field integration thing

vital nest
#

Should be in your config folder, blueprints/automation/EPMatt/ikea_1743.yaml

quiet lodge
#

sure let me check

#

damn thats dumb they should just open that LOL

#

okay im here then

#

everything seems to be fine

vital nest
#

Ok. Now we check sth else. You've defined a text helper where events for this device are stored right?

quiet lodge
#

yup

vital nest
#

In Logbook, display the last few states for this helper. Can you identify the states corresponding to those 2 ZHA events?

quiet lodge
#

sure let me check

vital nest
#

Ok. You see the bottom one, which says "a": "move_with_on_off_MoveMode.Up_83"?

#

That's the value that the device is emitting for up button long press.

#

Copy move_with_on_off_MoveMode.Up_83

quiet lodge
#

sure

vital nest
#

Now back in the blueprint yaml

#

Under button_up_long:

#

add - move_with...83. i.e. paste in what you copied as another list item under that key

quiet lodge
#

sure

vital nest
#

That says that this value in the text helper corresponds to up button long press.

#

Once saved, go to Dev Tools > YAML and reload Automations to pick up these changes to the blueprint.

#

Do you encounter any errors?

quiet lodge
#

nope dont think so

vital nest
#

Now try long pressing up.

quiet lodge
#

damn seems to be working

#

it just gets stuck at 50%

vital nest
#

Ok. You may need to tweak the brightness change step and how many repeats are allowed for long press

quiet lodge
#

wait that might be my fault when troubleshooting earlier lol

#

anyway i think its working

vital nest
#

But basically, the same workflow will apply to enable down button long press, and the releases.

quiet lodge
#

yeah fair

#

could this be fixed if i just used zigbee2mqtt instead?

vital nest
#

This is caused by some firmware on these switches being different from what epmatt programmed for.

#

I'm not sure. But if I look at the blueprint logic, picking up the events through Z2M also relies on these event codes being correct under the actions_mapping, so theoretically such a desync between what the blueprint expects and what the device sends could still occur.

quiet lodge
#

hmm alright

#

well thanks a lot for your help :) i should be okay with figuring it out now

quiet lodge
#

just to finish this thread off, i installed zigbee2mqtt and i didnt have to touch the blueprints, it just worked :)

odd ridge
#

In the blueprint I don’t see anything under hold button on for dimming up or down just can’t find. It