Closed Mike076 closed 1 year ago
It's possible the mac address is still viable with the leading 0's removed. Here's the issue with more details and errors: https://github.com/klattimer/LGWebOSRemote/issues/107
This is only affecting the latest OLED C2 software update, also if it helps I'm on Mac OS 13.2
Basically if you know Python or if anyone reading this does, please help us out 😄
@Mike076 did the latest fix work for you? I tried upgrading my package but got the same error.
Latest fix for LGWebOSRemote with SSL works, but now lgtv.lua needs to be modified to reflect the ssl command appended to each command. I'm looking at the code but this is a little beyond my expertise. @greyshi can probably tweak it.
I did this locally but now the turn on command isn't working anymore. Maybe another bug.
I’ll play around with this more tomorrow. Lua is pretty simple so maybe I’ll crash course the syntax a bit 😆
Here's what I've been using. Seems to be working well after updating to the latest LGWebOSRemote but haven't tested it for long.
local tv_identifier = "LG TV"
local mac_address = "ab:cd:ef:gg:aa:bb"
local tv_input = "HDMI_2"
local tv_found = (hs.screen.find(tv_identifier) ~= nil)
local debug = false -- Set to true to enable debug messages
if debug then
print("List of all screens: " .. hs.inspect(hs.screen.allScreens()))
if tv_found then print("TV with identifier '"..tv_identifier.."' was detected.") end
end
watcher = hs.caffeinate.watcher.new(function(eventType)
if (eventType == hs.caffeinate.watcher.screensDidWake or
eventType == hs.caffeinate.watcher.systemDidWake or
eventType == hs.caffeinate.watcher.screensDidUnlock) and tv_found then
if debug then print("TV was turned on.") end
hs.execute("/opt/homebrew/bin/wakeonlan "..mac_address)
hs.execute("/opt/lgtv-venv/bin/lgtv MyTV setInput ssl "..tv_input)
end
if (eventType == hs.caffeinate.watcher.screensDidSleep or
eventType == hs.caffeinate.watcher.systemWillPowerOff) and tv_found then
if debug then print("TV was turned off.") end
hs.execute("/opt/lgtv-venv/bin/lgtv MyTV off ssl")
end
end)
watcher:start()
I have just released an update addressing the SSL issue.
TYVM @greyshi and @cmer
LG issued a Jan 24, 2023 update that breaks the functionality of LGWebOSRemote app (https://github.com/klattimer/LGWebOSRemote).
Tony Cassara has discovered that the leading digits of the television’s MAC address are being parsed out. Copying the issue here for visibility since this workflow depends on that Python app working properly.