I have a 2025 LG OLED G5 TV which I am trying to control out of Node Red. I have partially succeded in controlling via IP commands sent to a websocket. One issue is it frequently stops working, then I have to send a register command, then I have a popup on the TV to allow mobile control which I have to accept.
The other issue is I cannot turn the TV on via IP.
Just use a remote controller
If i understand it correctly (looking at home assistant's implementation); turning on can only be done via WOL (wake on lan), you can send a magic packet from node-red.