Automation Assist for Sofabaton X1, X1S and X2 remotes

Introducing Automation Assist

I’ve been building a Lovelace card for Sofabaton remotes (X1, X1S, X2) and added a feature I’ve been working on for a while: Wifi Commands.

Press a physical button on your remote → something happens in Home Assistant. Configure it entirely through the card UI.

You give a command a name, assign it to a button or favorite, pick which Activities it applies to, optionally attach a HA Action (turn off lights, close curtains, whatever), and sync to the hub. Done. All Sofabaton hubs supported.

If you prefer to wire things up yourself, you can skip the Action and trigger your own automations from the sensor.<hub>_wifi_commands entity instead.

Full docs are here

The card also has Key Capture for the other direction - press buttons on the virtual remote and get ready-to-use YAML in your sidebar, for both Lovelace button cards and automation actions. Useful if you’re not sure what the right remote.send_command call looks like.

See how to use here.

This card requires an integration to function. Even though the card is compatible with both integrations that are currently available, specifically the Wifi Commands feature is only available with the (unofficial) sofabaton_x1s integration (which is compatible with all hubs).

→ Available on HACS: search Sofabaton Virtual Remote.
→ Docs and source on GitHub.

Happy to answer questions!

@m3tac0de - Thank you for your post, I am thinking of getting the HA green to control lights in just one room using the Sofabaton X2 remote control system. Seems like there are no dimming relays that are directly compatible with SB X2 and I am not keen on Hue. I only need to control lights in one room (home theatre room) and would rather take the HA route.

I presume I’d need the HA Green, a Z-wave transmitter and some Z-wave dimmer modules and Z-Wave on-wall switch, I need a long lasting battery powered on-wall switch to activate the lights from outside the room, ideally close to the entrance of the room. I’ve noticed that HA offers the ZWA-2 transmitter for Z-Wave. I’d rather go with Z-wave to avoid 2.5GHz interference and reliability. Any recommendations for a Z-Wave dimmer relay module and a Z-Wave on-wall switch?

I love it when the lights ramp up slowly to full power when switched-on and ramp down slowly to switch-off. Hence, when the lights are activated from the on-wall switch near the entrance of the room, it should ramp up to switch on. By the way, along with the lights, would it be possible to active the home theatre system from the HA app from anywhere in the house as long as the HA Green console is on the same network?

I have no hands on experience with Z-wave @Samazar, but the components that you listed are indeed the ones you need for a Zwave setup. I tried Hue whenever that first came out and somehow ended up with the whole building + garden/garage etc being lit and switched over zigbee and Hue components.

If I were to rebuild from scratch today, I would be looking at Thread and Matter compatible components. Thread is the now broadly supported successor to Zigbee and Zwave (RF based mesh signaling). Support in Home Assistant is relatively new, but I’ve been able to do fun things with super cheap components that support the new standards (like the Ikea sensors).

As far as the X2 goes: it’s easy to configure buttons that turn your lights on and off, or set them to a arbitrary brightness level. What’s harder is to have a setup where your lights brighten and dim, for as long as you press a button on the remote. It is possible but not obvious how:

  • The X2 has built in “hold” support (command repeats while button is held) only on the Vol+/- buttons. Any other button will not repeat command while held. With one exception: if the device is an “IP/HTTP device” (NOT an MQTT device), commands will be repeated while the button is held.
  • In Home Assistant you’ll be dealing with device/integration specific behaviors in terms of changing brightness and transitions between brightness levels. For example, in my setup i can only change the light settings a few times a second… if i do more than that, a queue will form and the light setting will be lagging my input.

Yes absolutely. Home Assistant integrates with a lot of different gear (like the X2 remote, projectors, televisions, media streamers, audio receivers). You make nice dashboards that provide access to exactly the features you need, in an interface that works for you. You then use the app on your mobile devices to access those dashboards.

App and Home Assistant do not need to be on the same network although that will be the default setup. It is entirely dependent on how you configure this. There are secure ways of accessing your dashboards from anywhere in the world. You either need some technical knowledge to set that up securely, or pay for a subscription service.

I understand what you mean about the challenge of ramping-up or ramping-down the lights. Any idea if there is an inline relay module that does that internally once it receives a single command to to either?

Having said that, I’d love to have a snack button, when engaged on the X2 the lights would ramp-up to just 50% and upon resuming the movie it would ramp-down to switch-off.

I’d be happy to accept plain vanilla on and off but I just love the effect when the lights ramp up or down over 2 to 3 seconds.

For switching i personally use zigbee based relays (note that i’m in the EU), like this one https://ewelinkstore.com/product/smartwise-mini-zb-zigbee-3-0-smart-relay-module-16a/?v=1a13105b7e4e. These are cheap and fit behind already built in switches and sockets. These things exist as Zwave or Thread based versions as well. When installed behind a switch you get the normal switch behavior, plus you can remotely switch the relay.

You’ll find that in most lights, it’s actually more difficult to hard switch them to a specific brightness than it is to have them smoothly transition between brightness settings… pretty much all smart lights will behave that way.

For snack buttons, once you have decided on zwave/zigbee/matter, and you’re running Home Assistant, you can then connect anything with everything. I am currently playing with this thing BILRESA remote control, white smart/scroll wheel - IKEA. A very cheap fun controller, you can buy them in packs of 3. These are Matter based… because i’m experimenting with that right now as a possible replacement for the Zigbee stuff. But because I can connect these things to Home Assistant, i can use the Matter based controller to control the Zigbee based components.

Also, because my media playback happens on Fire TV, which is Android TV based, I have that connected to Home Assistant so that Home Assistant can see which app is running and whether media is playing, paused or stopped. So what I can then do is that whenever a streaming app is launched, I switch to a light scene that is made for that moment. Then when video actually starts playing, i dim the lights all the way down (this is a projector room). As soon as playback pauses, the lights go back up to 25%.
You can build something similar with many different TVs and projectors.
Also, because with many TVs and media players, Home Assistant is able to launch individual apps on the device, you can make buttons on your X2 remote that actually launch these individual apps (button on X2 → Home Assistant → media player). You can have app based Activities.

@m3tac0de - Thanks for the detailed and informative explanation.

So what I can then do is that whenever a streaming app is launched, I switch to a light scene that is made for that moment. Then when video actually starts playing, i dim the lights all the way down (this is a projector room). As soon as playback pauses, the lights go back up to 25%.

What dimming relays are you using to dim the lights all the way down or make the lights go up to 25% when playback is paused?