Products · By quote

An ESP32 Tuya gateway that controls devices locally

An ESP32 hub with Wi-Fi, Zigbee and Bluetooth LE radios. It talks to Tuya plugs, bulbs and sensors on your own network and hands control to Home Assistant or your app over MQTT and HTTP. We designed it for a client and shipped 1,750 units.

  • Switches respond on the local network, so they keep working when the internet is down.
  • More than 50 Tuya devices per gateway over Wi-Fi 2.4 GHz, Zigbee and Bluetooth LE.
  • Supplied as is or adapted to your product, with the firmware open or closed as you prefer.
ESP32 Tuya gateway in its enclosure
The gateway: ESP32 module, Wi-Fi 2.4 GHz, Zigbee and Bluetooth LE radios in one box.
  • 50+Tuya devices controlled by one gateway
  • 3 radiosWi-Fi 2.4 GHz, Zigbee, Bluetooth LE
  • 1,750units of the client version shipped
  • 4 monthsfrom kickoff to the first production batch

What the gateway does

Tuya makes the Wi-Fi and Zigbee modules inside many white-label smart plugs, bulbs and sensors. Out of the box those devices answer only to the Tuya cloud. This gateway sits on your network and takes that job over.

Local control without the Tuya cloud

The gateway speaks to Tuya devices over your own network, so a switch command does not travel to Tuya's servers and back. Commands arrive faster, and lights and plugs keep working during an internet outage. We have not tested first-time pairing without a Tuya account, so plan to have one for setup.

  • Tuya local
  • Works offline
  • Pairing needs a Tuya account

Wi-Fi, Zigbee and Bluetooth LE in one hub

Tuya and Zigbee are not the same thing. Tuya is a brand of modules and a cloud; Zigbee is a low-power mesh radio that some of those modules use. Tuya Zigbee sensors need a gateway with a Zigbee radio, and this one has it, next to 2.4 GHz Wi-Fi for the Wi-Fi devices and Bluetooth LE for pairing. One box handles more than 50 devices.

  • Wi-Fi 2.4 GHz
  • Zigbee
  • Bluetooth LE

Home Assistant, MQTT and HTTP

The gateway integrates with Home Assistant, and it exposes MQTT and HTTP APIs for any other system. A product company can point it at its own backend, and a Rainforest IoT connection is an option when you want hosted dashboards and firmware updates without running a server.

  • Home Assistant
  • MQTT
  • HTTP API
  • Rainforest IoT optional

A hub for your own product

We built this gateway for a client who sells Tuya-based devices under their own brand and needed a hub to match. The radio is a pre-certified module, which shortens the path to FCC and ISED approval for the finished product. We can supply the gateway as is, change the enclosure or firmware, or deliver the firmware as open source.

  • Pre-certified module
  • Custom enclosure
  • Open or closed firmware

Where control lives

Devices on the left pair with the gateway over the radio they were built for. The gateway runs the rules and passes state to whatever you choose on the right: Home Assistant, your own app over MQTT or HTTP, or Rainforest IoT.

The Tuya cloud is the dashed path at the bottom. It is there if you want the Tuya app as well, and the gateway does not need it to switch a plug.

A Tuya device on your network is usually one of these white-label plugs, bulbs or sensors. The gateway lists each one it has paired, so you can see what is talking.

How the Tuya gateway sits between Tuya devices and the system that controls themTuya Wi-Fi plugs and bulbs, Zigbee sensors and Bluetooth LE devices connect to the gateway over its three radios. The gateway talks locally to Home Assistant, to your own app over MQTT or HTTP, or to Rainforest IoT. The Tuya cloud is shown as a dashed, optional path: control does not depend on it.TUYA DEVICESGATEWAYWHERE CONTROL LIVESWi-Fi plugs and bulbsTuya Wi-Fi modules, 2.4 GHzZigbee sensorsdoor, motion, temperatureBluetooth LE devicespaired through the gatewayESP32 gatewayWi-Fi 2.4 GHzZigbee radioBluetooth LErules run on the boxHome Assistantlocal integrationYour own appMQTT or HTTP APIRainforest IoThosted by Maxlab, optionalTuya cloudoptional, not needed for controlswitches keep working when the internet is down
Three radios in, three ways out. The cloud is optional.

Specification

ItemGateway
ProcessorESP32, pre-certified radio module
Wi-Fi2.4 GHz
ZigbeeYes, for Tuya Zigbee sensors and devices
BluetoothBluetooth LE for device pairing
Devices per gatewayMore than 50
ControlLocal, on your network; Tuya cloud optional
APIsMQTT and HTTP; Home Assistant integration
PlatformOptional connection to Rainforest IoT
FirmwareOpen or closed source, as the customer prefers
AvailabilityBy quote, as is or adapted to your product
The client gateway project: four months from kickoff to 1,750 units shipped0–1 months: Requirements and board design, radios, enclosure, Tuya local API; 1–2.5 months: Prototypes and firmware, pairing, local control, MQTT and HTTP; 2.5–3.5 months: Pilot batch and fixes, field units with the client; 3.5–4 months: Production, 1,750 units shippedFour months from kickoff to 1,750 unitskickoffmonth 1month 2month 3month 4Requirements and board designradios, enclosure, Tuya local APIPrototypes and firmwarepairing, local control, MQTT and HTTPPilot batch and fixesfield units with the clientProduction1,750 units shipped
The client project behind the gateway, by month.

Built for a client in four months

The gateway started as a client project: a company selling Tuya-based devices needed its own hub. Four months after kickoff the first production batch left the factory, and 1,750 units have shipped since.

The same board and firmware are what we offer here. If your product needs a different enclosure, another radio or your own cloud, that is a change to a working design rather than a new one. The work page has the project write-up and the cost and timeline guide shows what each stage usually takes.

How it fits with our other products

The gateway is one of four things we sell. Tokay Lite and Tokay Pro are cameras that run detection on the device; Rainforest IoT is the hosted platform that collects data from all of them. A gateway and a camera on the same site can report to the same dashboard, because both send MQTT or HTTP.

If you need the gateway as part of a larger device, the services page describes how we take a board from requirements through certification to a factory in Canada, the US or Asia.

Status
By quote; as is or adapted
Firmware
Open or closed source, your choice
Radio approvals
Pre-certified module; end product still needs its own emissions test
Questions
hi@maxlab.io, +1 587 557 5865
The Tuya gateway next to a Tuya smart plug

Ask about quantity or a variant

Send the number of gateways, which Tuya devices they must handle and whether you want Home Assistant, your own backend or Rainforest IoT behind them. We reply within 24 hours with price and lead time.

Or email hi@maxlab.io. The project write-up is on the work page.

Common questions

Does the gateway work without the Tuya cloud?

It controls Tuya-compatible devices over your local network, so switches respond without a round trip to Tuya's servers and keep working when the internet is down. We have not tested first-time pairing without a Tuya account, so plan to have one during setup.

Can Tuya devices run locally at all?

Yes, with a hub that speaks the Tuya local protocol on your network. That is what this gateway does: it pairs with the plugs, bulbs and sensors, keeps their keys and sends commands directly, so the Tuya app and cloud become optional.

Does it work with Home Assistant?

Yes. It integrates with Home Assistant and also exposes MQTT and HTTP APIs for other systems.

Does it support Zigbee devices?

Yes. It has a Zigbee radio alongside 2.4 GHz Wi-Fi and Bluetooth LE for pairing.

Are Tuya and Zigbee the same thing?

No. Tuya is a company that makes the radio modules and cloud inside many white-label smart devices. Zigbee is a low-power mesh radio standard. Some Tuya devices use Wi-Fi and some use Zigbee; the Zigbee ones need a gateway with a Zigbee radio, which this one has.

What is a Zigbee gateway?

A box with a Zigbee radio that forms the mesh, pairs sensors and switches to it and bridges them to your network. Zigbee devices cannot join Wi-Fi on their own, so without a gateway they are unreachable. This gateway combines that Zigbee radio with Wi-Fi and Bluetooth LE in one unit.

How many devices can one gateway handle?

More than 50 devices per gateway.

What is a Tuya device?

Tuya makes the Wi-Fi and Zigbee modules inside many white-label smart plugs, bulbs and sensors. They pair through the Tuya Smart or Smart Life app and are cloud-controlled by default; a Tuya device on your network is usually one of these.

How do I set it up?

Power the gateway, join it to your Wi-Fi and pair each Tuya device to it over Bluetooth LE or Zigbee. Then connect Home Assistant to the gateway or point your own software at its MQTT or HTTP API. Pairing currently needs a Tuya account.

Is the firmware open source?

It depends on the project: we can deliver the firmware as open source or keep it closed, as the customer prefers.

Is the gateway certified?

Its radio is a pre-certified ESP32 module that carries its own FCC, ISED and CE approvals. A product built on the gateway can rely on those (modular approval) but still needs its own emissions test, such as FCC Part 15B. We can run that as part of a custom project.

Can I buy the gateway?

Yes, by quote. We supply it as is or adapt it for your product; contact us with your quantity.