Updated TuyaMCU (markdown)

Willem van Bergen 2019-09-05 22:19:53 +02:00
parent 1c0a28b9ee
commit aef413419f
1 changed files with 11 additions and 11 deletions

@ -5,16 +5,16 @@ In these devices Tuya Wifi module takes care of Wifi and software features while
## TuyaMCU Module (former Tuya Serial Dimmer)
TuyaMCU module does the job of mapping devices behind MCU to Tasmota devices. TuyaMCU module introduces a new command `TuyaMCU` which maps the functionIds to DpIds. Module supports maximum of 16 configured FunctionIds.
TuyaMCU module does the job of mapping devices behind MCU to Tasmota devices. TuyaMCU module introduces a new command `TuyaMCU` which maps the FunctionIDs to DpIds. Module supports maximum of 16 configured FunctionIDs.
### DpId
All the devices (relays, dimmers, switches) controlled by MCU are identified by a DpId. Whenever a command is sent to MCU, this DpId dictates which relay or dimmer needs to be changed and same is used when the status is received from MCU. There is no way the Wifi module firmware can know the function of each DpId, so just like GPIO pin configuration for TuyaMCU devices we need to map DpId with its functions.
### Function Ids
### FunctionIDs
FunctionID defines what type of Device is located at DpId. These functions are similar to default Tamsota GPIOs (Relays, LEDs, Dimmer like PWM, etc). Currently TuyaMCU module supports the following FunctionIds
The FunctionID defines what type of Device is located at DpId. These functions are similar to default Tasmota GPIOs (Relays, LEDs, Dimmer like PWM, etc). Currently TuyaMCU module supports the following FunctionIDs:
Function | FunctionId
@ -29,10 +29,10 @@ Relay Inverted1 to Relay Inverted8 | 41 to 48
## TuyaMCU command
TuyaMCU command takes 1 param with functionId and DpId comma separated ie
TuyaMCU command takes 1 param with FunctionID and DpId comma separated ie
`TuyaMCU <fnId>,<dpId>`
where `fnId` is functionId and `dpId` is dpId to map to.
where `fnId` is FunctionID and `dpId` is dpId to map to.
If any existing entry with same `fnId` or `dpId` is already present, it will be updated to the new values.
@ -45,11 +45,11 @@ example:
`TuyaMCU 11,1`
This command maps Relay1 (FunctionID 11) to DpId 1.
Output of TuyaMCU is the current mapping of fnIds and DpId.
Output of TuyaMCU is the current mapping of fnIds and DpIds.
## Identification of FunctionIds and DpIds
## Identification of FunctionIDs and DpIds
As mentioned earlier, the hardware is controlled by MCU and Wifi module sends commands to MCU over serial to control the hardware. Each hardware has a DP ID which can be different for different models even for same manufacturer. We need to identify these DpIdse.
As mentioned earlier, the hardware is controlled by MCU and Wifi module sends commands to MCU over serial to control the hardware. Each hardware has a DpId which can be different for different models even for same manufacturer. We need to identify these DpIds.
To do that,
@ -214,10 +214,10 @@ Now convert `36` to hex which is `0x24`. This is closest to `25` which is our cu
#### Dimming less than 10%
By default tasmota blocks dimming less than 10% for dimmers. Some dimmers can handle less than 10% very well.
By default Tasmota blocks dimming less than 10% for dimmers. Some dimmers can handle less than 10% very well.
1. Turn the dimmer to lowest using hardware button.
2. Check the `Dim state=` in logs to see whats minimum.
2. Check the `Dim state=` in logs to see what is the minimum.
3. If `Dim state` is less than 10% of maximum range that was set you need to unset [SetOption69](https://github.com/arendst/Sonoff-Tasmota/wiki/Commands#Setoption69) by `SetOption69 0` command.
### Setting up Switches
@ -229,7 +229,7 @@ For switches we need to
#### Configure number of relays
By default TuyaMCU module expects 1 gang switch. There is no way currently to detect the number of relays present in MCU based switch, we need to tell it to Tasmota using FunctionIds 12 to 18 for Relay2 to Relay4
By default TuyaMCU module expects 1 gang switch. There is no way currently to detect the number of relays present in MCU based switch, we need to tell it to Tasmota using FunctionIDs 12 to 18 for Relay2 to Relay4
So for 4 gang switch we need to set `TuyaMCU 12,2`, `TuyaMCU 13,3` and `TuyaMCU 14,4` if the DpIds for Relays 2-4 are `2`,`3`,`4`.
TIP: You can configure all in one go using `backlog TuyaMCU 12,2; TuyaMCU 13,3; TuyaMCU 14,4`