Successfully Integrating Vizio TV with Node-RED for Media Source Automation

Hey everyone, I wanted to share my recent success in integrating my Vizio TV with Node-RED to create a media source-based automation. I’ve been using the Vizio Smartcast integration in Home Assistant for a while now, and it’s been working like a charm. However, I ran into an issue when trying to automate actions based on the current media source of my TV. Specifically, I wanted to trigger certain routines when the TV switches to HDMI-2, which is where my gaming console is connected.

Initially, I wasn’t sure how to extract the current source information from the Vizio integration within Node-RED. After some digging and experimentation, I figured out that the vizio service exposes a get_volume command, which also returns the current input source. From there, I could parse the source and use it to trigger my desired automations.

Here’s a quick breakdown of what I did:

  1. Identify the Source: I used the vizio.get_volume service in Node-RED to retrieve the current input source of the TV.
  2. Parse the Data: The response includes the current source, which I extracted and stored in a variable.
  3. Trigger Automation: I set up a condition to check if the source matches HDMI-2. If it does, I trigger a sequence of actions, like adjusting the lighting or enabling game mode.

This setup has been working perfectly for me, and I’m thrilled with how seamless it is. I’d love to hear if anyone else has similar automations or tips for improving this further. Happy automating! :rocket: