TuyaMCU (the MCU itself) remembers data between reboots. You need to power if off. You can also enable TuyaMCU queue in the flags.
Helpful post? Buy me a coffee.
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamNordlicht77 wrote:
it shows a host but unfortunately this host is not updated
Nordlicht77 wrote:I did a reset and re-flashed which flags should be on
Nordlicht77 wrote:
Can you remove the word Toogle from Buttom name?
There is a limit because of the button, see picture
Nordlicht77 wrote:setChannelType 3 temperature_div10 setChannelLabel 3 "Low temperature alarm value" linkTuyaMCUOutputToChannel 103 val 3 addRepeatingEvent 15 -1 publishFloat temperatur_min $CH3/10 0 2 //set value to Channel 103 TuyaMcu fakeTuyaPacket 55AA0307000867020004000000E664 //set virtual button temp min setChannelLabel 21 "Temp min" setChannelType 21 Toggle
Nordlicht77 wrote:
To set the values for the min and max, I used the following page
https://www.rapidtables.com/convert/number/decimal-to-hex.html
and there I selected Decimal to Hexadecimal
Under Decimal I wrote the host in plain text
You will then get the result under Hex
An example
the first numbers of 55AA03070008 for example of 55AA0307000866020004000000FA77 remain the same in this case
The 66 is the number of TuyaMCU dpID in hex in plain text 102
The next numbers of 55AA0307000866020004000000FA77 i.e. 0200040000 remain
The 00FA in the number of TuyaMCU value in Hex in plain text 250
The next numbers from 55AA0307000866020004000000FA77 i.e. 77 is the checksum
This must be converted on the page
https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/
To do this, take the result of the hex without the last two numbers in this case 55AA0307000866020004000000FA
inserts it under Hex Input
Then press AnalyzeDataHex
Under AnalyzeDataHex there is the checksum, i.e. the last two numbers
I then inserted this host under config-> Execute custom command with fakeTuyaPacket 55AA0307000866020004000000FA77
Here is my fakeTuyaPacket with positive feedback
fakeTuyaPacket 55AA0307000866020004000000FA77 id 121
Info:TuyaMCU processIncoming[v=3]: cmd 7 (State) len 15
Info:TuyaMCU parseState: id 102 type 2-val len 4
Info:TuyaMCU parseState: int32 250
Info:GEN:CHANNEL_Set channel 2 has changed to 250 (flags 0)
Info:MQTT:Channel has changed! Publishing 250 to channel 2
Info:MQTT publishing val 250 to obk0DE017Cuuuu/2/get retain=0
tuyaMcu_sendState [dpID] [dpType] [dpValue]
addRepeatingEvent 15 -1 tuyaMcu_sendState 103 2 2300
delay_s 1
tuyaMcu_sendState 103 2 2300
delay_s 1
tuyaMcu_sendState 104 2 1234
delay_s 1
tuyaMcu_sendState 105 2 2345