Zigbee2mqtt: How to add support for a new Tuya-based device (part 1)

Daniel Zegarra
3 min readApr 11, 2020

--

TL;TR;
If you’re only interested in the technical details, I recommend you skip to the 2nd part of this article.

Zigbee2mqtt is an amazing open-source project that aims to replace your Zigbee gateway with a fully customizable Zigbee Coordinator (that’s the technical term).

It was a fastly growing catalog of supported devices that are created by the same users.

In Poland, where I live, hot water is moved through special pipes that extrude from the walls and feed holed radiators. Each radiator has a mechanic valve capable of limit the current of water passing through the radiator based on the setting chosen by the user and the temperature of the room. These are quite ingenious devices. I recommend you to see this clip where is explained how they work.

I recently acquired 4 Siterwell “smart” radiator valves for my home. I have nothing against the mechanical valves but, wanted to control the temperature of the rooms based on pre-defined schedules, and shut them down when the windows are opened or when nobody is at home. But ultimately, what I wanted was to control the temperature of my house from my existing Home Assistant server.

The TRVs (Thermostatic Radiator Valve) that I acquire are the Siterwell GS361 devices. I could barely found information about these devices on the Internet. That worried me of course. But I was able to find a few comments about this device from buyers and verified that this product did indeed received a reddot award in 2019. I believed they were merely sold in China at the moment I wrote this article.

The only place where I found they were sold was on Alibaba. They were cheap. So I decided to give it a try. After contacting the buyer and agree on the shipping terms and price, I made the payment and the package arrived at my door via DHL, just after pay the import taxes.

My first impression was not great. Each device came on its own generic-white box and all 4 boxes packaged inside a printer toner carton box.

Clearly they didn’t care much for the first impression. Inside each box thought the TRV was in good shape, looking more plastic and cheaper than the pictures, yes, but with an adapter for Danfoss valves, batteries included and a manual in English.

Soon after installing the first valve, I realized the mistake I made by not buying the Tuya gateway the seller offered me during the quoting. I already had a CC2531 USB dongle flashed with the required firmware to use it with Zigbee2mqtt, but after spending an entire day trying to figure out how to “teach” zigbee2mqtt how to talk with these new Zigbee devices, I finally give up and bought the fucking Tuya gateway.

Then I just had to wait for it to arrive, install it, pair it with the TRV, and sniff their communication so then I could teach zigbee2mqtt how to replicate the commands interchanged between both.

That also resulted in an adventure more challenging than I expected.

This article was only the introduction. I’ll go more technical in the next part.

--

--