Commit Graph

67 Commits

Author SHA1 Message Date
Theo Arends 741ad7c26a
Merge pull request #6227 from shantur/development
Tuya Dimmer fixes
2019-08-14 16:47:40 +02:00
Shantur Rathore 0235bc0f8c Tuya Dimmer: Make dimmer lower limit optional.
Not all Tuya dimmers have a lower limit of 10% (25)
2019-08-14 14:52:37 +01:00
Shantur Rathore f08e7ff5df tuya-dimmer: Fix dimmer skipping power/dimmer commands
This tuya dimmer mcu sends data for multiple dimmer ids which breaks `tuya_ignore_dim` logic and sometimes when `power on` is sent its blocked due to multiple serial commands being sent at the same time. This patch makes sure we send dimmer commands only when we need to.
Bug is explained in https://github.com/arendst/Sonoff-Tasmota/issues/6215#issuecomment-521191828
2019-08-14 14:32:52 +01:00
Stephan Hadinger a2b8f783c4 Removed float conversion and used changeUIntScale instead 2019-08-05 14:24:50 +02:00
thirug010 943dc524ea Update Code for Issue #6066- Dimmer Value not equal to Rx Dim State #
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
2019-07-11 22:28:08 -05:00
Theo Arends 86314e24e5 Fix ambiguous Tuya set relay option by adding command SetOption41 allowing to control number of virtual relays
Fix ambiguous Tuya set relay option by adding command SetOption41 allowing to control number of virtual relays (#6039)
2019-07-08 12:42:46 +02:00
Theo Arends 4938b1e31e Code refactoring
Code refactoring
2019-07-02 15:49:08 +02:00
Theo Arends 1b69502d9b Code optimization - Change for(uint8_t in for (uint32_t
Code optimization - Change for(uint8_t in for (uint32_t
2019-06-30 16:44:36 +02:00
Theo Arends 30adce5648 Revert "Code optimization - Change for(uint8_t in for (uint32_t"
This reverts commit 5e1eac3f74.
2019-06-30 15:56:55 +02:00
Theo Arends 5e1eac3f74 Code optimization - Change for(uint8_t in for (uint32_t
Code optimization - Change for(uint8_t in for (uint32_t
2019-06-30 15:47:32 +02:00
Theo Arends 12da2fd6f9 Add define USE_COUNTER to my_user_config.h to save space in sonoff-basic.bin and sonoff-minimal.bin
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
Theo Arends 53ecde7637 Add command SetOption65 0/1 and more Tuya Serial based device support
Add command SetOption65 0/1 and more Tuya Serial based device support (#5815)
2019-06-08 11:38:45 +02:00
thirug010 ab9baf2ac0 Resolved conflit and Updated the code Skop dimmer packets for non-dimmer configuration
1. Rsolved the build conflict on sonoff/_changelog.ino
tools/decode-config.py

2. Updated the code Skop dimmer packets for non-dimmer configuration
2019-05-22 01:28:38 -05:00
thirug010 86af0df712 update the Code to prevent the multiple power mqtt
update the xdrv_16_tuyadimmer.ino to prevent the multiple mqtt msg for power status.
2019-05-20 16:37:23 -05:00
thirug010 ffbd1af0d1 Revert "Revert "Update xdrv_16_tuyadimmer.ino""
This reverts commit 27dd98c539.
2019-05-19 09:47:51 -05:00
thirug010 27dd98c539 Revert "Update xdrv_16_tuyadimmer.ino"
This reverts commit 7b71331cf6.
2019-05-19 09:46:44 -05:00
thirug010 7b71331cf6 Update xdrv_16_tuyadimmer.ino
Repalced TuyaGetPower() BitRead().
2019-05-19 09:44:34 -05:00
thirug010 6b013144ab Updated the code based on the feedback
* Updated xdrv_01_webserver.ino to show dimmer slider2 by default for Tuya Dimmer Module

 * Updated xdrv_16_tuyadimmer.ino remove the use of XdrvMailbox and removed the pow functions now the size for 6.5.0 build is 510kb

 * updated sonoff.ino to hold current device id
2019-05-18 18:13:57 -05:00
thirug010 d59d631e40 New Tuya Serial Based Devices support
Updated the Code to support most of the new Tuya Serial devices like 4Gang Serail switch, 1 Dimmer + 1 relay, 3 Gang  ...
2019-05-17 22:03:53 -05:00
digiblur 39615c0700
Add Tuya Dimmer 10 second heartbeat
Some newer dimmer modules require the stock firmware method of sending a heartbeat packet every 10-11 seconds to the secondary MCU.  This was tested on 2 other Tuya based dimmers that did not require this heartbeat packet and no adverse impacts have been found.
2019-04-17 21:41:58 -05:00
Theo Arends eb9617e3f9 Tune some functionality
Tune some functionality
2019-03-30 13:03:45 +01:00
Theo Arends e1c92b701b Change NULL to nullptr
Change NULL to nullptr
2019-03-26 18:26:50 +01:00
Theo Arends 06a9fbd792 Changed logging message handling
Changed logging message handling
2019-03-08 15:15:42 +01:00
Theo Arends 98ae3eaf54 6.4.1.16 Online template change
6.4.1.16 20190211
 * Initial support for online template change using command Template (#5177)
2019-02-11 19:21:49 +01:00
Theo Arends 304ac6fe44 6.4.1.12 code changes (byte/boolean)
6.4.1.12 20190128
 * Change code use of boolean to bool and byte to uint8_t
 * Change code uint8_t flags to bool flags
2019-01-28 14:08:33 +01:00
Theo Arends 447ec6256e 6.4.1.4 Update Copyright (C) 2019
6.4.1.4 20190101
 * Update Copyright (C) 2019
2019-01-01 13:55:01 +01:00
Theo Arends 7ebb7a6067 6.4.1.3 Change sonoff_template.h
6.4.1.3 20181229
 * Change sonoff_template.h module lay-out by removing non-configurable GPIOs
2018-12-29 19:46:28 +01:00
Joel Stein b2005fba40 introduce new api-call for dimmer-devices 2018-12-17 18:29:42 +01:00
Theo Arends 0df7df9b08 Fix dynamic buffer handling
Fix dynamic buffer handling
2018-11-27 12:18:27 +01:00
Theo Arends a360ac4ef6 Add dynamic buffer space
Make serial buffer space reservation dynamic
2018-11-27 11:55:54 +01:00
Theo Arends e284e78b4d Add support for Armtronix dimmers
Add support for Armtronix dimmers. See wiki for info (#4321)
2018-11-16 12:22:15 +01:00
andrethomas 4a7e7b0dbb Change C functions with () to (void) 2018-11-14 15:32:09 +02:00
Joel Stein 0d78ec4fad tuya: change Sent -> TX, Rcvd -> RX 2018-11-10 18:08:31 +01:00
Joel Stein d573f7641a tuya: formatting 2018-11-09 01:28:11 +01:00
Theo Arends 4a21d3270d Restrict hardware serial
Restrict hardware serial
2018-11-07 15:37:06 +01:00
Theo Arends 9fef82736d Prep drivers for management
Prep drivers for management
2018-11-07 10:30:03 +01:00
Joel Stein a2b7bdac45 tuya: name flag SetOption54 2018-11-06 23:27:49 +01:00
Joel Stein 7003435b34 tuya: use SetOption54 instead of SetOption22 2018-11-06 22:58:07 +01:00
Joel Stein 134a10d2c4 tuya: Add SetOption22 to select if brightness-commands from faceplate should be ignored while powered off 2018-11-06 20:06:25 +01:00
Joel Stein aa148f67a3 tuya: fix SetOption20 for Oittm/Moes 2018-11-06 05:35:07 +01:00
Joel Stein 0c3123a7aa tuya: reorder functions 2018-11-04 06:56:36 +01:00
Joel Stein 256b5cba8e tuya: only handle reset GPIO 2018-11-04 06:40:55 +01:00
Joel Stein b958c7b716 tuya: cleanup 2018-11-04 03:40:14 +01:00
Joel Stein 2a9a5bb94b tuya: send power when setting dim-level 2018-11-03 23:24:43 +01:00
Joel Stein 91ead8c60e tuya: refactor/simplify code 2018-11-03 22:34:29 +01:00
Joel Stein 7d9bc1039f tuya: don't set tuya_wifi_state in TuyaResetWifi() (will be set automatically) 2018-11-02 16:04:35 +01:00
Joel Stein f4c80b5ed0 tuya: accept any wifi-reset packet 2018-11-01 04:30:02 +01:00
Joel Stein 9723d6de56 tuya: keep option to set dimmer-id at compile-time 2018-11-01 03:39:54 +01:00
Joel Stein 7f9f1f2f66 tuya: autoconfigure gpios 2018-11-01 02:55:16 +01:00
Joel Stein 2d94b7cc7c tuya: Autoconfigure Dimmer ID when SetOption34 == 0, use 0 as default for TUYA_DIMMER_ID 2018-11-01 00:13:46 +01:00