Max Prokhorov
3ae164490a
light: move hardcoded comms masks to the header
5 years ago
Max Prokhorov
9ec3723a11
light: update toRGB and toHSV to use local buffer
5 years ago
Max Prokhorov
559c75d3c7
lights: switch to signed arithmetic, introduce adjustment and update step functions
5 years ago
Max Prokhorov
d4698c0a37
light: fix inconsistent transitions ( #1901 , #1923 )
* light: fix inconsistent transitions
- capture step variable for the current transition
- use one-shot timer, restart from the timer callback
* schedule inside provider func, not transition
5 years ago
Max Prokhorov
c0c534926b
Light: store pwm consts as progmem data ( #1906 )
5 years ago
Max Prokhorov
ae070b5973
Lights: channel value change detection ( #1914 )
5 years ago
Max Prokhorov
cf3bd49bde
light: fix value2pwm range conversion ( #1902 , #1905 )
5 years ago
Max Prokhorov
7959863526
lights: toRGB default arg
5 years ago
Max Prokhorov
054a9a5ea7
lights: fix kelvin/mired const naming
5 years ago
Max Prokhorov
f0a86ded9e
lights/hsv: properly divide rgb values
5 years ago
Max Prokhorov
5d5f0f8b8c
light: schedule provider update on loop
5 years ago
Max Prokhorov
b3600bdc14
Format fixes in light module ( #1874 )
* Light: proper printf format for HSV, use lround
* core: warn about map() and 2.3.0, type-strict constrain()
* use generic format
* value already has brightness
5 years ago
Max Prokhorov
21423431ce
Fixed size json payload & other WS bugfixes ( #1843 )
- update every dynamicjsonbuffer with fixed size constructor argument
- change to ws callback registration to use a class builder (just cosmetic)
- test multiple ws data callbacks for each module
- remove some of the static strings in favour of ws data callback
- improve sensor ws callback data size, remove duplicated strings
- use static buffer in wsDebugSend
- postpone wsSend until loop, implement wsPost to allow other modules to queue message callbacks. remove Ticker based ws callbacks for data
- update WebUI files
5 years ago
Max Prokhorov
6765fd830f
Fix assert condition
5 years ago
Max Prokhorov
e169a9dc6d
Always apply channel inputValue->value
5 years ago
Max Prokhorov
5883617ee6
Light: move gamma to PROGMEM
5 years ago
Max Prokhorov
c918791920
Light: split RGBWW and only W brightness
5 years ago
Max Prokhorov
f8a0b9935c
Terminal: Add description for each channel
5 years ago
copyrights
21b0ac04df
MQTT: send mired if cct in use ( #1742 )
5 years ago
copyrights
9ceca44770
Two channel CCT ( #1732 )
* add CCT support for 2 channel boards
* update webinterface description
* add 2 channel CCT to homeassistant and domoticz
* remove domoticz two channel cct support.
5 years ago
copyrights
d9b9e1449d
MQTT and HA brightness ( #1730 )
* MQTT and HA brightness shall only be depended on LIGHT_PROVIDER != LIGHT_PROVIDER_NONE
* remove unnecessary changes
5 years ago
Max Prokhorov
820d8c4be8
Initial implementation of RTCMEM storage ( #1420 )
- store system crash counter and reset reason in rtcmem instead of eeprom
- store relay state mask in rtc in addition to the eeprom
- store relay state in eeprom only when boot mode requires it
- simplify relay state mask calculation / reading using std::bitset
- light state save and restore
- energy total save and restore
5 years ago
tsymbaliuk
2832dc7552
Allow to set relative brightness and relative color in mireds through command using +N and -N notation
5 years ago
Max Prokhorov
d87f6124c9
Send brightness to websocket
fixup 868d153f
lights status refactor
5 years ago
Malachi Soord
c8231860ac
[copyright-update] Update for 2019
5 years ago
Max Prokhorov
868d153fa4
Compact WS data
* send all ws config at once on start
* reduce ws json overhead by creating message buffer manually
* use k:[values] instead of k1:value1, k2:value2 etc. for lists
5 years ago
Xose Pérez
d47ae2e4a4
Helper terminal methods terminalOK and terminalError
5 years ago
Xose Pérez
b9e13446fc
Revert "Wrap embeddis commands and move feedback to caller"
This reverts commit 7ad0e3a02b
.
5 years ago
Xose Pérez
cc4ba52b4d
Delay light comms (mqtt, ws, broker) to avooid jamming
5 years ago
Xose Pérez
356be730e2
Added message type to broker
5 years ago
Xose Pérez
7ad0e3a02b
Wrap embeddis commands and move feedback to caller
5 years ago
Xose Pérez
27e7b9ae89
Move terminal methods to own module
5 years ago
Xose Pérez
fcf59d04cd
Change light transition time via MQTT or API ( #1412 )
6 years ago
Xose Pérez
19d0c5d17a
Report target color values on MQTT and API
6 years ago
Xose Pérez
01802741f2
Tested encoder support
6 years ago
Xose Pérez
ea1207195c
Initial -untested- support for Xiaomi Smart Desk Lamp ( #884 ) and rotary encoders
6 years ago
Xose Pérez
7d09f59952
Handle configure callbacks outside the ws module
6 years ago
Xose Pérez
4f61d3aa7e
Option to remove API_SUPPORT at build time
6 years ago
Niklas Wagner
409d2f7f90
_light_mireds must be set before we return;
6 years ago
Xose Pérez
e80b49d5f1
Simplify mired/kelvin methods
6 years ago
Xose Pérez
69ac57abb4
Using alternative methods for maths, saving ~8Kb with lights
6 years ago
Xose Pérez
bc67e93c28
Fix per channel state on/off for lights ( #830 )
6 years ago
Niklas Wagner
5e32f8cac9
Refactor Code
6 years ago
Niklas Wagner
f116f30ef7
Rename variables
6 years ago
Niklas Wagner
e8bd92c192
Add Webinterface Option
6 years ago
Niklas Wagner
81dcb644b6
Switch 4th and 5th channel and rename variables
6 years ago
Niklas Wagner
20adc846a9
Use the 5th Channel as Cold White LED
6 years ago
Xose Pérez
33b2c919bc
Add brightness factor for lightbulbs with power white LEDs but low brightness RGB
6 years ago
Niklas Wagner
412051ae8d
Always set white inputValue to 0
6 years ago
Xose Pérez
627b9874d1
Use brightness when _light_use_white is disabled
6 years ago