Previous: , Up: Transports   [Contents]


6.3.6 tuya-gateway

Warning: like tuya-direct, this transport targets Tuya devices on the LAN (here via a hub), but it has not been tested end-to-end yet. The devices available during development did not expose a local connection, so the plugin could not be exercised against real hardware.

Same framing and DPS JSON shape as tuya-direct, but the TCP peer is a Tuya LAN hub. In addition to the direct options, configure the hub and sub-device identifiers:

<transport id="tuya-gw-rx" plugin="tuya-gateway">
  <socket-group>hub-1</socket-group>
  <host>192.168.1.60</host>
  <port>6668</port>
  <device-id>REPLACE_DEVICE_ID</device-id>
  <local-key>0123456789abcdef</local-key>
  <gateway-id>REPLACE_GATEWAY_ID</gateway-id>
  <cid>REPLACE_SUBDEVICE_CID</cid>
  <mode>read</mode>
</transport>
gateway-id

Hub / gateway device id (required for tuya-gateway).

cid

Sub-device client id on that hub (required for tuya-gateway).

All other elements match tuya-direct (host, local-key, socket-group, protocol-version, heartbeats, and so on). <gateway-id> and <cid> are rejected on tuya-direct.