Commit Graph

91 Commits

Author SHA1 Message Date
Theo Arends 0b6c62f5f9 Add support for Shelly 1PM Template
Add support for Shelly 1PM Template {"NAME":"Shelly 1PM","GPIO":[56,0,0,0,82,134,0,0,0,0,0,21,0],"FLAG":2,"BASE":18} (#5716)
2019-05-13 18:26:07 +02:00
Stephan Hadinger cfdc553b65 Put back LightSetDimmer, see #5787 2019-05-13 11:27:46 +02:00
Stephan Hadinger 678f3ec35b Fixed: WC/WW were inverted, back to RGBCW 2019-05-08 12:06:22 +02:00
Stephan Hadinger e23f933cde Moved Philips-Xiaomi special handling to a better location 2019-05-05 18:18:20 +02:00
Stephan Hadinger 8144402536 Merge branch 'development' of https://github.com/arendst/Sonoff-Tasmota into fix/better_colormode 2019-05-05 09:19:34 +02:00
Stephan Hadinger 3cff56cdae Improved doc of LightStateClass about invariants 2019-05-05 09:18:57 +02:00
Stephan Hadinger dcd10a04cd Better color-mode management for RGB and Warm/Cold LEDs 2019-05-04 23:04:53 +02:00
Stephan Hadinger 6e7de3d61a Detailed documentation of Lights calculation flow 2019-05-04 09:40:26 +02:00
Stephan Hadinger 95ee161a38 Cleaned comment 2019-05-03 20:13:05 +02:00
Stephan Hadinger 2d3065f107 Apply correct Gamma to colw/warm white to keep constand perceived luminosity 2019-05-03 20:10:13 +02:00
Stephan Hadinger bdd522c7d2 Allow full power PWM 2019-05-02 23:08:31 +02:00
Stephan Hadinger ae3d7e0122 PWM using 10 bits resolution, LST_MAX created 2019-05-02 22:50:19 +02:00
Stephan Hadinger e98acd5c40 Changed gamma correction to adaptative resolution from 8 to 11 bits 2019-04-30 23:03:08 +02:00
Stephan Hadinger d878a42a62 Fixed Color was wrongly changing Dimmer 2019-04-29 08:34:43 +02:00
Stephan Hadinger efea6bb794 Fixed CT command returned bad value 2019-04-28 11:33:38 +02:00
Stephan Hadinger 5a52d1f568 Fixed PWM1 always full brightness, and Sonoff Basic / Relay not working 2019-04-27 22:48:51 +02:00
Stephan Hadinger d1b073e01d Tentative for 'xy' color space control from Alexa app (Philips Hue emulation) 2019-04-26 16:39:26 +02:00
Stephan Hadinger 4efef18d5d Fixed wrong brightness for White command 2019-04-25 14:59:39 +02:00
Stephan Hadinger e8dd82f24b Fixed Color2 should not reset Dimmer 2019-04-25 14:50:47 +02:00
Stephan Hadinger 31e80c8c3e Refactored management of lights, using classes and integers instead of floats. 2019-04-25 13:06:35 +02:00
Stephan Hadinger b5860b9b94 Fixed wrong behavior of Alexa app with Philips Hue emulation 2019-04-19 21:39:43 +02:00
Stephan Hadinger 599306a81f Fixed wrong ct results when initializing device 2019-04-18 20:56:18 +02:00
Stephan Hadinger 78ffc3085d Support for color and colortone for Philips Hue emulation via Alexa (#5600 #4809) 2019-04-17 21:21:56 +02:00
Theo Arends f7c30250c1 Change some more defines to const
Change some more defines to const
2019-03-31 11:59:04 +02:00
Theo Arends e1c92b701b Change NULL to nullptr
Change NULL to nullptr
2019-03-26 18:26:50 +01:00
Theo Arends a7a07c5b96 Fix JSON message error (#5521)
Fix JSON message error regression  (#5521)
2019-03-25 10:02:12 +01:00
Theo Arends 6922e657d9 Shrink code/flash space
Shrink code/flash space
2019-03-23 17:00:59 +01:00
Theo Arends 878205335f Consolidate MqttPublishTeleState
Consolidate MqttPublishTeleState
2019-03-20 14:05:43 +01:00
Theo Arends 06a9fbd792 Changed logging message handling
Changed logging message handling
2019-03-08 15:15:42 +01:00
Theo Arends 4b69a7d115 Update xdrv_04_light.ino
Fix core 2.3.0 compile error
2019-02-26 10:54:27 +01:00
netpok 61099c4ead Fix indentation 2019-02-25 22:36:18 +01:00
netpok 01ce2a31d3 Implement RGB CT linking 2019-02-25 22:29:39 +01:00
netpok 38433e56f7 Replace compare cycle with memcmp 2019-02-25 22:24:53 +01:00
netpok 6d1cfe5a07 Force light update on color mapping change 2019-02-25 22:24:06 +01:00
netpok d8eac1d8fc Replace if with min
saves ~30 bytes
2019-02-25 21:37:27 +01:00
Theo Arends 9a670be95b Fix buffer overflow
Fix buffer overflow (#5310)
2019-02-25 21:23:18 +01:00
Theo Arends 9f00978a79 Fix Domoticz Color regression
Fix Domoticz Color regression (#5310 )
2019-02-25 19:47:45 +01:00
Gabor Simon 48f6b09987 Initialisation and updating of color mapping added 2019-02-24 23:48:03 +00:00
netpok 430334e604 Replace vector with array
it saves 24 bytes of code
2019-02-24 21:56:44 +01:00
netpok 945e7000dd Implement full color remapper 2019-02-24 21:03:33 +01:00
Gabor Simon 4492a14574 Added SetOption37 for RGB remapping 2019-02-24 12:07:15 +00:00
Gabor Simon 38b81302e3 sm16716: added config option for custom rgb order 2019-02-24 09:26:10 +04:00
Andre Thomas 5b71095e02
Make sleep for light scheme0 optional
Make sleep for light scheme0 optional with compile directive (enabled by default)
2019-02-18 08:21:57 +02: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
Gabor Simon 2d892f64cd Init delay of SM16716 increased to 1 ms
As per measurements by @damondins:
https://github.com/gsimon75/Sonoff-Tasmota/pull/3#issuecomment-462059310
2019-02-10 08:33:05 +00:00
Colin Kuebler d7b8a6453d Added preprocessor constant for LT_SM16716 for improved code readability
Note that this differs from other LT_* in that it's not an enum
Ensure the SM16716 codepath is only taken when the top half of light_type is LT_SM16716
2019-02-01 19:41:12 -05:00
Colin Kuebler 817d0af598 No need (and pointless) to call SM16716_Init until color updates, iff using sel pin 2019-02-01 17:37:37 -05:00
Colin Kuebler 99b027852b Fixed first color command failing; need to wait for chip to power up 2019-02-01 17:33:21 -05:00
Colin Kuebler 25856c323a Track sm16716 select pin state so we don't waste cycles continuously enabling/disabling color
Added some comments; disabled sm16716 debug messages by default
Removed delay after setting select pin; didn't seem to help anyway
2019-02-01 00:59:53 -05:00
Colin Kuebler 04f1ed1659 Implemented sm16716 select
If SM16716_SEL is specified, it will toggle it on/off depending on whether or not there is color data
2019-01-31 17:17:01 -05:00