SofaBaton X1 Integration Request

There is a slightly less Janky and more secure/private way to integrate an X1S now with the addition of local HTTP GET/POST functions. I think this requires the latest firmwares on the remote and hub though, and I’m not sure if it’s available on the original X1.

You will need a way to receive and act on those calls, which you can do directly in HA for most things, but I found using Nodered to “decode” those functions more powerful and easy to hook up to various functions in HA.

So what you do is add a new IP device, in the search window that appears tap the “add custom API” and you get to enter HTTP GET commands, which you can fill out a stack of (one by one, manually copy+paste then edit… its slow) then you can map those functions to buttons for that device, or, more powerfully use them in activities for much more advanced control than the remotes built in functions.

I have activities for various things in my main TV room, and the remote itself only sends the control signals and a HTTP GET command, the sofabaton doesn’t control the power of any device directly and the only “device” with a power off command is the custom API device sending a GET that turns off the room. this lets me use some logic within my node-red to only send a power on command (with broadlink IR mostly but some by sending on a HTTP GET to my hdmi matrix to send a custom IR command to the required emitter) to devices that are turned off (to avoid power toggle commands getting devices out of sync) and the “off” button at the top of the remote acts as a master OFF for the room.

In every activity I have two of the colour buttons at the bottom of the remote set to increase and decrease the lighting in the room, hold to turn full on or full off, and the other two control the air con in the room.

It works 100% perfectly, but to do it the way I’m doing it requires HAOS+Node-Red+HACS Nodered Companion and a custom function to take the HTTP GET.

This lets me do more advanced things like “watch movies” which will run all the normal sequences to turn on any required devices (ignoring those that may already be on, making switching very fast when all that is required is a source switch on the receiver for example), that selects the Zidoo player, which is in the room directly connected to the receiver, but it also launches jellyfin which is the app I use on that device and sets the receivers audio mode to dolby surround, the volume to -25db, dims the lights to 5% until it gets an update that a film has started then it dims down to 0%, sets the AC to quiet mode, sets a flag that I intend to use for a now playing display outside the theatre room etc etc… while in that activity the remote is using basic IR to control the zidoo and recevier.

I can then have some that say “watch youtube - user” that selects one of 3 nvidia shields on the matrix to be sent to the theatre room, sets the recevier to that input, sets the lights to default, AC to auto and launches the youtube app. the remote is then set to a custom program that talks through the matrix’s IR distribution to a FLIRC plugged into the shield and it controls from there.

I have ones to watch satellite TV, Terrestrial TV, then ones for just music that leaves the TV in whatever state it was in and uses a combination of smart outlets, smart button pushers and IR to start a turntable+preamp, turn on a CD player, and even turn on the cassette deck. those modes set the receiver into stereo mode.