gemu2015 / Sonoff-Tasmota

Tasmota Fork TCS34725,PN532_i2,ccc1101 Moritz support,m5stack 4,7 epaper, hotplug drivers
GNU General Public License v3.0
24 stars 19 forks source link

TuyaReceived values under >E #22

Open blakadder opened 3 years ago

blakadder commented 3 years ago

Maybe I was doing it wrong but it seems I cannot capture TuyaReceived events into a variable.

Zigbee is documented as supported but I assume Tuya isn't?

Unrelated question: Is there any way to truncate a variable string, for example I only need the last digit from "0302000400000000"?

gemu2015 commented 3 years ago

TuyaReceived will arrive in >E too

i own no Tuya device but

strvar=TuyaReceived#Data

should do the job

substring: svar=sb(src_svar p n)

p=position (if <0 counts from end) n=number of chars

so svar=sb(src_svar -1 1)

should give the last digit