0% found this document useful (0 votes)
673 views3 pages

Tasmota Rules

This document contains information about Zigbee devices, including their IDs and names, as well as rules for publishing telemetry data based on received Zigbee messages. The rules check for contact, motion, and power changes and publish updates to corresponding device topics. The document also includes examples of Zigbee messages received and commands for controlling lights.

Uploaded by

Napoleon Maou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
673 views3 pages

Tasmota Rules

This document contains information about Zigbee devices, including their IDs and names, as well as rules for publishing telemetry data based on received Zigbee messages. The rules check for contact, motion, and power changes and publish updates to corresponding device topics. The document also includes examples of Zigbee messages received and commands for controlling lights.

Uploaded by

Napoleon Maou
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Devices

DOOR_01 0x7b1a
DOOR_02 0xdfe4
Door_03 0xd98c
SWITCH_01 0xc00f
MOTION_EXTERNAL 0xc334
DOOR_LIGHT_01 0x4f11

Delete Rules
rules1 “

Rules I use

Door_01 Saloni
Door_03 Kouzina
Door_02 MikroExoporta

Rule1
ON ZbReceived#0xC00F#Power=2 do publish tele/NMAuto/Switch_01/Pressed %value%
endon
on ZBReceived#0xC334#Occupancy=0 do publish tele/NMAuto/Motion_01/Presence %value%
endon
on ZbReceived#0xD98C#Contact=0 do publish tele/NMAuto/Door_03/Open 0 endon
on ZbReceived#0xD98C#Contact=1 do publish tele/NMAuto/Door_03/Open 1 endon
ON ZbReceived#0xDFE4#Contact=0 DO publish tele/NMAuto/Door_02/Open 0 ENDON
ON ZbReceived#0xDFE4#Contact=1 DO publish tele/NMAuto/Door_02/Open 1 ENDON
on ZBReceived#0x7B1A#Contact=0 do publish tele/NMAuto/Door_01/Open 0 endon
on ZBReceived#0x7B1A#Contact=1 do publish tele/NMAuto/Door_01/Open 1 endon
Rule1 1

Rule1
ON ZbReceived#0xC00F#Power do publish tele/NMAuto/Switch_01/Pressed %value% endon
ON ZbReceived#0xDFE4#Contact=0 DO publish tele/NMAuto/Door_02/Open %value% ENDON
ON ZbReceived#0xDFE4#Contact=1 DO publish tele/NMAuto/Door_02/Open %value% ENDON
Rule1 1

Rule1
on ZBReceived#SWITCH_01#Power trigger do tele/NMAuto/Switch_01/Pressed %value%
endon
on ZBReceived#MOTION_EXTERNAL#Occupancy trigger do tele/NMAuto/Motion_01/Presence
%value% endon
on ZBReceived#DOOR_03#Contact trigger do tele/NMAuto/Door_03/Open %value% endon
on ZBReceived#DOOR_02#Contact trigger do tele/NMAuto/Door_02/Open %value% endon
on ZBReceived#DOOR_01#Contact trigger do tele/NMAuto/Door_01/Open %value% endon
Rule1 1
"JSONPATH:$.device.status.temperature"
for a json
{
device:
{
status:
{
temperature: 23.2
}
}
}

{"ZbReceived":{"0xC00F":{"Device":"0xC00F","Name":"SWITCH_01","0006!
02":"","Power":2,"Endpoint":1,"LinkQuality":29}}}

Xiomi Aqara ZNLDP12LM


Topic: cmnd/NMAuto/ZbSend and we add only the parameter of the ZbSend commands
{ "device":"0x4f11", "send":{"Power":"OFF"} }

Topic: cmnd/NMAuto/Backlog and we send the complete command ZbSend with the
parameter
ZbSend { "device":"0x4f11", "send":{"Power":"OFF"} }
Xiomi_64 = state
ZbSend { "device":"0x4f11", "send":{"Dimmer":"254"} } 0..254
Xiomi_65 = dimmer
ZbSend { "device":"0x4f11", "send":{"CT":"0"} } 0..65534 153..500 μάλλον αυτό
είνα το σωστό (153 6500K 500 2700K) 0xfaf4f7=6500Κ

{
"ZbReceived": {
"0x4F11": {
"Device": "0x4F11",
"Name": "Door_Light_01",
"Power": 0,
"0006/F000": 117440567,
"Endpoint": 1,
"LinkQuality": 73
}
}
}

{
"ZbReceived": {
"0x4F11": {
"Device": "0x4F11",
"Name": "Door_Light_01",
"CT": 500,
"0300/F000": 5181696,
"X": 34517,
"Y": 27347,
"ColorMode": 1,
"RGB": "FA8E0B",
"RGBb": "FA8E0B",
"Endpoint": 1,
"LinkQuality": 73
}
}
}

Sending comments to Tasmota


Commands Topic: cmnd/%topic%/<command>
Payload: parameter

cmnd/zbsend/
0x4f11

OldRange = (OldMax - OldMin)


NewRange = (NewMax - NewMin)
NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin

NewValue = (((oldvalue - 0)*(6500-2700)/65534) + 2700


OR
OldRange = (OldMax - OldMin)
if (OldRange == 0)
NewValue = NewMin
else
{
NewRange = (NewMax - NewMin)
NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
}

{
"ZbReceived":
{
"0xC00F":
{
"Device": "0xC00F",
"Name": "SWITCH_01",
"0006!02": "",
"Power": 2,
"Endpoint": 1,
"LinkQuality": 18
}
}
}

JSONPATH:$.ZbReceived.0xC00F.Endpoint

You might also like