Tasmota/sonoff
Shantur Rathore efd1870d5e Tuya: Make Tuya Mcu implementation more configurable.
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
2019-09-04 17:29:44 +01:00
..
language Fix Greek language compilation error 2019-08-27 16:44:51 +02:00
_changelog.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
core_esp8266_timer.c Disable patched core PWM 2019-01-27 12:42:05 +01:00
core_esp8266_wiring_digital.c Disable patched core PWM 2019-01-27 12:42:05 +01:00
core_esp8266_wiring_pwm.c Allow full power PWM 2019-05-02 23:08:31 +02:00
i18n.h Tuya: Make Tuya Mcu implementation more configurable. 2019-09-04 17:29:44 +01:00
my_user_config.h Add driver USE_SDM120_2 with Domoticz P1 Smart Meter functionality as future replacement for USE_SDM120 - Pls test and report 2019-09-01 17:51:25 +02:00
Parsing.cpp Change NULL to nullptr 2019-03-26 18:26:50 +01:00
settings.h Tuya: Make Tuya Mcu implementation more configurable. 2019-09-04 17:29:44 +01:00
settings.ino Tuya: Make Tuya Mcu implementation more configurable. 2019-09-04 17:29:44 +01:00
sonoff_ca.ino Remove non-ASCII symbols 2019-08-14 17:27:51 +03:00
sonoff_post.h Fix USE_SDM120_2 issues 2019-09-02 16:41:18 +02:00
sonoff_template.h Fix USE_SDM120_2 issues 2019-09-02 16:41:18 +02:00
sonoff_version.h Tuya: Make Tuya Mcu implementation more configurable. 2019-09-04 17:29:44 +01:00
sonoff.h Refactor and document power control 2019-09-04 12:20:04 +02:00
sonoff.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
StackThunk_light.cpp Fix Force Elliptic Curve for Letsencrypt TLS #6042 2019-07-12 08:11:40 +02:00
StackThunk_light.h Support for AWS IoT via TLS 1.2 2019-06-05 11:44:52 +02:00
support_button.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
support_command.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
support_features.ino Add Full support of all protocols in IRremoteESP8266, to be used on dedicated-IR Tasmota version. Warning: +81k Flash when compiling with USE_IR_REMOTE_FULL 2019-08-28 22:01:01 +02:00
support_float.ino Removed float conversion and used changeUIntScale instead 2019-08-05 14:24:50 +02:00
support_rotary.ino Refactor Button, Switch and Rotary to save code space 2019-08-17 16:19:58 +02:00
support_rtc.ino Add IsDst() 2019-08-25 17:31:27 +02:00
support_static_buffer.ino Add Zigbee support phase 2 - cc2530 initialization and basic ZCL decoding 2019-08-31 21:23:32 +02:00
support_switch.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
support_udp.ino Fix WeMo emulation for 1G echo and 2G echo dot (#6086) 2019-07-13 16:31:53 +02:00
support_wifi.ino Clean code 2019-08-18 15:21:38 +02:00
support.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
user_config_override_sample.h Tiny typo fix in comment 2019-01-17 15:29:41 +01:00
WiFiClientSecureLightBearSSL.cpp Fix Force Elliptic Curve for Letsencrypt TLS #6042 2019-07-12 08:11:40 +02:00
WiFiClientSecureLightBearSSL.h Fixed compilation error when USE_MQTT_AWS_IOT set and USE_MQTT_TLS disabled 2019-06-30 18:50:42 +02:00
xdrv_01_webserver.ino Refactoring 2019-09-04 12:58:37 +02:00
xdrv_02_mqtt.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
xdrv_03_energy.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_04_light.ino Refactor light driver saving code space 2019-08-17 13:17:30 +02:00
xdrv_05_irremote_full.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_05_irremote.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_06_snfbridge.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_07_domoticz.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
xdrv_08_serial_bridge.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_09_timers.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
xdrv_10_rules.ino Merged #5421 2019-08-30 17:07:56 +02:00
xdrv_10_scripter.ino scripter update 2019-08-31 10:10:16 +02:00
xdrv_11_knx.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
xdrv_12_home_assistant.ino Fix Would not compile if USE_LIGHT not defined 2019-08-27 10:02:25 +02:00
xdrv_13_display.ino Update libraries and fix SSD1306 power control 2019-08-19 18:17:44 +02:00
xdrv_14_mp3.ino Update xdrv_14_mp3.ino 2019-08-08 08:28:59 +02:00
xdrv_15_pca9685.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_16_tuyadimmer.ino Tuya: Make Tuya Mcu implementation more configurable. 2019-09-04 17:29:44 +01:00
xdrv_17_rcswitch.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_18_armtronix_dimmers.ino Refactor Armtronix driver 2019-08-17 15:07:46 +02:00
xdrv_19_ps16dz_dimmer.ino Correction 2019-08-17 14:50:12 +02:00
xdrv_20_hue.ino Fix Unrecognized relay with Echo Dot 2nd Gen 2019-08-27 22:19:27 +02:00
xdrv_21_wemo.ino Fix WeMo emulation for 1G echo and 2G echo dot (#6086) 2019-07-13 16:31:53 +02:00
xdrv_22_sonoff_ifan.ino Refactor and document power control 2019-09-04 12:20:04 +02:00
xdrv_23_zigbee_constants.ino Add Zigbee support phase 2 - cc2530 initialization and basic ZCL decoding 2019-08-31 21:23:32 +02:00
xdrv_23_zigbee_impl.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdrv_24_buzzer.ino Minor Refactor 2019-08-13 17:33:35 +02:00
xdrv_99_debug.ino Add Driver and Sensor info to status 4 2019-08-18 13:23:43 +02:00
xdrv_interface.ino Optimize rule/script processing 2019-08-19 11:18:50 +02:00
xdsp_01_lcd.ino Add display features 2019-07-23 14:05:42 +02:00
xdsp_02_ssd1306.ino Fix warning 2019-08-20 12:17:21 +02:00
xdsp_03_matrix.ino Add display features 2019-07-23 14:05:42 +02:00
xdsp_04_ili9341.ino Add display features 2019-07-23 14:05:42 +02:00
xdsp_05_epaper_29.ino display update 2019-08-23 10:26:09 +02:00
xdsp_06_epaper_42.ino Restore define USE_DISPLAY_EPAPER_42 2019-08-23 17:33:30 +02:00
xdsp_07_sh1106.ino display update 2019-08-23 10:26:09 +02:00
xdsp_08_ILI9488.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdsp_09_SSD1351.ino display update 2019-08-23 10:26:09 +02:00
xdsp_10_RA8876.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xdsp_interface.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xnrg_01_hlw8012.ino Refactor Energy code saving space 2019-08-16 14:41:02 +02:00
xnrg_02_cse7766.ino Refactor Energy code saving space 2019-08-16 14:41:02 +02:00
xnrg_03_pzem004t.ino Init Energy Total on energy monitoring devices with Energy Total Register 2019-09-03 21:53:20 +02:00
xnrg_04_mcp39f501.ino Refactor Energy code saving space 2019-08-16 14:41:02 +02:00
xnrg_05_pzem_ac.ino Init Energy Total on energy monitoring devices with Energy Total Register 2019-09-03 21:53:20 +02:00
xnrg_06_pzem_dc.ino Init Energy Total on energy monitoring devices with Energy Total Register 2019-09-03 21:53:20 +02:00
xnrg_07_ade7953.ino Refactor Energy code saving space 2019-08-16 14:41:02 +02:00
xnrg_09_sdm120.ino Init Energy Total on energy monitoring devices with Energy Total Register 2019-09-03 21:53:20 +02:00
xnrg_interface.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xplg_ws2812.ino Add compile time define USE_WS2812_HARDWARE to select hardware type WS2812, WS2812X, WS2813, SK6812, LC8812 or APA106 (DMA mode only) 2019-08-30 14:35:08 +02:00
xsns_01_counter.ino Minor Refactor 2019-08-13 17:33:35 +02:00
xsns_02_analog.ino Refactor commands by processing optional prefix 2019-08-11 18:12:18 +02:00
xsns_04_snfsc.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_05_ds18b20.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_05_ds18x20_legacy.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_05_ds18x20.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_06_dht.ino Change ToHex to ToHex_P PROGMEM compatible 2019-08-13 19:53:12 +02:00
xsns_07_sht1x.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_08_htu21.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_09_bmp.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_10_bh1750.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_11_veml6070.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_12_ads1115_i2cdev.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_12_ads1115.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_13_ina219.ino Added support for multiple INA219 devices on single I2C buss. 2019-07-08 20:55:48 -05:00
xsns_14_sht3x.ino Workaround invalid detection of SHT3x sensors 2019-07-11 10:56:12 +02:00
xsns_15_mhz19.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_16_tsl2561.ino Shrink code/flash space pt.2/2 2019-03-23 17:57:31 +01:00
xsns_17_senseair.ino Fix exception 28 due to regression from 6.5.0.1 (#5822) 2019-05-19 12:07:20 +02:00
xsns_18_pms5003.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_19_mgs.ino Shrink code/flash space pt.2/2 2019-03-23 17:57:31 +01:00
xsns_20_novasds.ino Change ToHex to ToHex_P PROGMEM compatible 2019-08-13 19:53:12 +02:00
xsns_21_sgp30.ino global update fix 2019-05-22 12:22:58 +02:00
xsns_22_sr04.ino Change NULL to nullptr 2019-03-26 18:26:50 +01:00
xsns_23_sdm120.ino Fix SDM120 Energy Value to Domoticz 2019-07-03 18:56:06 -03:00
xsns_24_si1145.ino Shrink code/flash space pt.2/2 2019-03-23 17:57:31 +01:00
xsns_25_sdm630.ino Final fix 2019-07-04 13:43:27 +02:00
xsns_26_lm75ad.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_27_apds9960.ino Provide function FastPrecisePowf 2019-05-18 16:54:29 +02:00
xsns_28_tm1638.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_29_mcp230xx.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xsns_30_mpr121.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_31_ccs811.ino global update fix 2019-05-22 12:22:58 +02:00
xsns_32_mpu6050.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_33_ds3231.ino Refactor RTC saving code space 2019-08-17 16:49:17 +02:00
xsns_34_hx711.ino Change converted double to float in rules, and replaced trigonometric functions from stdlib with smaller versions. 2019-07-01 18:20:43 +02:00
xsns_35_tx20.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_36_mgc3130.ino Shrink code/flash space pt.2/2 2019-03-23 17:57:31 +01:00
xsns_37_rfsensor.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_38_az7798.ino Refactor RTC saving code space 2019-08-17 16:49:17 +02:00
xsns_39_max31855.ino All code moved to new file (xsnx_47_max31865.ino) 2019-07-28 19:36:22 -03:00
xsns_40_pn532.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xsns_41_max44009.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_42_scd30.ino Refactor core command structure 2019-07-27 11:13:41 +02:00
xsns_43_hre.ino Code optimization - Change for(uint8_t in for (uint32_t 2019-06-30 16:44:36 +02:00
xsns_44_sps30.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xsns_45_vl53l0x.ino display update 2019-08-19 13:38:14 +02:00
xsns_46_MLX90614.ino Add define USE_COUNTER to my_user_config.h to save space in sonoff-basic.bin and sonoff-minimal.bin 2019-06-16 16:43:23 +02:00
xsns_47_max31865.ino Added check for USE_SPI enabled 2019-07-30 20:20:17 -03:00
xsns_48_chirp.ino move debug text msg to PROGMEM 2019-08-07 08:35:42 +02:00
xsns_49_solaxX1.ino Refactor code 2019-08-10 18:12:25 +02:00
xsns_50_paj7620.ino remove #define USE_PAJ7620 from driver code 2019-08-15 11:20:53 +02:00
xsns_51_rdm6300.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xsns_52_ibeacon.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xsns_53_sml.ino Add command Time 1/2/3 to select JSON time format ISO + Epoch, ISO or Epoch 2019-09-04 18:06:34 +02:00
xsns_interface.ino Clean code 2019-08-18 15:21:38 +02:00