I loved my Harmony remote right until the unfortunate moment it slipped from my grasp, crashing onto the ground and shattering the screen, leaving only half of the LCD functional. This incident occurred just a month after learning that Logitech would discontinue its line of remotes, presenting me with a dilemma: either purchase another soon-to-be-obsolete remote or explore other options.
Being deeply involved in the Home Assistant ecosystem, I opted to support the Unfolded Circle —formerly YIO— Remote 2 towards the end of 2021. Despite anticipating its arrival by 2022, supply chain disruptions due to COVID postponed its delivery until late 2023. Eager to streamline my home theater setup without resorting to multiple remotes, I decided to give HDMI-CEC another chance, despite having dismissed it as ineffective years earlier.
To my surprise, significant improvements had been made to the specification, and I found myself genuinely appreciating them. The convenience of starting my TV with an AirPlay session or start playing my PS5 using just the controller was remarkable. I soon realized how much I had missed this functionality when configuring my new remote. This realization led me to write this guide, aiming to combine the conveniences of HDMI-CEC with the capabilities of a smart remote.
Time to Setup!
To begin, you’ll need the following components in your setup:
- Unfolded Circle Remote 2
- Home Assistant with Unfolded Circle Integration
- AV Receiver
Your AV Receiver should support two key functions: HDMI-CEC and displaying its current state in Home Assistant. The latter is crucial for setting the state of our remote.
To get started, set up your remote as usual without HDMI-CEC. Create your own activities and group them for those connected to your AV Receiver. Set up the Unfolded Circle integration in Home Assistant, ensuring you can view your activity groups dropdown on the device page.
Next, enable HDMI-CEC on all devices except for your TV or Projector, as we only want these devices to be controlled by our remote. In this state, everything should work when initiated from the remote. However, when triggered by an HDMI-CEC command, everything except the TV or Projector should start up or shut down, depending on the command.
Now, it’s time for the magic… Linking the source of the AV receiver to an activity on our Unfolded Circle Remote. So, when we start, for example, an AirPlay session, both the Apple TV and AV Receiver will start up and be set to the correct source. This action is then detected by Home Assistant, which triggers the appropriate activity on your remote. Now that’s what I call magic!
We can achieve this in one of two ways: using Home Assistant’s own automations or Node-Red. To kickstart your automation, I’ve provided blueprints for both scenarios. Note that these only cover two activities, so feel free to expand either the choose action or switch flow to suit your needs.
Node-Red Flow
Please copy the following JSON with the button in the top right of the code block. Then import into Node-Red by using the CTRL/CMD+I
shortcut.
[{"id":"a8dc27e72cca3793","type":"server-state-changed","z":"0c1d62c744c6ad40","name":"AV Receiver","server":"2b31bb09.e9b694","version":5,"outputs":2,"exposeAsEntityConfig":"","entityId":"","entityIdType":"exact","outputInitially":false,"stateType":"str","ifState":"on","ifStateType":"str","ifStateOperator":"is","outputOnlyOnStateChange":false,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":310,"y":1240,"wires":[["a8164524811d3400"],["c34da1273d400680"]]},{"id":"a8164524811d3400","type":"switch","z":"0c1d62c744c6ad40","name":"","property":"data.new_state.attributes.source","propertyType":"msg","rules":[{"t":"eq","v":"AV Source 1","vt":"str"},{"t":"eq","v":"AV Source 2","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":1220,"wires":[["5b3634d431414ef2"],["3df9095529c1d51c"]]},{"id":"c34da1273d400680","type":"api-call-service","z":"0c1d62c744c6ad40","name":"Power Off","server":"2b31bb09.e9b694","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":["Remote"],"data":"{\"option\":\"Power Off\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":480,"y":1260,"wires":[[]]},{"id":"5b3634d431414ef2","type":"api-call-service","z":"0c1d62c744c6ad40","name":"Start Remote Activity 1","server":"2b31bb09.e9b694","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":[],"data":"{\"option\":\"Activity 1\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":670,"y":1200,"wires":[[]]},{"id":"3df9095529c1d51c","type":"api-call-service","z":"0c1d62c744c6ad40","name":"Start Remote Activity 2","server":"2b31bb09.e9b694","version":5,"debugenabled":false,"domain":"select","service":"select_option","areaId":[],"deviceId":[],"entityId":[],"data":"{\"option\":\"Activity 2\"}","dataType":"json","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":670,"y":1240,"wires":[[]]},{"id":"2b31bb09.e9b694","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
Home Assistant Blueprint
Only thing to do now is relax, sit back, and enjoy your streamlined home theater experience!