Sean Becker

LG TV Wake on LAN

NodeJS script to wake LG (WebOS) TV over LAN

Published on Jun 21 2024

Just looking for code? You can find that here.

Background

Part of the challenge while working at Fubo is that we maintain several SmartTV applications. In order to reduce the overhead of maintenance we rely on tooling, one of which is the ares-cli. Unfortunately this CLI doesn't expose functionality to wake a TV up over the network, which is problematic for test automation. It also means that I need to get up from my desk to turn on my TV before launching a debug version of our application.

Solution

I found several sources that wake LG over the network such as

Both of these solutions are embedded in bigger systems so I decided take the code from Console.cpp and convert it to javascript. This can be quickly ported to another language using a good LLM like ChatGPT or Claude.

You can find the javascript code here.