Adding new ("Tuya compatible") ZigBee device.

83 views
Skip to first unread message

Wyszków On

unread,
Jul 3, 2025, 2:13:55 PMJul 3
to TasmotaUsers
Hi there, 
I just got an electric valve for gardening. It is described as "for Tuya", but it is ZigBee, not WiFi device. Sold in Poland under brand "RTX".
It pairs with Tasmota32 powered Chinese Eth -WiFi-ZB gateway, and reacts to button press (can hear valve changing state).

Now on console I have grabbed following output, on pressing button once, wait few seconds and pressing it again:

18:51:22.643 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","EF00/0365":"00:47:53","Endpoint":1,"LinkQuality":94}}}
18:51:26.142 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","EF00/026A":0,"Endpoint":1,"LinkQuality":94}}}
18:51:26.292 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","EF00/0267":0,"Endpoint":1,"LinkQuality":94}}}
18:51:26.441 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","EF00/0102":0,"Endpoint":1,"LinkQuality":94}}}
18:51:26.592 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","EF00/0366":"00:47:57","Endpoint":1,"LinkQuality":94}}}
18:51:26.792 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","EF00/0372":"00:00:04,0","Endpoint":1,"LinkQuality":92}}}

How can I make valid trigger on valve on/off, possibly water counter too (seller says it is equipped), and how to make commands to switch valve?

One of the time-looking counters is like device uptime, other one as ON state time.

Do I have to use Berry, or simple rules?

Laurent 

Philip Knowles

unread,
Jul 4, 2025, 4:45:57 AMJul 4
to Wyszków On, TasmotaUsers
With ZigBee start with Blakadder here

Zigbee ID: TS0601 | _TZE200_akjefhj5 | _TZE200_81isopgh - RTX ZVG1 compatibility with third party gateways

Then try the zigbee2mqtt link (if there isn't a Tasmota link)

From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Wyszków On <wyszk...@gmail.com>
Sent: Thursday, July 03, 2025 19:13
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Adding new ("Tuya compatible") ZigBee device.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/sonoffusers/CAD796rkSKMBAHFwjLE-pkP4a6MaXt_3y2xOkR0ansnwFtNrmZw%40mail.gmail.com.

Wyszków On

unread,
Jul 4, 2025, 10:14:37 AMJul 4
to TasmotaUsers

---------- Forwarded message ---------
Od: Wyszków On <wyszk...@gmail.com>
Date: pt., 4 lip 2025, 16:13
Subject: Re: Adding new ("Tuya compatible") ZigBee device.
To: Philip Knowles <knowles...@gmail.com>


Hi Philip, 
How this blakadder page could help me?
What is ZB Id to obtain from live device, and where should I use this?

I have tried 2 zbsend commands:

5:53:38.108 CMD: zbsend { "device":"0x312c","send" : { "state": "on"}}
15:53:38.114 MQT: stat/tasmota_81CDB4/RESULT = Nieznana komenda zigbee: state

Answer is: unknown ZigBee command: state,

zbsend { "device":"0x312c","send" : { "power": "1"}}

Answer is:

16:05:07.765 MQT: stat/tasmota_81CDB4/RESULT = {"ZbSend":"Done"}
16:05:10.012 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","Reachable":false}}}

But on main page it is not graded out and time shows 00m.

Quite confused, how what I see on console translates to ZB terms.

Could You help with transformation files? (*.ZB), how to write on for device?

Laurent 

Wyszków On

unread,
Jul 4, 2025, 10:58:00 AMJul 4
to TasmotaUsers, Philip Knowles
Coul You explain, on zbreceived output in first post, 
which part of "cryptic hex" is cluster, command and other ZB items?

Laurent 

Wyszków On

unread,
Jul 4, 2025, 2:37:59 PMJul 4
to TasmotaUsers, Philip Knowles
Tried zbinfo, ZB device ID is the same (as ZVG1), Manufacturer a bit different:

"Device":"0x312C","Name":"Elektrozawór 1","IEEEAddr":"0xA4C1383FFDE74C2A","ModelId":"TS0601","Manufacturer":"_TZE204_a7sghmms","Endpoints":[1],"Config":["~01.1"],"Reachable":true,"LastSeen":7963,"LastSeenEpoch":1751645513,"LinkQuality":107}}}
20:24:36.423 MQT: stat/tasmota_81CDB4/RESULT = {"ZbInfo":"Done"}

So I think I can get most important info for building *.zb file -> info which device it applied to 
Now harder task to transform Tuya cryptic hex into something usable.

Laurent 

Wyszków On

unread,
Jul 4, 2025, 3:15:43 PMJul 4
to TasmotaUsers, Philip Knowles
Ok, I think that beginning of ZVG1.zb should be as this:

#Z2Tv1
:TS0601,_TZE204_a7sghmms
EF00/0102=

Now I guess it is open/close state of the valve, what cluster ID / attributeID should I map it to?
Looks it boolean value with dpip 02, corresponding values are 0 and 1.

Where (link) are tables with defined clusterid / attributesid? Is it standardized?

Laurent 

Wyszków On

unread,
Jul 4, 2025, 4:31:26 PMJul 4
to TasmotaUsers, Philip Knowles
A little progresses:

Made ZVG2.zb file on gateway as:

#Z2Tv1
:TS0601,_TZE204_a7sghmms
EF00/0102,WaterState

Zbload ZVG2.zb 

And now zbreceived shows "WaterState" instead of cryptic hex.

22:22:10.044 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","WaterState":1,"Endpoint":1,"LinkQuality":105}}}

But I still can't control device, tried: 

zbsend { "device":"0x312c","send" : { "WaterState": "1"}}

"Unknown ZigBee command: WaterState.

(as it worked with command Power with Sonoff ZBminiL2 miniL.)

What else do I need? Some mapping to clusterid/attributeID known already (standardized?) to Tasmota?

And also nothing appears on main page near device name.

Laurent 

Philip Knowles

unread,
Jul 4, 2025, 11:40:18 PMJul 4
to Wyszków On, TasmotaUsers
I presume you are seeing this information on the ESP32 device? You need to look on the Blakadder site and find the RTX device. It will tell you the Tuya model type. If there isn't a T2Z profile look at the other similar devices which DO have a T2Z profile and try that as a starting point. You can then compare the Zigbee2MQTT plugins to refine yours.



From: Wyszków On <wyszk...@gmail.com>
Sent: Friday, July 4, 2025 9:31:07 PM
To: TasmotaUsers <sonof...@googlegroups.com>; Philip Knowles <knowles...@gmail.com>

Philip Knowles

unread,
Jul 5, 2025, 2:19:45 AMJul 5
to Wyszków On, TasmotaUsers
You could try the following which I cobbled from Blakadder - no guarantees it will work
#Z2Tv1
# RTX Irrigation Valve ZVG1
:TS0601,_TZE200_akjefhj5
EF00/0101,WaterMode                 # duration=0 / capacity=1
EF00/0102,WaterState                # off=0 / on=1
EF00/0365,IrrigationStartTime       # (string) ex: "08:12:26"
EF00/0366,IrrigationStopTime        # (string) ex: "08:13:36"
EF00/0267,CycleIrrigationNumTimes   # number of cycle irrigation times, set to 0 for single cycle
EF00/0268,IrrigationTarget          # duration in minutes or capacity in Liters (depending on mode)
EF00/0269,CycleIrrigationInterval   # cycle irrigation interval (minutes, max 1440)
EF00/026A,CurrentTemperature        # (value ignored because isn't a valid temperature reading.  Misdocumented and usage unclear)
EF00/026C=0001/0021,mul:2           # match to BatteryPercentage
EF00/026F,WaterConsumed             # water consumed (Litres)
EF00/0372,LastIrrigationDuration    # (string) Ex: "00:01:10,0"

By the way, it should be
zbsend { "device":"0x312c","send" : { "WaterState": 1}}
not
zbsend { "device":"0x312c","send" : { "WaterState": "1"}}


From: Wyszków On <wyszk...@gmail.com>
Sent: Friday, July 04, 2025 21:31

To: TasmotaUsers <sonof...@googlegroups.com>; Philip Knowles <knowles...@gmail.com>

Wyszków On

unread,
Jul 5, 2025, 7:25:19 AMJul 5
to Philip Knowles, TasmotaUsers

Ok, tried this, except mfgid/zbid different (:TS0601,_TZE204_a7sghmms) result:
(almost?) All reports come in readable text, BUT on main gateway www there is no reflection of valve current state, AND 

zbsend { "device":"0x312c","send" : { "WaterState": 1}}

Reports: unknown ZigBee command: WaterState.

IF I use line like this:
EF00/0102=0006/8000
Device reports current status on main page, but trying to send:
zbsend { "device":"0x312c","send" : { "Power": 1}}
Gives:
13:18:33.321 MQT: stat/tasmota_81CDB4/RESULT = {"ZbSend":"Done"}
13:18:35.568 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","Reachable":false}}}

And it is confirmed with zbinfo 0x312c that "reachable" is FALSE.

What may I try now?

Laurent 

Wyszków On

unread,
Jul 5, 2025, 7:25:54 AMJul 5
to Philip Knowles, TasmotaUsers

Hi Philip,
I will respond in 2 mails, as there are 2 topics.

Yes, I use Tasmota32 on ZB-GW03 device, self compiled 14.6.0 binary, using compile options from blakadder site.

I have finally manage to obtain readings from my "Tuya AliExpress" thermo-hygrometer.
It not even reports manufacturer nor model!
Here goes *.zb file part (I think to be included as last rule(s):

# Keyword TH05Z
#
:,
EF00/0201=0402/0000,mul:10    # - temperature * 10,
EF00/0202=0405/0000,mul:100    # - humidity 

Now it looks on www page same as Sonoff SNZB-02(D).

Device reports many other things, especially on keypress, but I don't know their meaning.

How can I contact blakadder site manager not having account on X?

Laurent 

Philip Knowles

unread,
Jul 5, 2025, 9:38:16 AMJul 5
to Wyszków On, TasmotaUsers
Reachable isn't an issue if the device is battery powered - only mains powered devices are permanently reachable.
The zb files are uploaded to the Tasmota file system and are read at boot. Can you send the results of zbdump?
Just in case there's an error in compliling I would also try flashing with tasmota32-zigbeebridge.bin from
Tasmota Web Installer and firmware repository. Contribute to tasmota/install development by creating an account on GitHub.


From: Wyszków On <wyszk...@gmail.com>
Sent: 05 July 2025 12:25
To: Philip Knowles <knowles...@gmail.com>; TasmotaUsers <sonof...@googlegroups.com>

Wyszków On

unread,
Jul 5, 2025, 12:12:04 PMJul 5
to Philip Knowles, TasmotaUsers
Ok, here we go:

zbdump - command unknown,

zbloaddump

18:05:41.052 CMD: zbloaddump 
18:05:41.054 ZIG: ZbLoad dump all current information
18:05:41.055 ====> START
18:05:41.055 # imported from '<internal_plugin>'
18:05:41.056 :TRADFRI*,
18:05:41.056 :SYMFONISK*,
18:05:41.056 0001/0021=0001/0021,mul:2
18:05:41.057 # imported from '<internal_plugin>'
18:05:41.057 :lumi.sensor_magnet*,
18:05:41.057 0006/0000=0500/FFF2
18:05:41.058 # imported from '/ZVG2.zb'
18:05:41.058 :TS0601,_TZE204_a7sghmms
18:05:41.058 EF00/0101,WaterMode
18:05:41.059 EF00/0365,IrrigationStartTime
18:05:41.060 EF00/0366,IrrigationStopTime
18:05:41.060 EF00/0267,CycleIrrigationNumTimes
18:05:41.060 EF00/0268,IrrigationTarget
18:05:41.060 EF00/0269,CycleIrrigationInterval
18:05:41.061 EF00/026A,CurrentTemperature
18:05:41.061 EF00/026F,WaterConsumed
18:05:41.061 EF00/0372,LastIrrigationDuration
18:05:41.061 EF00/0102=0006/8000
18:05:41.062 EF00/026C=0001/0021,mul:2
18:05:41.062 # imported from '/ZVG2.zb'
18:05:41.062 :,
18:05:41.063 EF00/0201=0402/0000,mul:10
18:05:41.063 EF00/0202=0405/0000,mul:100
18:05:41.063 <==== END

Will try this firmware OTA

Laurent 

Wyszków On

unread,
Jul 5, 2025, 12:41:22 PMJul 5
to Philip Knowles, TasmotaUsers
Something is broken in "unofficial" directory.
tasmota32-zbbridge.bin is only ~197kB and fails to upgrade from safeboot.
And all files there have age 1h!. 

Reverted to my own compilation.

Laurent 

Wyszków On

unread,
Jul 5, 2025, 2:14:20 PMJul 5
to Philip Knowles, TasmotaUsers
Trying to get something back from device:

zbsend { "device":"0x312c", "read":{"Power":true}}

After few seconds response(?):

20:10:15.499 MQT: tele/tasmota_81CDB4/SENSOR = {"ZbReceived":{"0x312C":{"Device":"0x312C","Name":"Elektrozawór 1","BatteryPercentage":100,"Endpoint":1,"LinkQuality":113}}}

Nothing else.

Laurent 

Wyszków On

unread,
Jul 5, 2025, 2:30:51 PMJul 5
to Philip Knowles, TasmotaUsers
WOW, some SUCCESS:
with command like this (0/1), 

zbsend { "device":"0x312c","write": {"EF00/0102":0}}

I can hear valve state changing ;).

But with "Power" only zbsend : done.

Will try water counter.

Laurent 

Philip Knowles

unread,
Jul 6, 2025, 1:18:06 PMJul 6
to Wyszków On, TasmotaUsers
At least you making progress

Looking at the zbloaddump, for the profile to work the ModelID (TS0601) and ManufacturerID (_TZE204_a7sghmms) need to match the device
According to the Blakadder page the ManufacturerID is either _TZE200_akjefhj5  or _TZE200_81isopgh
The cluster for the valve state is EF00/0102 and it should accept either 0 or 1. For it to have an alias of 'WaterState' it will need to have a line in the plugin
EF00/0102,WaterState
The line you have
EF00/0102=0006/8000
Which does a conversion
As for the bins. You need to click on the link then Download the raw file



From: Wyszków On <wyszk...@gmail.com>
Sent: Saturday, July 05, 2025 19:30

Wyszków On

unread,
Jul 6, 2025, 5:34:35 PMJul 6
to Philip Knowles, TasmotaUsers
Hi Philip,
My device is ZVG2, not ZVG1. Model ID didn't change, but Manufacturer did. I have obtained my values from zbstatus3:

23:27:06.692 MQT: stat/tasmota_81CDB4/RESULT = {"ZbStatus3":[{"Device":"0x312C","Name":"Elektrozawór 1","IEEEAddr":"0xA4C1383FFDE74C2A","ModelId":"TS0601","Manufacturer":"_TZE204_a7sghmms","Endpoints":[1],"Config":["~01.1","O01"],"Power":0,"Reachable":true,"BatteryPercentage":100,"BatteryLastSeenEpoch":1751773390,"LastSeen":13124,"LastSeenEpoch":1751824102,"LinkQuality":81}]}
23

And using mapping I do see power state on main page.
What is strange, that using zbsend with "Power" doesn't work, while sending hex values works.

And I still don't know how to get values on demand, I do something wrong with syntax.

Is it possible to have water counter displyed on main page? (Which attribute should I map it to?)

Laurent 

Wyszków On

unread,
Jul 6, 2025, 5:50:07 PMJul 6
to Philip Knowles, TasmotaUsers
It there somewhere list of cluster IDs/attribute IDs that Tasmota will display on main page near device name? (upon receiving one ofc).

Wyszków On

unread,
Jul 6, 2025, 10:38:03 PMJul 6
to Philip Knowles, TasmotaUsers
Philip, do we have control over order in which *.zb files are loaded? Lexical order, random?

Laurent 

Philip Knowles

unread,
Jul 7, 2025, 3:47:17 AMJul 7
to Wyszków On, TasmotaUsers
I would guess in the order that they are listed in the file system. It shouldn't make any difference as each device is only mapped if it matches the IDs. Anything else needs to use the zb commands.
From: Wyszków On <wyszk...@gmail.com>
Sent: Monday, July 7, 2025 3:37:43 AM
To: Philip Knowles <knowles...@gmail.com>
Cc: TasmotaUsers <sonof...@googlegroups.com>

Wyszków On

unread,
Jul 7, 2025, 3:47:48 AMJul 7
to Philip Knowles, TasmotaUsers
Found in documentation, why can't send "Power" to my device:

"Currently the inverse attribute mapping is not done when writing an attribute"

:(

Laurent 

Wyszków On

unread,
Jul 7, 2025, 5:45:07 AMJul 7
to Philip Knowles, TasmotaUsers
It may have importance:
I have a AliExpress thermo-hygrometer that doesn't even send ID/Manufacturer! 
To make it work, I used "wildcard" IDs.

#
# Keyword TH05Z
#
:,
EF00/0201=0402/0000,mul:10    # - temperature * 10,
EF00/0202=0405/0000,mul:100    # - humidity

So it should be used as last one. (To make non-wildcard rules act before).
At least when in same file as rules for the valve, it works as expected.
I guess, don't have in-depth knowledge of Tasmota.

Laurent 

Wyszków On

unread,
Jul 7, 2025, 6:47:11 AMJul 7
to Philip Knowles, TasmotaUsers
Philip, what about attribute IDs that Tasmota can display next to ZB device name?
Temperature, humidity, power, what else?
Need something that could visualise water counter on main page.

Laurent 

Wyszków On

unread,
Jul 22, 2025, 8:07:11 AMJul 22
to Philip Knowles, TasmotaUsers
I'll answer to myself: 
Here is what I got from sfromis on GitHub:

Here's the source code for updating the indicators on the Tasmota front page:
https://github.com/arendst/Tasmota/blob/development/tasmota/tasmota_xdrv_driver/xdrv_23_zigbee_A_impl.ino#L2196-L2409

You could also use Berry to code a driver picking up the sensor payloads, and displaying the values you'd like. This can be done without modifying Tasmota source code.


And my deductions from this code:


thank You for response. If I understand code, there are possible displayed values for:

  • battery %,
  • temperature(s), humidity,
  • ight (brightness, hue, sat, RGB...),
  • power (on off, voltage, power)
  • dimmer.
Advice was to use Berry programming language. Trying to learn.

Laurent 
image.png
Reply all
Reply to author
Forward
0 new messages