Well, that sucks! I feel for you man... here's a hug from me
I believe that this is not caused by the driver, most likely there is something at the network level that doesn't work quite right.
What you can try:
In the Hubitat UI, go to Settings -> Network Setup -> Network Test, then ping and traceroute the TV IP. With the TV on, try the commands multiple times to see if the results are consistent:
If you have a Windows PC, download wol.exe from this website. With the TV off, run the following command against it's MAC address. Again, try it multiple times to see if results are consistent:
I don't know much about networking, this is way above my pay grade. Maybe more knowledgeable folks here can help you pinpoint the consistency problem.
I'm sure I know less about networking than you do. I tried Ping host and Traceroute and everything looked normal. I used wol and the TV turned on. I don't think it's a networking issue as the thinq app always turns the TV on. I'm going to keep using wol for a while to see if it works 100% of the time. If it does then it's probably a Hubitat issue.
Another question. The only two Alexa commands recognized on my Echo device is Power on and Power off. For example if I ask Alexa to to increase the volume she responds "LGTV doesn't support that" Do you know if there's any way to add more commands? Thanks
27LQ625S-PU that I use in the Kitchen. It does have Alexa built in but as I said the only two commands that are recognized are power on and power off ( no volume, mute, or channels).
This driver implements the required official capabilities: "Switch", "TV", and "AudioVolume". I believe that the Alexa integration exposes only a subset of capabilities to Alexa, and probably "TV" and "AudioVolume" were not included.
I can add the "SwitchLevel" capability, and Alexa will probably see the TV as a dimmable light, but I'm not sure if "Alexa, increase the TV volume!" will work, even with this change.
I don't use any voice assistents in my house, so I reaaly can't test this.
That's it! When I look at the device list in Alexa the TV is shown as a switch so only on and off is available. Don't worry about it I'll just use the thinq skill in Alexa to control the volume. Thanks.
Once again, awesome work @dandanache. Works great with my 75UN7070PUC.
All the commands seem to work, except:
Set Channel: seems like the argument should be a string instead of a number for DTV channels to work (attribute gets set to e.g. '2-1', '3-5' or '6-1' when using channel up/down).
Set Picture Mode: I get Received error message: category, picture doesn't support the key(s): undefined"
In case anyone is looking for this info, I enabled Network IP Control the following way on this model: first, go to "All Settings"
Released version 1.5.0 with the following changes:
Added
Add "SpeechSynthesis/Speak" command for TTS announcements
Fixed
Changed "Set Channel" to accept string channel number - @hubitrep
The "Speak" command implementation is a bit of a hack: it briefly starts the "Media Player" app on TV to play the mp3 file (generated on the Hubitat hub), so it disrupts the app that is currently running on TV.
If it works 100% from the PC but only 50% from Hubitat, I would look more closely at the network path between Hubitat and TV. What does traceroute utility from Hubitat say?
Thank you for trying it out!
I should probably collect these instructions in the readme file. Thank you for sharing!
I am noticing that the driver wrongly thinks an 'on' command failed some of the time. It seems it may have to do with the 7 second delay after wake-on-lan packets are sent, before attempting to connect the websocket, as the next ping will succeed and show the TV as on and online. I tried changing the delay to 15 seconds and it's more reliable now. Maybe this delay should be configurable as a parameter?
void on() {
log_debug '🎬 Powering on ...'
util_wakeOnLan(getDataValue('wifiMacAddress'))
util_wakeOnLan(getDataValue('wiredMacAddress'))
if (ipAddr) util_wakeOnLan(getMACFromIP(ipAddr))
// Start websocket in 7 seconds
runIn 15, 'connect' // I guess my model doesn't haul ■■■ as much as Dan's
}
When the TV is off, the networkStatus attribute gets set to offline, leading to the "device offline" icon to show up in the device list, home screen and dashboards. I admit I am not a fan of this new hub feature (lots of false positives); here it doesn't feel like it's conveying the right idea... Not sure what to suggest. I might pay more attention if it reflected the failure of the last on command (wake on lan).
More of an FYI than feedback, but 'Set Volume' has no effect when the audio output isn't the TV speaker - well, tbh I only tested toggling between internal speaker and HDMI ARC. Volume up/down works as expected.
Probably unnecessary: command to enable/disable ping from RM (e.g. when away) ?
FYI - this new command, like Start Video, fails on my model with Received error message: not exist.
Can you please first run the "Get All Activities" command, then paste the "Activities" state variable? I suspect that the "Media Player" app has a different id than the one I hardcoded.
Tried turning on the TV this morning using wol first and then the the driver. Both failed. Turning on the TV using the LG thinq app (which uses the network) works 100% of the time. Not sure what's going on.