Android — coming very soon Learn more
← All articles

Control your IPTV from Home Assistant (no cloud, no token)

Expose OneTV Connect as a media_player entity, automate channel changes from your smart home, and react to playback events over local SSE. Setup plus example automations.

Your TV is probably the one screen in the house that never made it into your smart home. OneTV Connect fixes that: it ships a small local HTTP server that Home Assistant discovers on your network and pairs with in a single click. From that point on, your Apple TV behaves like any other Home Assistant media_player — you can read what it's playing, change channels from a dashboard, and wire up automations that react the moment the channel changes. This is real IPTV Home Assistant control, running entirely on your LAN with no cloud and no token.

What the integration does

OneTV Connect embeds a lightweight REST server that exposes the app's current state and channel list as plain JSON, plus a live event stream. When you enable it, the app advertises itself on your local network via Bonjour so Home Assistant can find it automatically — there is nothing to configure by hand. The result is a proper media_player entity in Home Assistant, giving you bi-directional control: read the state on your dashboards, and send commands (change channel, play, pause, stop) from tiles or automations. Because the server pre-encodes its JSON caches, polling it is essentially free — it won't slow down playback on the Apple TV.

This turns your TV into a first-class citizen of the smart home. "Lounge mode at 8 pm", "pause the stream when someone's at the door", "flash the lights when a goal is scored" — all become one-line automations. And it's not limited to Home Assistant: anything that speaks HTTP (iOS Shortcuts, Node-RED, openHAB, a Raspberry Pi script) can talk to the same endpoints.

One-click Bonjour pairing

Pairing is designed to be trivial — no MAC address, no IP, no long-lived token to copy around. Here is the whole flow:

  1. In OneTV, open Settings → Home Assistant and toggle "Expose to Home Assistant". The local REST server and its Bonjour advertisement start immediately.
  2. In Home Assistant, go to Settings → Devices & Services → Add Integration and search for "OneTV Connect".
  3. Your Apple TV shows up in the discovery list within seconds. Click it — pairing is instant, with no token and no manual config.
  4. OneTV now appears as a media_player entity, ready for dashboards and automations.

Bonjour discovery works the same whether OneTV is running on Apple TV, iPhone or iPad, so Apple TV Home Assistant automation is only ever a couple of clicks away.

The media_player entity

Once paired, OneTV is a standard Home Assistant media_player. You get the usual state and attributes you'd expect from a Home Assistant media_player IPTV device:

  • Stateplaying, paused or idle, so automations can branch on whether the TV is actually in use.
  • media_title and media_artist — the current programme and channel metadata.
  • media_image_url — artwork for the running programme, ready to drop into a Lovelace card.
  • source and source_list — the current channel name plus the full list of channels, so you can build a channel picker straight from the entity.
  • Services — the standard media_play, media_pause, media_stop and media_next_track, which you can call from a tile or an automation.

Example automations

Because it's a normal entity, you write automations exactly the way you already do. A classic one: pause whatever's on the TV when the doorbell rings.

automation:
  - alias: "Pause IPTV when the doorbell rings"
    trigger:
      - platform: state
        entity_id: binary_sensor.front_doorbell
        to: "on"
    condition:
      - condition: state
        entity_id: media_player.onetv_connect
        state: "playing"
    action:
      - service: media_player.media_pause
        target:
          entity_id: media_player.onetv_connect

Another favourite for match nights — set the mood the moment a sport channel starts playing:

automation:
  - alias: "Match-time lights"
    trigger:
      - platform: state
        entity_id: media_player.onetv_connect
        attribute: source
        to: "beIN Sports 1"
    action:
      - service: light.turn_on
        target:
          entity_id: light.living_room
        data:
          brightness_pct: 30

From here it's just building blocks: switch to the news channel at 8 pm with media_player.select_source, mute the whole floor when playback starts, or push a notification when the TV has been idle for an hour.

Reacting to playback events over SSE

Polling every few seconds is fine, but OneTV also pushes a live event stream so your automations can fire the instant something happens. The REST server exposes a Server-Sent Events endpoint that emits an event as soon as the channel changes, playback starts or stops, or a sport context is detected — with sub-second latency. Instead of Home Assistant asking "what's on now?" ten times a minute, OneTV tells it the moment the answer changes.

In practice the media_player state and attributes update from these pushes, so the automations above react in real time — the lights dim as the match kicks off, not five seconds later. If you want to consume the raw stream yourself (for Node-RED or a custom script), you can subscribe to the SSE endpoint directly and act on each event.

Privacy: all local, no cloud

Everything here happens on your own network. OneTV's REST server only listens on the LAN — there is no exposed token, no cloud relay and no third party in the loop. Home Assistant talks straight to your Apple TV over the local network, and your viewing state never leaves your home. That's a deliberate design choice: a TV that's part of the smart home shouldn't come at the cost of shipping your habits to someone else's server.

That's the whole thing — a scriptable TV that plugs into the smart home you already run. Dig into the full endpoint list on the Home Assistant integration page, see how OneTV runs on the big screen on the Apple TV page, or grab the app on the App Store. Stuck on discovery? The support page has the network checklist.