Let's talk about dimming #zigbee and #matter lights with physical remotes.

The task is pretty simple for two button remotes: When I keep a button pressed, smoothly dim brightness in that direction until I release the button. 🧵

#homeautomation

With #homeassistant, configuring remotes is incredibly annoying. You create a separate automation for every key function or you search for a blueprint on the internet, of which there are dozens for each remote claiming to finally be the best one.

Homeassistant has no concept of start/stop dimming, so all implementations use a variant of this ugly hack:

while (button_still_pressed) {
increase_brightness(5%, 1 second);
sleep 1 second;
}

#zigbee #matter #homeautomation

For ZHA users, the usual recommendation is to directly bind remotes to lamps which enabled smooth dimming.

#zigbee2mqtt allows sending the brightness_move command to zigbee lights, which allows to start/stop very smooth dimming with minimal traffic on the mesh.

Because Homeassistant has no sensible way to use this, I created a crazy #nodered flow that directly works with zigbee2mqtt to make my remotes work they way they should on light groups.

#homeassistant #zigbee #matter #homeautomation

The two green remotes are new Ikea Matter remotes. The left one with the scroll wheel works completely different, but for the dual button remote we have the same problem as with zigbee: Homeassistant has no way of making this work smoothly.

Should it be possible though? Yes. Matter lamps have a 'Move' command and even a 'MoveWithOnOff' command with slightly different behaviour. Both work fine on the Ikea Matter bulbs.

#zigbee2mqtt #nodered #homeassistant #zigbee #matter #homeautomation

Interacting with z2m over mqtt was easy, but how to do the same with matter?

Homeassistant uses matterjs-server (or it's older python variant) and they both expose a websocket for clients to receive events and send commands directly to matter devices. That's how Homeassistant connects to matter-server too.

You can expose matter-server's websocket on the network.

https://github.com/matter-js/matterjs-server

#zigbee2mqtt #nodered #homeassistant #zigbee #matter #homeautomation

So smooth and efficient dimming with matter is as easy as connecting to matter-server's WS, listening to remote events and emitting Move events. 👀

#zigbee2mqtt #nodered #homeassistant #zigbee #matter #homeautomation

So what about these Ikea scroll wheel remotes? They send 16 button press events for a complete turn, so we simply change brightness a bit for each step.

When turned fast, the send multipress events which need to be handled and to make them scroll smoothly the transition times for brightness changes need to be tuned right.

#zigbee2mqtt #nodered #homeassistant #zigbee #matter #homeautomation

As this is painful and partly impossible to build with Homeassistant automations, I've created a small service that directly talks to matter-server's websocket and makes my BILRESA dual button + scroll wheel remotes work the way I expect.

Disclaimer: This is a proof of concept vibecoded in a few nights and it works for me™️.

https://codeberg.org/markuslindenberg/home-remote-controller

#homeassistant #matter #homeautomation

home-remote-controller

home-remote-controller

Codeberg.org

Not happy with the scroll wheel yet, I wonder if someone traced the exact behavior Ikea has built into it's Dirigera controller. Couldn't find anything.

#homeassistant #matter #homeautomation

@moreentropy IKEA seems to bind Zigbee devices together, I wonder if they do the matter equivalent
@reconbot From what I think i've read somewhere they don't right now.
@moreentropy thanks for this. I was wondering what they were like. What's the finger grip like on the wheel, they look a bit smooth? Is the surface slightly tactile?

@ropatrick Not tactile at all. I personally think it's too slippery, if I have very dry fingers it's hard to operate.

And I'm not that happy with the scroll wheel remote overall. Using it's switching function to switch between three controllable devices is annoying, I always end up controlling the wrong device. I still haven't got the scrolling completely right, just keeping a button pressed to dim on a normal two/four button remote is much more pleasant imho.