The LG webOS TV driver for Hubitat enables you to control your LG webOS television directly from your Hubitat smart home system. This driver supports a wide range of functionalities, allowing you to turn your TV on and off, adjust volume, change channels, and launch applications seamlessly. With this integration, you can create automated routines and enjoy a smarter entertainment experience.
Description
This driver provides the following capabilities:
Switch: Control the power state of the TV (on/off).
AudioVolume: Adjust and monitor the TV volume.
Media Input Source: Change the input source of the TV.
Refresh: Update the TV’s current status.
Actuator: Represents the TV as a controllable virtual device.
WOL: is built in and just works
No extra app or driver: no discovery or separate WOL app needed. just one clean driver that shows up when adding a virtual device
Attributes:
Channel: Displays the current channel.
Media Input Source: Shows the active input source.
Mute: Indicates whether the audio is muted.
Volume: Reports the current volume level.
Key Features:
Connects via WebSocket for real-time control.
Custom commands for launching apps and sending button presses.
Pairing key management for secure connections.
Debug logging for troubleshooting and monitoring.
Installation Instructions
Step 1: Prepare
Enable External Device Control on your TV: Settings -> Devices -> External Devices -> Enable on with WiFi and On with Mobile
Enable static IP and note IP/MAC addresses: Settings -> Network -> Connection (Wired/WiFi) -> Other network -> Advanced W-Fi Settings -> Edit (use the same ip and Mac address that you see before clicking "Edit" -> save. this will ensure your IP is static without needing to set it on your router. You can also just do this on your router if you know how to.
Step 2: Install the Driver
Log into your Hubitat Dashboard.
Navigate to Drivers Code under the Apps section.
Click on New Driver.
Copy the entire driver code provided above and paste it into the code editor.
Click Save to create the driver.
Step 3: Add the Device
Go to Devices in the Hubitat Dashboard.
Click on Add Device. (virtual)
Select LG webOS TV from the list of available drivers.
Enter your TV’s IP address and MAC address when prompted.
Set the following preferences:
Pairing Key: Leave this blank initially; it will be populated automatically after pairing.
Enable Debug Logging (optional): Useful for troubleshooting.
Save
Step 4: Initialize the Device
After pairing, navigate to the device page for your LG webOS TV.
Click Initialize
you should get a prompt on your tv asking you to allow control using the external device
One you allow this, the pairing key should populate in Hubitat.
Click save again
Step 4: Use Your TV with Hubitat
You can now control your LG webOS TV through the Hubitat dashboard or via automations.
Use commands to turn the TV on/off, adjust volume, change channels, and launch apps directly from your smart home setup.
If you experience any issues, enabling debug logging can provide insights for troubleshooting. Enjoy your enhanced home entertainment experience!
@mrferreira89, I'm having similar struggles as @nclark. I wonder if it is because I already used an older HE - LG webOS integration that has since stopped working, but can't figure out if the LGTV integration needs to be reset somehow? I'm not getting the on-screen confirmation request when configuring via this driver, though I have in the past with older, now defunct integrations. Also I never get the pairing key to populate automatically. My debug logs are same as @nclark's.
Also, the instructions in the OP, if I understand them correctly, seem inconsistent. Step 2, item 4 says to enter the IP and MAC. But then Step 3, Item 2 also says to enter the TV's IP and MAC. Can you clarify? Maybe I'm doing it wrong -- though I've tried every permutation I can think of. @JPV, what was your process?
@mluck
I just followed the steps as outlined... And it just worked
Pairing key populated immediately.
My only issue is
I can control the TV via this app ie turn the TV on and off
But..
The TV is not updating this app ie the TV has been turned on via tv remote but with this app it is in off mode and the opposite.. TV off via tv remote.. app is still on
Haven't investigated further..as my work is interfering
hey did you enable mobile device control via wifi on your tv? also make sure to double check the Mac address and ip. finally, did you set a static ip on your router?
hey sorry for the instructions. I used chatgpt to write them lol. I'll clean them up after this reply. but I would say the same as I said to the other guy. make sure your tv is set to allow wifi devices to control it. and make sure to set a static ip. you can do this on your tv or on your router. either is fine.
thanks for this feedback. I didn't think to check that because I dont need current state for my use. but I will see if I can fix that sometime this weekend
I just checked - current state does not update when turned on/off using controller. I am not sure if there is a way for the tv to send that status to Hubitat but I can try and will keep you posted. it does however update current state if turned on/off via Hubitat.
can I ask what your use case is for current state status updating with remote control? just in case there might be a workaround
Yep my TVs are all setup to allow wifi and they all use a static ip, so I'm confused. Any other ideas?
fwiw the prior community integration that I believe is no longer working provided state updates to the driver so I assume it's possible -- or at least was possible lol.
Yes both MAC and IP confirmed right by checking on the TV AND the router and yes it is a reserved IP as all my IOT devices are.
I tried other integrations and none ever worked, I guess I'll need to try and see if I can even use an app on my phone first of all and then try this integration again.
even if the state is off while the tv is actually on; pressing the off button in Hubitat will still send the command to turn the tv off regardless of the state. I suppose the state is useful if you are building if statements. but. let me know if that is helpful to know
could be! not sure if this matters but I have internet access disabled on my router for the tv. it can access local only. I don't want any automatic updates breaking the integration. I also made sure to update to latest version before installing this