Skip to content

Network Connection Modes

mrlt8 edited this page Mar 9, 2023 · 1 revision

Like the wyze app, the tutk library has three different modes to connect to the camera and will attempt to stream directly from the camera when on the same LAN as the camera in "LAN mode". If the camera is not available locally, it will either attempt to stream directly from your network using "P2P Mode" or relay the stream via the wyze servers (AWS) in "relay mode".

LAN mode is more ideal as all streaming will be local and won't use additional bandwidth.

LAN Mode

By default, the bridge will attempt to connect via "LAN Mode", but will fallback to other methods if LAN mode fails. You can restrict streaming to LAN only by setting the NET_MODE=LAN environment variable:

environment:
    ..
    - NET_MODE=LAN

P2P Mode

NET_MODE=P2P is ideal when running the bridge remotely on a different network or on a VPS and will allow the bridge to stream directly from the camera over the internet while blocking "Relay Mode".

ANY Mode

NET_MODE=ANY is the equivalent to leaving NET_MODE unset and will allow the connection to fallback to P2P or relay mode.

Per camera NET_MODE

In the event that you need to allow the bridge to access a select number of cameras outside of your LAN, you can specify them by appending the camera name to NET_MODE, where CAM_NAME is the camera name in UPPERCASE and _ in place of spaces and hyphens:

    ..
    - NET_MODE=LAN
    - NET_MODE_CAM_NAME=P2P

Home Assistant

Use NET_MODE to restrict connections for all cameras or CAM_OPTIONS for to restrict a specific camera by adding a new entry for each camera:

- CAM_NAME: Cam Name
  NET_MODE: P2P