Jump to content

Guidance on turning on/off an LG TV (C2 Model) via eisy?


dwengrovitz

Recommended Posts

Posted

Does anyone have any guidance on how to provide basic on/off control of LG OLED TVs (model C2) via eisy?  I looked at AVRemote but unfortunately it doesn't seem to support newer webostv devices. Is there a set of network resource files someone has created that would work?  Or perhaps expose a variable in eisy that an Alexa skill could pick up and run a routine on? 

Posted

Take this as something to try. I've been giving ChatGPT more of a chance on technical solutions. It took a couple of iterations, but I asked it specifically about LG TVs and  ISY network resources.  Here's what it said. Based on my use of network resources, it looks close to try easily:

Name: Turn Off LG TV
Protocol: HTTP
URL: http://192.168.x.x:3000/ir/remote_control
Method: POST
Body: {"type":"KEY_POWER"}

I'll be curious how close it got. I think LG TVs are toggle, meaning the "off" command will also be the "on" command.

This was the whole answer where it was close:

Quote

To turn off your LG TV using the UDI ISY Network Resource, you can leverage the HTTP Request functionality of the ISY994i (or similar ISY model) to send a command to your LG TV over the network. The ISY can be configured to send a RESTful HTTP request, which is exactly how we can communicate with the TV (using the webOS API or a similar network method).

Steps to Turn Off LG TV via ISY994i Network Resource:

1. Ensure Network Access

  • Make sure that your LG TV and ISY controller are on the same network.
  • Obtain your TV’s IP address (as described in the previous response). This is necessary to send commands to the TV.

2. Create an HTTP Request Resource in ISY

The ISY system can issue HTTP requests to control devices on the network. To send a command to turn off the TV, you'll need to use the ISY's HTTP Request network resource.

Here’s how to do it:

  1. Log into the ISY Admin Console:

    • Open your browser and navigate to your ISY’s web interface (usually something like http://<ISY_IP>:8080/.
  2. Navigate to Network Resources:

    • Go to Resources > Network Resources from the left-hand menu.
    • Click on Add Network Resource.
  3. Configure the HTTP Command for Turning Off the TV:

    • Name: Give your network resource a descriptive name like Turn Off LG TV.

    • Protocol: Choose HTTP.

    • URL: Enter the full URL for sending the power-off command to your TV.

      Example for webOS-based LG TVs:

       
      http
      Copy code
      http://<TV_IP>:3000/ir/remote_control

      Replace <TV_IP> with your actual LG TV's IP address.

    • Method: Set to POST.

    • Body (optional): Include the data to simulate pressing the power button on the TV.

      For webOS, the body would look like this:

       
      json
      Copy code
      { "type": "KEY_POWER" }

    Here’s how you should configure it:

    • URL: http://192.168.x.x:3000/ir/remote_control (replace with your TV’s IP).
    • Body:
       
      json
      Copy code
      {"type":"KEY_POWER"}

    Example setup:

    • Name: Turn Off LG TV
    • Protocol: HTTP
    • URL: http://192.168.x.x:3000/ir/remote_control
    • Method: POST
    • Body: {"type":"KEY_POWER"}
  4. Save and Test the Network Resource:

    • Once the Network Resource is configured, click Save.
    • You can now Test the resource by clicking on the Test button. If the TV turns off, the configuration is correct.

3. Use the Network Resource in a Program

Once you have the Network Resource set up, you can use it in a program or an event within the ISY to trigger the power-off command automatically.

  1. Create a New Program:

    • Go to the Programs tab in your ISY Admin Console.
    • Create a new program where you specify the trigger for turning off the TV.
  2. Include the Network Resource in the Program:

    • In the Then section of the program, use the Network Resource you just created.
    • Example:
      • Trigger: "When you press a button on a remote or a certain time of day"
      • Then: "Send HTTP request to turn off the TV."

    Example program flow:

    • IF: (Condition, e.g., a button press, time, or event)
    • THEN: Execute Turn Off LG TV Network Resource.

4. Test the Program

After configuring your program, test it by triggering the event (button press, time, etc.). The TV should receive the power-off command via the network resource and turn off.

Troubleshooting:

  • TV not responding: Ensure that the TV's IP address is correct and that it is reachable from the ISY device.
  • Command not working: Double-check the HTTP request details, especially the URL and JSON body. If your TV’s webOS version differs, the command format might change.
  • Firewall: Ensure there’s no firewall or network setting blocking the request between the ISY and the TV.

 

 
 
 
  • Like 1
Posted

Thanks @paulbates - I tried the instructions you posted but couldn't get it to work as expected for my LG TV. That said, I like the concept of using ChatGPT to come up with a technical solution, though I also realize one cannot necessarily assume the solution will be correct.  

I'll try a few more things to see if I can get control to work via network resources. Worst case, I'm pretty sure I can create a variable or virtual switch in eisy, expose it to Amazon through my.isy.io, and use that to signal an Alexa routine to turn the device on or off. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...