[EDGE] Generic Google TV / Android TV Driver — control any Google TV via SmartThings

Thanks for your findings — this turned out to be a real bug. Two separate issues, both fixed now:

  1. Coming from an app: the Home→Back delay was too tight (1.5s), which could miss the transition when coming from a deeper app screen. Increased to 2.5s.
  2. Starting from fully off: this was the real find — Screensaver (and Home/Back/D-pad, and launching a favorite app) were only checking whether the connection was alive, not whether the TV was actually on. With newer TV firmware/settings that keep Wi-Fi alive in standby, the connection can stay technically “alive” even when the TV is fully off — so the driver would skip straight to the action with no wake-up step at all, and nothing would happen. Fixed by having every action properly wake the picture first (the same nudge that already worked for power-on) whenever the TV isn’t actually on, not just when disconnected.

Please update to the latest driver version and give both scenarios another try — confirmed working reliably on my end across several off→on cycles. Let me know how it goes on your setup!

I started testing the Sony Android TV. Connecting it worked on the first attempt.

2026-08-05T14:40:21.295384151Z DEBUG Generic Google TV  Received event with handler device_lifecycle
2026-08-05T14:40:21.296641526Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> received lifecycle event: infoChanged
2026-08-05T14:40:21.297848942Z DEBUG Generic Google TV  Found DeviceLifecycleDispatcher handler in googletv
2026-08-05T14:40:21.298604901Z INFO Generic Google TV  [googletv] Sony Android TV: infoChanged fired -- ipAddress=192.168.1.103 pairingCode_set=false already_connected=false
2026-08-05T14:40:21.299291526Z DEBUG Generic Google TV  Google TV device thread event handled
2026-08-05T14:40:21.301780484Z INFO Generic Google TV  [googletv-diag] pairing.start: creating tcp socket
2026-08-05T14:40:21.311327901Z INFO Generic Google TV  [googletv-diag] pairing.start: connecting to 192.168.1.103:6467
2026-08-05T14:40:21.322806859Z INFO Generic Google TV  [googletv-diag] pairing.start: connect returned ok=1 err=nil
2026-08-05T14:40:21.325065026Z INFO Generic Google TV  [googletv-diag] pairing.start: wrapping with TLS
2026-08-05T14:40:21.481481567Z INFO Generic Google TV  [googletv-diag] pairing.start: wrap returned tls=true err=nil
2026-08-05T14:40:21.482893609Z INFO Generic Google TV  [googletv-diag] pairing.start: starting TLS handshake
2026-08-05T14:40:21.669137359Z INFO Generic Google TV  [googletv-diag] pairing.start: TLS handshake succeeded, reading peer certificate
2026-08-05T14:40:21.678308026Z INFO Generic Google TV  [googletv-diag] pairing.start: tls:getpeercertificate() = X509 certificate: 0x1abcde
2026-08-05T14:40:21.690613317Z INFO Generic Google TV  [googletv-diag] pairing.start: got peer cert, sending PairingRequest
2026-08-05T14:40:21.720584984Z INFO Generic Google TV  [googletv-diag] pairing.start: raw ack bytes (7): 08 02 10 c8 01 5a 00 parsed_as=request_ack
2026-08-05T14:40:21.722631401Z INFO Generic Google TV  [googletv-diag] pairing.start: got PairingRequestAck, sending our PairingOption
2026-08-05T14:40:21.864878276Z INFO Generic Google TV  [googletv] Sony Android TV: the TV should now be showing a 6-character code -- enter it in the "Pairing code" setting

2026-08-05T14:40:45.585490737Z DEBUG Generic Google TV  Received event with handler device_lifecycle
2026-08-05T14:40:45.586734695Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> received lifecycle event: infoChanged
2026-08-05T14:40:45.587926029Z DEBUG Generic Google TV  Found DeviceLifecycleDispatcher handler in googletv
2026-08-05T14:40:45.588704070Z INFO Generic Google TV  [googletv] Sony Android TV: infoChanged fired -- ipAddress=192.168.1.103 pairingCode_set=true already_connected=false
2026-08-05T14:40:45.591134820Z DEBUG Generic Google TV  Google TV device thread event handled
2026-08-05T14:40:45.694995279Z INFO Generic Google TV  [googletv] Sony Android TV: paired successfully
2026-08-05T14:40:46.028141320Z INFO Generic Google TV  [googletv] Sony Android TV: connected
2026-08-05T14:40:46.440242737Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"switch","capability_id":"switch","component_id":"main","state":{"value":"on"}}
2026-08-05T14:40:46.472170695Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"volume","capability_id":"audioVolume","component_id":"main","state":{"value":13}}
2026-08-05T14:40:46.482582070Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"mute","capability_id":"audioMute","component_id":"main","state":{"value":"unmuted"}}

Volume and Channel + and - operated normally.

The on/off switch was acting strangely.

I turned ST App Switch On and ST App Switch changed state to On but TV was not turning On

2026-08-05T14:57:46.277756285Z DEBUG Generic Google TV  Received event with handler capability
2026-08-05T14:57:46.284277244Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> received command: {"args":{},"capability":"switch","command":"on","component":"main","named_args":{},"positional_args":{}}
2026-08-05T14:57:46.285775744Z DEBUG Generic Google TV  Found CapabilityCommandDispatcher handler in googletv
2026-08-05T14:57:47.610734702Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"switch","capability_id":"switch","component_id":"main","state":{"value":"on"}}
2026-08-05T14:57:47.624338827Z DEBUG Generic Google TV  Google TV device thread event handled
2026-08-05T14:57:51.429714244Z INFO Generic Google TV  [googletv-diag] frame.read: still waiting (wantread), 20s left

then I turned ST App Switch Off but TV now turned On

2026-08-05T14:58:25.261794832Z DEBUG Generic Google TV  Received event with handler capability
2026-08-05T14:58:25.268300040Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> received command: {"args":{},"capability":"switch","command":"off","component":"main","named_args":{},"positional_args":{}}
2026-08-05T14:58:25.269828207Z DEBUG Generic Google TV  Found CapabilityCommandDispatcher handler in googletv
2026-08-05T14:58:25.273737790Z DEBUG Generic Google TV  Google TV device thread event handled
2026-08-05T14:58:25.471529165Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"volume","capability_id":"audioVolume","component_id":"main","state":{"value":13}}
2026-08-05T14:58:25.482580623Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"mute","capability_id":"audioMute","component_id":"main","state":{"value":"unmuted"}}
2026-08-05T14:58:25.940550623Z INFO Generic Google TV  <Device: -- Sony TV ID -- (Sony Android TV)> emitting event: {"attribute_id":"switch","capability_id":"switch","component_id":"main","state":{"value":"on"}}

Thanks for the detailed log — really helpful! Confirmed: the power button on this protocol is a toggle, not a discrete on/off, so pressing “off” while it hadn’t actually turned on flipped it back on instead. Fixed in the latest version — please update and retest an on/off/on/off sequence when you get a chance.

No change to operation

TV stayed Off and ST App Switch stayed On

The only way to turn off the ST App Switch is to first switch on the TV using its own remote control and then can you turn off the ST App Switch.


Is the driver implemented in such a way that it always performs the power-on operation using WOL?

Ive had more success telling the tv to go to you tube then just powering it on. Youtube launches when off regardless.

To be fair though, TCL tv has been hit or miss for me in general, even in Google home I’ve had issues where it claims it’s offline and I can’t get TV controls… But I can cast and then immediately get tv controls.

I sent you a PM

After few version of try and error in PM, seems like your TV is now perfectly responding to ON/OFF.
Let me know if you need anything else. :grinning_face:

I just tested again and I’m still seeing it not work reliably coming from the YouTube app, as an example. Is it working for you?

I sent you a PM

This is just wonderful for smartthings. You are the first person to do this. People have been looking for this for years. Thanks a bunch for the time and initiative.