More and more Tuya MCU based devices are coming in the market and people requesting to support them. This patch makes Tuya module more configurable and easier to add new functionalities. Its not just a dimmer or a switch anymore.
After this Patch Tuya MCU module has a list of supported functions and the user would need to map the functionId to dpId of their device. Once mapped correctly the Tuya module will take care for handling proper function for dpId.
Currently functions supported are
1. Relays1 to 8 : FunctionID 11 to 18
2. Dimmer : FunctionID 21
3. Power ( Deca Watt ) : Function ID 31
4. Current ( milli Amps ) : Function ID 32
5. Voltage ( deca Volts ) : Function ID 33
The changes are
- Use a TuyaMCU command to map DPs to Functions instead of many different SetOptions. SetOption41, 44, 45, 46, 65 won't be needed after this patch.
- TuyaMCU command takes argument like `11,1` which means Map Function id 11 (Relay1) to DPID 1
- Migrates old settings flags and options to new TuyaMap command
6.5.0.16 20190611
* Refactored TLS based on BearSSL, warning breaking change for fingerprints validation (see doc)
* Add checkbox to GUI password field enabling visibility during password entry only (#5934)
6.5.0.10 20190513
* Enable ADC0 by default in my_user_config.h (#5671)
* Add user configurable ADC0 to Module and Template configuration compatible with current FLAG options (#5671)
* Add rule Http#Initialized
* Add command WebColor to change non-persistent GUI colors on the fly
Use a rule like:
rule3 on http#initialized do webcolor {"webcolor":["#eeeeee","#181818","#4f4f4f","#000000","#dddddd","#008000","#222222","#ff0000","#008000","#ffffff","#1fa3ec","#0e70a4","#d43535","#931f1f","#47c266","#5aaf6f","#ffffff","#999999","#000000"]} endon
or
rule3 on http#initialized do webcolor {"webcolor":["#eee","#181818","#4f4f4f","#000","#ddd","#008000","#222"]} endon
to make color changes persistent)
* Add property LinkCount to state and status 11 message representing number of Wifi Link re-connections
* Add property MqttCount to status 6 message representing number of Mqtt re-connections
6.4.1.14 20190203
* Add SetOption32 until SetOption49 diagnostic information to Status 3 report as replacement for second property value in SetOption property name
* Add Resolution property to Status 3 report providing previous SetOption second value property
6.4.1.11 20190124
* Remove command SetOption14 as it has been superseded by command Interlock
* Remove command SetOption63 as it has been superseded by command Interlock
* Add command Interlock 0 / 1 / 1,2 3,4 .. to control interlock ON/OFF and add up to 8 relays in 1 to 4 interlock groups (#5014)