Updated TuyaMCU (markdown)

blakadder 2019-10-25 20:55:54 +02:00
parent ffe3a2b21b
commit c28c0ceb39
1 changed files with 38 additions and 0 deletions

@ -42,5 +42,43 @@ If any existing entry with same `fnId` or `dpId` is already present, it will be
Entry is removed when `fnId` or `dpId` is `0`.
When no parameters are provided `TuyaMCU` prints the current mapped values.
## Identification of FunctionIDs and DpIds
As mentioned, the hardware is controlled by an MCU. The Wi-Fi module sends commands to MCU over serial to control the hardware. Each hardware component has a DpId which can have different functions on each model. See [this list](tuya-protocols) for *possible* combinations.
We need to identify these DpIds:
1. Go to `Configure` -> `Console` option in Tasmota web interface.
2. Use command `weblog 4` to enable verbose logging in web interface.
3. Observe the log. After every 9-10 seconds you should see log messages such as:
```
TYA: Heartbeat
TYA: RX Packet: "55aa0107000501010001000f"
TYA: FnId=0 is set for dpId=1
TYA: RX Packet: "55aa01070005020100010010"
TYA: FnId=0 is set for dpId=2
TYA: RX Packet: "55aa01070005030100010011"
TYA: FnId=0 is set for dpId=3
TYA: RX Packet: "55aa01070005040100010012"
TYA: FnId=0 is set for dpId=4
TYA: RX Packet: "55aa0107000807020004000000001c"
TYA: FnId=0 is set for dpId=7
TYA: RX Packet: "55aa0107000808020004000000001d"
TYA: FnId=0 is set for dpId=8
TYA: RX Packet: "55aa0107000809020004000000001e"
TYA: FnId=0 is set for dpId=9
TYA: RX Packet: "55aa010700080a020004000000001f"
TYA: FnId=0 is set for dpId=0
TYA: RX Packet: "55aa0107000865020004000000007a"
TYA: FnId=0 is set for dpId=101
TYA: RX Packet: "55aa0107000866020004000000007b"
TYA: FnId=0 is set for dpId=102
TYA: RX Packet: "55aa0107000867020004000000007c"
TYA: FnId=0 is set for dpId=103
TYA: RX Packet: "55aa0107000868020004000009870d"
TYA: FnId=0 is set for dpId=104
```
4. The function ids are printed as `TYA: FnId=0 is set for dpId=XXX` We will use these `XXX` ids in the guide ahead
## [TuyaMCU Configurations](TuyaMCU-Configurations)