More and more serial dimmers are coming up with different dimming ranges, implemented DimmerRange command to make this setting generic and bring support for 2 byte dimming ranges which isn't supported by SetOptions.
Change command Tariffx to allow time entries like 23 (hours), 1320 (minutes) or 23:00. NOTE: As this is development branch previous tariffs are lost! (#6488)
* Add command EnergyReset4 x,x to initialize total usage for two tarrifs
* Add command EnergyReset5 x,x to initialize total export (or production) for two tarrifs
* Add command Sensor34 8,0 and Sensor34 8,1 to disable/enable JSON message on weight change over 4 gram
* Redesign command Tariff to now default to 0 (=disabled) and allowing to set both Standard Time (ST) and Daylight Savings Time (DST) start hour (#6282)
* Commands Tariff1 23 = Tariff1 ST, Tariff2 7 = Tariff2 ST, Tarriff3 22 = Tarrif1 DST, Tariff4 6 = Tariff2 DST, Tariff9 0/1 = Weekend toggle
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
* Add Tuya Energy monitoring by Shantur Rathore
* Add phase 1 Domoticz P1 Smart Meter support using energy sensors handled by xdrv_03_energy.ino based on an idea by pablozg
* Add commands Tariff1 0..23 (start Off-Peak hour), Tariff2 0..23 (start Standard hour) and Tariff3 0/1 (Saturday and Sunday Off-Peak)
* Add command DisplayWidth to set pixel width on supported devices
* Add command DisplayHeight to set pixel height on supported devices
* Add Oled reset GPIO option "OLED reset"
Change Summary
1. Added Option to select Dimmer Range (1-100 and 1-255) through SetOption66 (default is 1-100 for legacy device support
2. Updated Dimmer code to set range based on the option66 100 / 225