Max Prokhorov
f7f41980b6
Headers cleanup ( #2134 )
* Config: remove prototypes.h
* fixup order
* word
* add missing
* fix warning while still using .ino
* bad at c/p;
4 years ago
Max Prokhorov
37f6247772
Light: configure dimmer pins from settings ( #2129 )
- add ltDimmerGPIO<index> & ltDimmerInv<index> to override / add to hardware configuration. Add pin defaults, mapped as GPIO_NONE. pwm_init() receives resulting GPIO mapping based on settings loader.
- remove bogus _light_channels variable, use this name for channel array instead (...which is vector and has size(). functions always use that value anyway)
4 years ago
Max Prokhorov
298ce8cac2
Refactor get/set/del/hasSetting ( #2048 )
* experimental: refactor get/set/del/hasSetting
* sensors
* lights
* cleaup
* r
* tuya
* fixup! sensors
* fixup! tuya
* header defaults types
* fix lights
* setup already checks for max
* helper for flashstring
* fix overload
* oops
* refactor includes
* warnings
* test with migrate
* add ids in a separate file
* cleanup
rev: crash
rev: domoticz
rev: encoder
rev: loopdelay
rev: hass
rev: i2c
rev2: hass
rev: mqtt
rev: rfm69
rev: relay
rev: rpn
rev: settings setup
rev: hb settings
rev: telnet preprocessor fix
rev: settings wrap
rev: tspk bool style
rev: wifi types
rev: util hb
rev: settings
fixup! rev: settings
* rev: cleanup wifi injections based on new getters
* hasSetting now can return true for empty key
* show hardcoded network in web
* oops
* fix ws referencing wrong index
* ensure empty strings are written
* c/p
* use experimental schema style for payload, mark network as not deletable
* allow to customize converter
* shorter syntax, try using with wifi
* use proper #if syntax to handle definitions that are missing
* fixup ota sc checks getter, cast schEnabled to bool
* add utils header to sensors
4 years ago
Max Prokhorov
37763f1ad4
Test: check core feature build ( #2080 )
* Test: check core feature build
* order
* add missing
4 years ago
Max Prokhorov
9a5698b342
Add TUYA_SUPPORT ( #1997 )
- add experimental `relayDummy` to configure dummy relays at runtime
- add tuya-generic-dimmer #1729
- cleanup broker interface to allow Tuya module to properly receive events, modify broker methods to allow different function signatures
- add basic tests for Tuya frame and data protocol
5 years ago
Max Prokhorov
849f8cf920
Rules RPN ( #1984 )
* RPN rules (WIP)
* RPN rules web interface, MQTT inputs
* Stickyness, rpn.ops,...
* Perform light updates only when value changes
* Improve wsSend performance
* Revert PR test
* Check TERMINAL_SUPPORT for _rpnInitCommands and remove unused variable
* Fix merge
* formatting
* disable by default (?)
* changelog
* comment
* remove debug function wrappers in favour of var activation
* fixup! comment
5 years ago
Maxim Prokhorov
01b76adff0
crash,lights: ensure that settings contain positive value
5 years ago
Max Prokhorov
6a3ef86c8f
light: change naming order for cct vars
5 years ago
Max Prokhorov
6d9d4ae149
light: provide mired warm / cold limits to webui
5 years ago
Maxim Prokhorov
bcd2bf807f
light: configure colortemp limits from settings
5 years ago
Max Prokhorov
f007b484e3
lights: directly use String as buffer for group payload
5 years ago
Max Prokhorov
97821f3b21
lights(xxx): help 2.3.0 string deduplication
...2.6.0+ does this all by itself
5 years ago
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 )
5 years ago
Xose Pérez
19d0c5d17a
Report target color values on MQTT and API
5 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