The newly released SofaBaton X1 and older U1 would be great to have an integration for. This appears to be a pretty good Logitech Harmony remote replacement, so it would be really nice to be able to control the hub and app just like the current Harmony integration.
It seems there is an Alexa skill available. So perhaps a HA integration would be possible too? Sadly I donât have the skills to develop it myself.
same here. is there a way to formally make a request
If you enable the SofaBaton API interface, you will get a list of HTTP calls that can turn on or off your different activities. Itâs not a complete solution, but a pretty good start. That with Roku emulator, and I have a pretty good replacement for my Harmony Elite.
In addition, most of my devices are already available in HA. I can use the Appte TV integration to control content and change volume with the HA Sony integration.
Only issue is those HTTP calls you can hit are completely public, not obfuscated or secured in any way, not even a simple key.
Is the API cloud based or is it possible to handle API calls offline?
I worked out integrating but it is not very great and the Harmony integration is much better.
How did you do it? And how does it work?
Itâs not only cloud based, itâs completely open and public. If anyone gets your particular web address for that call they can control your gear. thereâs no access control or security whatsoever.
Has someone managed to get it working?
Can this be of use for mitigating a solution?
https://thehelpfulidiot.com/fully-local-universal-remote-control-with-home-assistant
I ended up creating a dodgy switch. it is not pretty and has a lot of niggles.
and a dropdown menu helper
as well as group to group all the switches.
and these 3 automations to manage the menu
alias: Sofabaton Menu Automation
description: ""
triggers:
- trigger: state
entity_id:
- input_select.sofabaton_activities
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Watch a Video on NVidia Shield in the Bedroom
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.watch_a_video_on_nvidia_shield
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Watch a Video on AppleTV in the Bedroom
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.watch_a_video_on_appletv
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Watch a Movie in the Bedroom
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.watch_a_movie
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Listen to the Radio in the Bedroom
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.listen_to_the_radio
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Watch TV in the Bedroom
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.watch_tv
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Listen to Net Radio in the Bedroom
sequence:
- action: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.listen_to_net_radio
- conditions:
- condition: state
entity_id: input_select.sofabaton_activities
state: Power Off
sequence:
- action: switch.turn_off
metadata: {}
data: {}
target:
entity_id: switch.sofabaton
- action: system_log.write
data:
level: info
message: "{{ trigger.to_state.state }}"
mode: single
alias: Sofabaton Menu Management Off
description: ""
triggers:
- trigger: state
entity_id:
- switch.watch_a_video_on_nvidia_shield
to: "off"
- trigger: state
entity_id:
- switch.watch_a_video_on_appletv
to: "off"
- trigger: state
entity_id:
- switch.watch_a_movie
to: "off"
- trigger: state
entity_id:
- switch.listen_to_the_radio
to: "off"
- trigger: state
entity_id:
- switch.watch_tv
to: "off"
- trigger: state
entity_id:
- switch.listen_to_net_radio
to: "off"
conditions: []
actions:
- action: system_log.write
data:
level: info
message: "{{ trigger.to_state.attributes.friendly_name }}"
- action: input_select.select_option
target:
entity_id: input_select.sofabaton_activities
data:
option: Power Off
mode: single
alias: Sofabaton Menu Management On
description: ""
triggers:
- trigger: state
entity_id:
- switch.watch_a_video_on_nvidia_shield
to: "on"
- trigger: state
entity_id:
- switch.watch_a_video_on_appletv
to: "on"
- trigger: state
entity_id:
- switch.watch_a_movie
to: "on"
- trigger: state
entity_id:
- switch.listen_to_the_radio
to: "on"
- trigger: state
entity_id:
- switch.watch_tv
to: "on"
- trigger: state
entity_id:
- switch.listen_to_net_radio
to: "on"
conditions: []
actions:
- action: system_log.write
data:
level: info
message: "{{ trigger.to_state }}"
- action: input_select.select_option
target:
entity_id: input_select.sofabaton_activities
data:
option: "{{ trigger.to_state.attributes.friendly_name }}"
mode: single
I hope this helps anyone who wants to emulate the same harmony elite experience in Home Assistant
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.