Compare commits

...

1789 Commits

Author SHA1 Message Date
cschwinne
102a28aef4 Release of WLED v0.13.3 2022-08-23 01:26:18 +02:00
cschwinne
cade1800f4 Update python dependencies 2022-08-21 12:50:52 +02:00
Blaz Kristan
8176f1141e Merge branch 'Sousanator-master'
Added LPD6803 chip support.
2022-08-16 20:35:57 +02:00
Blaz Kristan
515827c745 Merge branch 'master' of https://github.com/Sousanator/WLED into Sousanator-master 2022-08-16 20:35:17 +02:00
cschwinne
420f858d9b Release of WLED v0.13.2 2022-08-15 02:08:48 +02:00
Blaž Kristan
902c11d074 Merge pull request #2657 from poelzi/watchdog
Enable ESP watchdog by default
2022-07-22 09:26:46 +02:00
Blaž Kristan
38330b735c Merge pull request #2723 from albarlow/BME280-Enhancements
BME280 Usermod Enhancements
2022-07-21 18:42:19 +02:00
Blaz Kristan
bda3c4ab7a Minor optimisations. 2022-07-21 18:38:07 +02:00
Blaz Kristan
d8d01ac353 Merge branch 'BME280-Enhancements' of https://github.com/albarlow/WLED into BME280-Enhancements 2022-07-21 18:37:17 +02:00
dependabot[bot]
51d935f419 Bump terser from 4.8.0 to 4.8.1 (#2726)
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/commits)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-21 11:24:54 +02:00
albarlow
c96f83b076 Registered Usermod and Pins
Implemented PinManager and rerun setup of usermod after updating pins/

Registered in const.h and pin_manager.h   I tried to follow the existing formatting/numbering in these files.

Wrapped any strings I could in F()
2022-07-21 09:48:37 +01:00
albarlow
7308f5993c Added changelog 2022-07-20 22:53:45 +01:00
albarlow
22ac12dc36 Remove compile-time variables and revamp readme.md 2022-07-20 13:06:27 +01:00
albarlow
866296fefd Update usermod bme280 rounding
Apply rounding per usermod settings
2022-07-19 22:15:26 +01:00
albarlow
9d574397bc usermod bme280
Added public variables to the BME280 usermod based on those in the Temperature usermod.  Only complication is that this usermod utilises different function calls depending on whether user defines celsius or not.  I have handled this for the temperature, but the Dew Point and Heat Index are relative to the temperature.

I've also addressed some areas where I'd previously assumed Celsius for reporting purposes as my test case is using Farenheit.
2022-07-19 21:47:56 +01:00
albarlow
bee48dae7e Update readme 2022-07-19 14:52:39 +01:00
albarlow
e12f7b67e5 Usermod BME280 Enhancements
I added a Usermod interface for key settings.  I used a PinArray for the SDA/SCL pins, but you can't name these individually.

I have also made a display to show the temperature/humidity values in the web interface's Info screen.

I had to change the definition of those items in order to allow these new functions to work.  I have not noticed any negative side effects to this change.

At the moment, I've not figured out how to make Celsius/Farenheit toggleable due to the way the #define setup works.

Finally, I have added a routine to publish MQTT Discovery Topics for Home Assistant (toggleable in the Usermod screen).

I've been testing this on the only suitable device I have for a few months and haven't noticed any problems.
2022-07-19 14:52:10 +01:00
Blaz Kristan
a8908238d5 Prevent race condition when saving bus config.
(loop() is executed on different core than handleSet())
2022-07-02 14:28:09 +02:00
Blaž Kristan
fd4c0e795a Merge pull request #2693 from softhack007/analogread_smoothing_fix_2587
noise filter for potentiometer reading - fix for issue #2587
2022-06-22 13:20:16 +02:00
Frank
c79eb43347 disabled second check for strip.isUpdating()
commented out the second `strip.isUpdating()` check, because it should not be neccesary; Strip.service() is called after handleIO()/handleButton().
2022-06-22 12:36:47 +02:00
Blaž Kristan
860e74bffa Comment & float constant. 2022-06-22 09:58:21 +02:00
Frank
ed374684a6 Update button.cpp
overlooked one
2022-06-20 22:00:23 +02:00
Frank
169a46c38c button.cpp: marked literal constant as "float! 2022-06-20 21:56:16 +02:00
Frank
1dbea434a3 fix for issue #2587 2022-06-20 16:04:43 +02:00
dependabot[bot]
0dd12cf0a6 Bump bottle from 0.12.19 to 0.12.20 (#2683)
Bumps [bottle](https://github.com/bottlepy/bottle) from 0.12.19 to 0.12.20.
- [Release notes](https://github.com/bottlepy/bottle/releases)
- [Changelog](https://github.com/bottlepy/bottle/blob/master/docs/changelog.rst)
- [Commits](https://github.com/bottlepy/bottle/compare/0.12.19...0.12.20)

---
updated-dependencies:
- dependency-name: bottle
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-16 10:31:14 +02:00
Blaž Kristan
19c8b4fe2d Merge pull request #2665 from Stoom/segment_bri_fix
🐛 fix(json): allow for using `~-16` or `~16` when setting a segments brightness though the JSON api
2022-05-29 11:02:59 +02:00
Daniel Poelzleithner
26fa38d052 Watchdog: disable watchdog while OTA is running 2022-05-23 22:30:13 +00:00
Jamie Stoom
db8e1dec3e 🐛 fix(json): allow for using ~-16 or ~16 when setting a segments brightness though the JSON api 2022-05-09 18:06:45 -07:00
Daniel Poelzleithner
213e3e998a Enable ESP watchdog by default
Use the ESP watchdog to detect hanging ESP and reset the firmware.
Can be disable by defining WLED_WATCHDOG_TIMOUT 0
Default timeout is 3 seconds on ESP32 and 8 seconds on ESP2688
2022-05-05 11:33:00 +00:00
Luke Plassman
bef9c68f81 Working DMX Libraries (#2652)
* added SparkFunDMX library dependencies

* changed variable names to avoid conflicts with SparkFunDMX library

* board version checks

* minor changes to DMX

* fix brightness when no shutter DMX channel is set

* fix compile issue on newer ESP32 variants
2022-05-05 02:28:09 +02:00
ChuckMash
099d2fd03d WiZ Lights usermod - Adding more options and features (#2638)
* Update wizlights.h

adds new features and options for wizlights usermod

* Update wizlights.h

Change how IPs are numbered.
Non-programmers incorrectly start counting at 1

* Update wizlights.h

updated default cold white enhanced white setting to a lower value.

* Update wizlights.h

added logic for connection check before UDP sending.
Seems more important for ESP32

* Update readme.md
2022-05-03 12:18:21 +02:00
Blaz Kristan
23d39e5366 Compile time options for Multi Relay & PWM Fan 2022-04-29 09:56:48 +02:00
Thomas
1a513c7bbf wled.cpp: Wrap Serial calls in #ifdef WLED_ENABLE_ADALIGHT. (#2630)
handleImprovPacket() unconditionally gobbles serial data which a problem
if we want another feature to consume it. This patch uses the same guard
as the existing call in `handleSerial()`.

Co-authored-by: Thomas Fubar <FUB4R@users.noreply.github.com>
2022-04-17 00:08:27 +02:00
ChuckMash
d1f76042e1 bugfix for outgoing serial TPM2 message length (#2628)
bugfix for outgoing serial TPM2 message length
2022-04-12 10:20:08 +02:00
Christian Bartsch
9cd8acab43 Usermod: Add support for Si7021 temperature and humidity sensors (#2617)
* added first version (work in progress)

* added some sensors to publish

* typo

* added dependency

* mqtt si7021_* names + don't  retain

* timer to 60 s

* some changes to HA auto discovery

* added config entries (no function yet)

* renaming

* made configs work

* added getId()

* refactoring + wrong mqtt topics fixed

* retain HA auto discovery

* do not spam serial console on each sensor update

* added readme

* add update interval info

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-04-03 22:30:37 +02:00
4lloyd
8b79a9708b Next universe overflow and Art-Net DMX start address (#2607)
* Improve calculation LEDs in next universe

* Fix Art-Net DMX start address
2022-04-03 17:52:36 +02:00
cschwinne
e362b3b6aa Fixed sunset time off by an hour on DST change day (fixes #2603) 2022-04-01 02:07:50 +02:00
Christian Schwinne
d2ced93e58 Merge pull request #2601 from Aircoookie/minseg-udp
UDP on main segment only.
2022-04-01 01:24:13 +02:00
cschwinne
958cd35e21 Live mainseg improvements
Make override work in mainseg mode
Move unfreeze on turn on from UI to JSON parser
Fix mainseg not unfreezing on timeout
2022-04-01 00:59:19 +02:00
Spectre
46eae410c3 add My9291 light bulb driver (#2599)
Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-03-31 20:49:00 +02:00
Stefan Riese
73a9e1c316 V2 usermod for wordclock with 11x10 LEDs and 4 minute dots (#2608)
* - implement V2 Usermod to handle wordclocks with 11x10 pixels and 4 additional dots for the minutes

* - fix wording issue for "six"
-

* - add some more comments

* - fix issue with "zwölf"
2022-03-31 20:31:37 +02:00
cschwinne
03862d4b6c Add icon font 2022-03-28 23:23:38 +02:00
Blaz Kristan
ae90aa4ccc Power off. 2022-03-28 23:07:37 +02:00
Blaz Kristan
b583def913 Using freeze instead of power for segment.
Fix for missing udp.cpp
2022-03-28 20:44:49 +02:00
dependabot[bot]
dd85da053f Bump minimist from 1.2.5 to 1.2.6 (#2602)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 09:44:17 +02:00
Blaz Kristan
6079effae3 UDP on main segment only. 2022-03-25 17:20:41 +01:00
Woody
8d2fe315db Fix cross-origin error in File Mode (#2585)
* fixed cross-origin error

* removed unnecessary code

* try/catch for parent WS

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-03-24 12:17:10 +01:00
Eduardo Ibanez
22c3ac5be3 Add usermode to control Wiz lights (#2595)
* Add usermode to control Wiz lights (#1)

* Fix inclusion in usermods list

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2022-03-23 16:20:18 +01:00
cschwinne
a517f0df1d Add ESP32-ETHERNET-KIT-VE type 2022-03-20 22:12:18 +01:00
cschwinne
9c9854b6bf Fixed sunrise/set calculation 2022-03-19 19:27:32 +01:00
cschwinne
d280e16723 Fixed /json/cfg unable to set busses (fixes #2589) 2022-03-19 14:21:14 +01:00
cschwinne
b93a9cb8bc FIxed liveview 2022-03-18 14:24:10 +01:00
cschwinne
8601052179 Fixed liveview buffer over-write (fixes #2586 )
(with odd LED counts > 256)
2022-03-18 14:08:37 +01:00
cschwinne
eaa20ff4bf Add handleOverlayDraw() to example v2 usermod 2022-03-16 19:32:11 +01:00
Blaž Kristan
e4c6e4bc48 Merge pull request #2584 from tonyn0/master
DDP in AP mode.
2022-03-16 17:31:09 +01:00
Blaž Kristan
c52597205e Merge branch 'master' into master 2022-03-16 17:29:12 +01:00
tonyn0
c73033c0b4 udp.cpp update
added ap check for ddp in L657
2022-03-16 11:00:29 -05:00
cschwinne
522e752582 Add ability to skip up to 255 LEDs (#2342) 2022-03-16 01:45:07 +01:00
SpeakingOfBrad
854ed8cfa9 ABL milliamps no longer hardcoded to 850 at runtime (#2581) 2022-03-16 00:35:49 +01:00
SpeakingOfBrad
4642205768 Optionally set led strip color order at runtime. (#2582) 2022-03-16 00:17:49 +01:00
André Klitzing
40dbfbe092 Update IRremoteESP8266 to 2.8.2 (#2579)
This fixes some C3 issues
2022-03-16 00:16:49 +01:00
cschwinne
6c315e5a9c 0.13.1
Fix persistent preset bug
2022-03-15 03:45:20 +01:00
cschwinne
ef0f91d8d0 Release of WLED v0.13.0 2022-03-15 02:28:26 +01:00
cschwinne
9552784e72 Remove persistent argument from savePreset()
(fixes temp preset not applicable by APIs)
Default to 5Mhz hardware SPI driving (#2558)
2022-03-14 20:53:00 +01:00
SpeakingOfBrad
f068327307 Add option to set module name at runtime, and add extra examples in platformio_overrides.ini (#2578)
* Added option to set the name of the module at runtime.

* added example how to set number of LEDs at runtime

* Example to enable/set IR remote type at runtime

* Clarification on how to use platformio_overrides

* Example for setting abl milliamp limit at runtime

* Corrected example set LED count
2022-03-14 18:23:53 +01:00
cschwinne
1bc698ae78 Button 0 long press factory reset
JS simplification
2022-03-14 12:26:45 +01:00
cschwinne
1b2134d7a8 Add old blinds usermod 2022-03-11 09:20:01 +01:00
cschwinne
f922268af7 Remove unneeded brightness set in live Serial 2022-03-11 08:41:01 +01:00
cschwinne
4865ddb377 Fix realtime mode disabled by brightness change
Fix realtime mode not working immediately at turn on
Fix individual segment control not working immediately at turn on
2022-03-10 20:40:48 +01:00
cschwinne
a556732e4f Add ability to set presets from DMX
(effect mode with single channel)
2022-03-10 12:13:12 +01:00
cschwinne
0ea31cb088 Fix indefinite realtime terminated by new packet (fixes #2356 )
Add custom Aircoookie fork of ESP32 core (reduces bin size by >100kB)
2022-03-10 11:20:39 +01:00
cschwinne
b626c7620e Disabled auto white mode in segments with no RGB bus 2022-03-08 02:16:33 +01:00
cschwinne
5d90d8930e Fix non-0 terminated hostname str 2022-03-07 20:37:48 +01:00
PLCHome
b01309c3bf Mixed content exception in web browser in websocket communication on peek behind an https backproxy. (#2571)
"ws://" must be the change to the "wss://" for encryption
2022-03-07 18:26:53 +01:00
cschwinne
961d5591bd Fixed Popcorn mode not lighting first LED on pop 2022-03-07 00:53:20 +01:00
cschwinne
eca3f12fed Fixed analog overlay not settable 2022-03-07 00:11:43 +01:00
cschwinne
a2c8796e04 Replaced native Cronixie support with usermod 2022-03-06 23:47:36 +01:00
cschwinne
ad301fd087 Elekstube usermod enhancements
Coloring of grayscale images
Dimming control from configurable segment
2022-03-06 22:24:24 +01:00
cschwinne
02b08939cd No color order select on PWM busses (fixes #2569) 2022-03-06 11:48:17 +01:00
cschwinne
9b0d583f1b EleksTube usermod 1, 4, 8 BPP BMP support 2022-03-05 21:48:11 +01:00
RedNax67
4a0a07f158 Added digit dimming and support for .clk format (see https://github.c… (#2555)
* Added digit dimming and support for .clk format (see https://github.com/aly-fly/EleksTubeHAX)

* Small fixes and improvements, dimming optional

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-03-05 03:10:32 +01:00
Christian Schwinne
9c864c9759 UI: show color controls based on segment light capabilities (#2567)
* Dynamic hiding of unused color controls in UI

(e.g. a PWM white bus with no auto white mode will not display the color wheel or palette list)

* Store segment capabilities

Don't use palettes if no RGB supported
Make it safe to update busses using `/json/cfg`
2022-03-05 01:05:26 +01:00
cschwinne
85b1c309d1 Relative value wrapping and operator fix (fixes #2566 ) 2022-03-04 14:42:35 +01:00
cschwinne
6fe43b7b5c Separate color memory from slot selectors
Slot selector dynamic text color black/white
Selected slot selector JS simplification
2022-03-03 20:54:54 +01:00
Blaz Kristan
25427ee60d Fix:
- disbled timed preset expanding
- incorrect calendar icon on Mac/Firefox
2022-03-03 10:57:07 +01:00
cschwinne
be90bf0188 Minor CSS simplifications 2022-03-01 18:22:54 +01:00
cschwinne
adcdaba199 Indentation: Consistent use of Tab
Added style guide
Updated changelog
2022-03-01 12:14:41 +01:00
cschwinne
17907589cc Indentation: Consistent use of Tab for CSS 2022-03-01 11:20:10 +01:00
cschwinne
f333df181f Small CSS alignment adjustments
mainseg is not highlighted by default, but can be enabled by CSS only
Simplify some CSS (new segment box, segment brightness slider)
Started labeling CSS classes
2022-03-01 11:13:56 +01:00
Blaz Kristan
4ce557a829 Multiple fixes:
- ability so select mainseg (UI)
- changed preset sort (UI)
- IR40 white +/- fix
- IR repeatable actions fix
- minor UI CSS change
- removed unnecessary color functions
2022-02-27 22:19:05 +01:00
Christian Schwinne
fc845dc936 Add locate button for easy lat/lon auto-fill (#2559) 2022-02-26 01:37:30 +01:00
Blaž Kristan
7beae93441 IR rewrite. (#2561)
* IR rewrite.
- added CCT (WW/CW) support
- support for applying change to main segment or all selected segments

* Remove extra setValuesFromFirstSelectedSeg()

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2022-02-26 01:37:09 +01:00
cschwinne
4d4a20e05e 0.13.0-b7
Mitigate Pixel 6 UI issue
2022-02-24 01:16:24 +01:00
cschwinne
c03d4f115f Fixed presets not triggering interface update 2022-02-23 19:42:34 +01:00
cschwinne
ed90b638a9 Main seg replaced by first selected in internal interfaces
Version bump to 0.13.0-b7
Various small improvements
2022-02-23 19:20:07 +01:00
cschwinne
94a0199955 Readme cleanup 2022-02-21 22:26:35 +01:00
cschwinne
44739c5198 Merge effectChanged and colorChanged to stateChanged 2022-02-21 22:12:13 +01:00
cschwinne
5f871bc01f HTTP API: Set segments directly in set.cpp 2022-02-21 20:48:11 +01:00
cschwinne
1f5971f15a Another HTTP API segment improvement 2022-02-21 18:31:19 +01:00
cschwinne
694466a196 Apply segment by Enter key on input field 2022-02-21 17:58:18 +01:00
cschwinne
03311d3776 Do not set main seg before apply
Setting mainseg before applyValuesToSelectedSegs() causes the updated value to not be set to other selected segments
2022-02-21 16:57:18 +01:00
cschwinne
ae0eba866a Improve Stream and fix HTTP segment application 2022-02-21 16:19:11 +01:00
cschwinne
906737bedb Changelog update 2022-02-20 02:15:34 +01:00
Christian Schwinne
7138e891be Add per-segment light capability info (#2552)
* Add per-segment light capability info

* Fix duplication

* Change to more lightweight seglc array

* Added segment capabilities.

* Differs and capabilities refactoring

* Add back selection differs option

Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
2022-02-20 00:20:22 +01:00
Christian Schwinne
53abe36b83 Merge pull request #2547 from Aircoookie/sync-segbounds2
Sync segment bounds
2022-02-19 23:00:31 +01:00
cschwinne
efbb7a034c Slight websocket reconnection tweaks 2022-02-19 22:47:17 +01:00
Blaz Kristan
05bc81bf4e Add default preset name if none specified. 2022-02-19 11:42:59 +01:00
Blaz Kristan
f8bc0bd2b5 Removed unnecessary if. 2022-02-18 19:23:55 +01:00
Blaz Kristan
cf94cb1092 Allow saving preset from IR
Removed double clolorUpdated() call
2022-02-18 18:35:51 +01:00
Blaz Kristan
02d92e32c7 Parsing IR JSON cmd fix. 2022-02-18 17:01:34 +01:00
Blaž Kristan
7f92607b85 Added WS reconnect on error toast. 2022-02-17 12:51:37 +01:00
Blaž Kristan
3be4b69b44 WS reconnect logic & WS memory leak protection 2022-02-17 12:45:50 +01:00
Tom D'Roza
bb9afcb304 Added: CSS hover effect on buttons within modal dialogs, e.g. Info, Nodes (#2545)
* Added: CSS hover effect on buttons within modal dialogs, e.g. Info,
Nodes

* Update index.css

Co-authored-by: Tom D'Roza <Tom.D'Roza>
Co-authored-by: Christian Schwinne <cschwinne@gmail.com>
2022-02-17 00:38:47 +01:00
cschwinne
e9a05890a5 Return to core 2.7.4 for higher stability 2022-02-17 00:17:00 +01:00
cschwinne
613809c2af Do not turn rpt segments off 2022-02-16 23:54:14 +01:00
cschwinne
7b969bb8c2 Various state changed logic simplifications
Changed main segment, must be selected
2022-02-16 21:12:33 +01:00
cschwinne
7aef551292 Segment bounds sync option 2022-02-16 14:55:35 +01:00
cschwinne
447b811fa0 Remove build flag leading to wdt reset on some boards 2022-02-14 18:49:13 +01:00
dependabot[bot]
435040814d Bump ajv from 6.12.2 to 6.12.6 (#2543)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-14 15:35:13 +01:00
Blaž Kristan
9987416a4a Allow float array values in usermod config. 2022-02-14 12:19:33 +01:00
Blaž Kristan
31e33e0a8b Fix for creating segments if config set to length. 2022-02-14 08:15:35 +01:00
cschwinne
b211d8b085 Fix SSDR usermod if SN_Photoresistor mod is not included 2022-02-10 19:48:13 +01:00
Blaž Kristan
83416ee2e0 Merge pull request #2530 from Proto-molecule/patch-api
bugs, json remote repeat, cmd &R=
2022-02-10 14:06:34 +01:00
Blaz Kristan
fa981a389f Add transitions to other segments. 2022-02-10 13:59:59 +01:00
Blaz Kristan
55817f31f9 Merge branch 'master' into patch-api 2022-02-10 13:48:48 +01:00
Blaž Kristan
6d2ef4e0bf Merge pull request #2539 from dylan09/multirelay-discovery
Fixed buffer overflow in HA autodiscovery. #2538
2022-02-10 00:33:16 +01:00
ulrich
4d714cf9a4 Fixed buffer overflow in HA autodiscovery. #2538 2022-02-09 23:08:42 +01:00
cschwinne
930ded6767 Fix touch pin 2022-02-09 19:59:17 +01:00
Blaz Kristan
4cdb18907f Fix for Four Line Display usermod. 2022-02-09 19:27:52 +01:00
Henry Gabryjelski
38bc618ee5 Float and better 3rd party library compatibility (#2534)
* define as float (not double)

* Avoid #define of 1 or 2 char symbols

Having this file define 'A' and 'C' pollutes
the global namespace, and causes conflicts
with other libraries that also pollute the
global namespace with short #defines.
It's easier to fix this header.

* unused variable warning
2022-02-09 09:46:54 +01:00
Christian Schwinne
00b0193a43 Fix re-init segment data leak (fixes #2535 ) (#2536) 2022-02-09 08:43:35 +01:00
bole5
f9bce54104 Change Default Relay Pin to -1 (#2531) 2022-02-08 00:15:24 +01:00
bole5
7ee14724fc Improve Pin Manager Debugging (#2532) 2022-02-08 00:03:20 +01:00
Blaz Kristan
4eb0dbb5a4 repeat actions cleanup & fix 2022-02-07 11:13:12 +01:00
Proto-molecule
8c5b3fe23e bugs, json remote repeat, cmd &R= 2022-02-06 19:00:03 -08:00
cschwinne
97f8eea302 Refactored isRgbw to hasWhiteChannel() 2022-02-04 13:28:00 +01:00
cschwinne
04d5932252 Un-F()-ed some strings
(that were either occuring at least 4 times, or were F()-ed in some places and not in others)
2022-02-04 10:10:37 +01:00
cschwinne
b33c5798ee Changelog update 2022-02-03 23:37:30 +01:00
Blaz Kristan
6180c2f948 Fix for overallocated LiveView buffer. 2022-02-03 20:21:09 +01:00
Christian Schwinne
795c515999 Merge pull request #2517 from ChuckMash/serial+
Extend Serial functions. Baudrate changeable during runtime and fast LED data retrieval
2022-02-01 20:07:30 +01:00
cschwinne
00dbdc2267 Baud rate setting 2022-02-01 20:02:46 +01:00
cschwinne
32286888e5 PinManager, cleanup and tmp2 out 2022-02-01 18:21:30 +01:00
Christian Schwinne
565d8d8f04 Binary Websockets for Peek (#2516)
* Binary Websockets for Peek

* No IRAM_ATTR here

* Use builtin LittleFS for all ESP32 builds

* Attempt LittleFS compilation fix

* Use tasmota zip for all ESP32 builds

* Revert to Arduino Core 1 for the time being
2022-02-01 12:02:04 +01:00
Blaž Kristan
0a5a0bef48 Enhanced usermods. (#2522) 2022-02-01 09:33:57 +01:00
Blaz Kristan
6e0e5c102e Added extractModeName() utility function. 2022-01-31 20:43:35 +01:00
Blaz Kristan
be8a9ae73b setPixelSegment() optimization 2022-01-31 17:56:21 +01:00
Sousanator
afaa001738 Merge branch 'master' into master 2022-01-30 10:51:51 -05:00
ChuckMash
22fbb0e35b Update wled_serial.cpp
Adds serial functionality

Can now change baud rate during runtime to be faster
Retrieve LED strip data as JSON blob
Retrieve LED strip data as BYTES (fast!)
2022-01-28 23:35:40 -08:00
Blaž Kristan
e17203ca1b Fix for expand timed presets. 2022-01-28 13:51:52 +01:00
Blaz Kristan
3170fa2208 Playlist bugfix. 2022-01-27 21:00:43 +01:00
Blaz Kristan
07216db864 Merge branch 'master' of https://github.com/aircoookie/WLED 2022-01-27 19:26:56 +01:00
Blaz Kristan
fec870f264 Fix for default action not triggering colorUpdated 2022-01-27 19:26:53 +01:00
cschwinne
2c5eba335f Added white channel to Peek (closes #1716) 2022-01-26 13:26:57 +01:00
Mike Ryan
fb19f1ecbc Allow overriding of color order by LED pixel range. (#2463)
* Overridable color order

- Use `ColorOrderMap` to hold optional color order overrides for ranges
  of LEDs.
- Serialization of config to/from filesystem is complete.
- Back-end configuration is complete.
- TODO: front-end changes to the LED settings page.

* Add Color order override settings

- Adds color order override section to settings page.

* PR Feedback

- Limit max number of color order overrides to 5 on ESP8266
- Only append color overrides if they were provided in the POST of LED
  settings.
2022-01-26 00:42:04 +01:00
Blaž Kristan
e879fe5843 Remove obsolete usermods. (#2510) 2022-01-25 16:42:35 +01:00
Blaž Kristan
0ca7699fe5 Merge pull request #2427 from Aircoookie/sync-seg
Sync segment options.
2022-01-25 12:54:24 +01:00
Blaž Kristan
7f6adfa331 Converted indentation tabs to spaces. 2022-01-25 12:47:14 +01:00
cschwinne
5f0b102671 Send segment ID, start, stop, and cct 2022-01-24 18:31:05 +01:00
cschwinne
d28eb6ae21 Repeat other seg than 0 bugfix 2022-01-24 16:44:47 +01:00
André Klitzing
eca980dfca Add initial support for ESP32-C3 (#2454)
* WIP Add support for ESP32-C3

* Add esp32c3 to default_envs

* Use new platform from tasmota

* Switch back to 2.8.1 as it seems by fixed
2022-01-24 11:34:02 +01:00
Jason2866
742c792ec7 Use latest Arduino ESP32 (#2502)
build with IDF44-rc1 and Arduino from 21.01.2022. Toolchains updated to 8.4.0 2021r2-patch2
The platform can be used for ESP32, ESP32-S2 and ESP32-C3
2022-01-24 11:28:49 +01:00
Blaž Kristan
9b062f33c5 Merge pull request #2450 from frankalicious/patch-1
fix name of image for ST7789 usermod
2022-01-22 23:07:15 +01:00
Blaž Kristan
ea15c2245e Merge pull request #2497 from herm/usermod_multirelay
Add Home Assisant MQTT autodiscovery for usermod multi_relay.
2022-01-22 22:57:24 +01:00
Blaz Kristan
26ae6d3691 Added config option for HA autodiscovery. 2022-01-22 20:49:43 +01:00
cschwinne
f97bc9dba8 Fix DMX menu settings item 2022-01-21 20:35:30 +01:00
Blaz Kristan
fe6b1c13c4 Periodic broadcasts. 2022-01-21 16:08:02 +01:00
Blaz Kristan
5608425a12 Added comments.
Fix for incorrect boot state.
2022-01-21 15:55:25 +01:00
cschwinne
f784b01d20 Update year 2022-01-21 01:48:50 +01:00
Hermann Kraus
2648eba5bf Deprecate usermod mqtt_switch. (#2499) 2022-01-20 23:31:28 +01:00
Blaz Kristan
255347ab77 Minor clenup. 2022-01-20 17:38:18 +01:00
Hermann Kraus
52c36ef6a4 Add Home Assisant MQTT autodiscovery for usermod multi_relay. 2022-01-20 00:30:17 +01:00
Blaz Kristan
e54819e7e5 Merge branch 'master' into sync-seg 2022-01-15 14:08:08 +01:00
Blaz Kristan
7eb029dcb6 Complete segment syncing.
Reduced complexity of colorUpdated regarding effect/color change.
Minor optimizations.
2022-01-15 14:04:16 +01:00
André Klitzing
f8c80283e4 Use arduino-esp32 2.0.2 for ESP32-S2 (#2452)
* Use arduino-esp32 2.0.2 for ESP32-S2

LittleFS is merged into it.

* Fix filesystem error for ESP32-S2

Use platform of tasmota until upstream released it and
use board_build.flash_mode = qio

* Fix empty disk usage

* Add esp32s2_saola to default_envs

* Remove lorol LITTLEFS for esp32dev, too

* Revert "Remove lorol LITTLEFS for esp32dev, too"

This reverts commit 3586d5eef7.
2022-01-14 17:19:33 +01:00
Blaž Kristan
04f5bdb843 Fix for NTP sync on millis() rollover.
AP mode delay on boot (#2242).
2022-01-10 13:53:11 +01:00
Blaz Kristan
aba4dc7c50 Bugfix for analog button read limitation. 2022-01-09 15:13:58 +01:00
cschwinne
7fb46cf982 WIP: Segment loop size byte 2022-01-09 14:16:07 +01:00
Blaz Kristan
ae8281f835 error in udpIn 2022-01-07 21:16:14 +01:00
Blaž Kristan
fa35293618 Full segment syncing. 2022-01-07 19:12:06 +01:00
Blaž Kristan
20ccca0aec Swapped grouping and spacing in UDP packet. 2022-01-07 17:53:07 +01:00
Blaž Kristan
10e216da6b Fix for missing middle segment. 2022-01-07 17:48:46 +01:00
Blaž Kristan
6491353a57 Missing rptSeg() 2022-01-07 17:31:28 +01:00
IgorMarkovic
9f44f989e5 Fix staircase mode segment 1 animation (#2469) 2022-01-05 16:09:25 +01:00
cschwinne
33f72e40da Replace icon unavailable on some mobile browsers 2022-01-02 18:06:42 +01:00
Blaž Kristan
18868a5bd6 Date controlled timed presets. (#2447)
* Date controlled timed presets.

* C/P fix for sunset.

* Fixed % escape character

* Date range support

* Date logic fix

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-12-31 14:09:48 +01:00
Christian Schwinne
754682577c Configurable framerate (#2444)
Updated arduino core versions
Better performance on esp32 core 3.x due to IRAM_ATTR
Fixed analog busses init to full white/on
2021-12-30 01:48:27 +01:00
Sousanator
71520f6709 Update const.h
Added option for LDP6803
2021-12-27 18:06:58 -05:00
Sousanator
3f5a09229d Update settings_leds.htm
Added option for LPD6803
2021-12-27 18:04:14 -05:00
Sousanator
5609771993 Update html_settings.h 2021-12-27 18:01:42 -05:00
Sousanator
79b01cdc3c Update bus_wrapper.h
Added support for LPD6803
2021-12-27 17:54:37 -05:00
frankalicious
aef0243b73 fix name of image for ST7789 usermod 2021-12-26 11:06:20 +01:00
akshay rajput
736053e24e Patch to remove preceding zero of hour digit for 7segment usermod (#2445)
* Update usermod_seven_segment_reloaded.h

* Update usermod_seven_segment_reloaded.h
2021-12-26 02:29:56 +01:00
Blaz Kristan
2c14181051 LAT/LON helper for Samsung devices. 2021-12-23 20:32:45 +01:00
Blaz Kristan
296fe4b62e Unload playlist on timed presets. 2021-12-21 22:46:06 +01:00
Blaz Kristan
118f02fd11 Unload playlist on timed presets. 2021-12-21 18:47:21 +01:00
Blaz Kristan
990d0f6e3e Fix for skipping reset of segments when changing spacing. 2021-12-21 18:26:51 +01:00
Blaz Kristan
84624666ce Incorrect delete fix. 2021-12-21 18:16:25 +01:00
Blaz Kristan
8bd716c056 Prevent undefind FX behaviour on millis() rollover 2021-12-20 16:43:47 +01:00
Andy Hofmann
cd95abb2a1 Usermod quinled-an-penta: Updated IOs for v1r1 release (#2429)
* UM QuinLED-An-Penta: First version

* UM QuinLED-An-Penta: Made OLED seconds a setting; small improvements

* UM QuinLED-An-Penta: Fixed unique ID

* Merge branch 'master' of https://github.com/Aircoookie/WLED

* UM QuinLED-An-Penta: Fixed config loading

* UM QuinLED-An-Penta: Replaced ledcRead() with calculating the percentage

* UM QuinLED-An-Penta: Fixed temp sensor readings

* UM QuinLED-An-Penta: Removing OLED bus clk setting

* UM QuinLED-An-Penta: ETH support, lots of OLED improvements

* UM quinled-an-penta: v1r1 adjustments
2021-12-20 01:41:37 +01:00
Blaz Kristan
1270f2d577 Sync segment options.
Freeze effect.
Repeat last segment until end.
2021-12-17 20:33:48 +01:00
Blaž Kristan
c27117e99e Merge pull request #2415 from Aircoookie/i2c-sharing
Pin manager support for sharing multipin buses.
2021-12-16 19:57:08 +01:00
Blaž Kristan
28556790d6 Removed loadInfo() in animated staircase. 2021-12-14 10:35:50 +01:00
Blaž Kristan
41c9bb63a0 Pin manager support for sharing multipin buses. 2021-12-14 09:38:38 +01:00
Roman Reitschmied
7d5e2466f0 add ability get LDR value from other usermods (#2408) 2021-12-12 00:31:54 +01:00
Roman Reitschmied
d3f35955d6 New flexible usermod for seven segment displays (#2409)
* add first version

* added max/min brightness to autoldr functionality

* added more information to the readme
2021-12-12 00:31:21 +01:00
cschwinne
fb338c0728 Button preset call mode
(stops main segment values from being applied to all presets)
2021-12-11 23:44:21 +01:00
cschwinne
2ce8f1ee5d Skip first and apply preset fixes 2021-12-11 19:30:11 +01:00
Blaz Kristan
3f0258e215 Playlist corrupting JSON buffer bugfix. 2021-12-10 20:45:37 +01:00
Christian Schwinne
e72a8d999f Merge pull request #2393 from guardmedia/blends-effect
Improved speed and reduced memory usage for Blends effect
2021-12-10 18:42:46 +01:00
Blaž Kristan
fed16fd14e Fix for disconnects on ESP8266 with static JSON buffer 2021-12-10 17:30:57 +01:00
Blaž Kristan
5dbc45ecb9 Fix for incorrectly placed release JSON buffer. 2021-12-10 17:06:04 +01:00
Blaz Kristan
094bdb29b6 Fix for >10 buttons. 2021-12-08 22:41:16 +01:00
cschwinne
9e6866c160 0.13.0-b6 2021-12-08 01:22:48 +01:00
cschwinne
7101ad81c4 No auto white for RGB DDP bus 2021-12-07 13:37:28 +01:00
cschwinne
8643263227 Add two new Fairy FX modes 2021-12-07 11:03:41 +01:00
Tyler Walters
eab132ed32 Improved speed and reduced memory usage for Blends effect
color_blend() function only generates 256 colors from the palette before repeating. Improved the function to use either 256 max or the segment length if shorter.
2021-12-06 22:17:35 -05:00
Christian Schwinne
66bad2b6f8 Single json buffer (#2336)
* Single/static JSON buffer for all requests.

* Missing json.cpp changes.

* Async fix.

* Added conditional compile (WLED_USE_DYNAMIC_JSON).

* Advanced locking with time-out.

* Missing releaseJSONBufferLock() on error response.

* Fix for config saving.

* Fixes and optimisations.
Dadded debugging information.

* Fix for ledmaps.

* No unsolicited serial sending if GPIO1 allocated

* Stray semicolons

* Fix JSON ledmap

Co-authored-by: Blaz Kristan <blaz@kristan-sp.si>
2021-12-04 01:05:01 +01:00
cschwinne
46ec504743 Various fixes
Fixed ESP32 crash on Colortwinkles brightness change
Fixed setting picker to black resetting hue and saturation
Fixed auto white mode not saved to config
2021-12-03 20:36:37 +01:00
cschwinne
cadda12371 Fixed spacing LEDs not blanked if offset is changed 2021-12-02 00:52:36 +01:00
cschwinne
a643b56555 Fixed no color updated on full JSON state request 2021-12-01 23:03:30 +01:00
cschwinne
f7404085de Unload playlist on PL= 2021-12-01 00:20:33 +01:00
cschwinne
33036e7599 Fix sliders on page load if black is set 2021-12-01 00:16:43 +01:00
Christian Schwinne
f6e5b67f0d Merge pull request #2285 from Aircoookie/CCT-support
CCT (color white balance support)
2021-11-30 23:41:13 +01:00
Jeff Cooper
9547ac353d Save and load the e131 Proxy Universe setting in the DMX menu (#2365) 2021-11-30 23:10:23 +01:00
cschwinne
48339b19d4 Status LED support in Bus manager 2021-11-30 22:52:17 +01:00
cschwinne
11c7ffad4e Alexa and UDP sync CCT support 2021-11-28 04:01:58 +01:00
cschwinne
1973424e05 Remove JSON ledmap
(to be implemented in #2336 )
2021-11-28 01:27:51 +01:00
Christian Schwinne
16d97d3c63 Merge branch 'master' into CCT-support 2021-11-28 01:21:57 +01:00
cschwinne
3e6728fedb Only do auto white calc for busses with white channel
Revert auto white to global setting
Rounded /settings buttons by blazoncek
Removed obsolete script from /settings
2021-11-28 01:21:17 +01:00
cschwinne
3e9aea072d CCT blending setting 2021-11-27 16:49:42 +01:00
Blaz Kristan
9f3e66fff0 Cleaning up indentations (sorry but my OCD is strong). 2021-11-27 11:50:18 +01:00
cschwinne
624993fc89 CCT transitions 2021-11-27 01:33:48 +01:00
cschwinne
ba8a00764a cctFromRgb option 2021-11-26 20:18:38 +01:00
cschwinne
3dec4a6651 UI slider and CCT adjustments 2021-11-26 02:06:05 +01:00
cschwinne
02fb2550d0 Shorter link color 2021-11-24 12:38:54 +01:00
cschwinne
37bd525638 Improve link contrast 2021-11-24 11:04:50 +01:00
cschwinne
ea0f37f5b9 CCT bus manager logic simplification
CCT from RGB if none set (-1)
2021-11-24 11:02:25 +01:00
Blaz Kristan
97b3c3db7b Incrementing & random effects, palettes via JSON. 2021-11-23 20:05:51 +01:00
cschwinne
b97b6dc144 Remove F macro for "ps" 2021-11-23 13:17:33 +01:00
cschwinne
c8d5218c65 Updated outdated wiki links in readme 2021-11-22 22:23:51 +01:00
cschwinne
80a657965e Fixed preset cycle not working from preset called by UI 2021-11-22 21:41:04 +01:00
cschwinne
b3324d22f5 allowCCT performance improvement 2021-11-21 23:46:44 +01:00
cschwinne
31b7cdff9b Change effect names to be more consistent 2021-11-19 12:34:14 +01:00
Christian Schwinne
0465298507 Merge branch 'master' into CCT-support 2021-11-18 16:50:24 +01:00
cschwinne
d31e4c7815 Added getPinOwner
Only disable builtin LED if bus to avoid breaking other things on the pin
2021-11-17 11:13:07 +01:00
cschwinne
4af1f62aab Revert testing PIO changes 2021-11-17 01:19:04 +01:00
cschwinne
bc403440ba 0.13.0-b5 2021-11-17 01:18:19 +01:00
Christian Schwinne
38d8dfe5ab Improv support (#2334)
* Working Improv device identification

* Improv functional

* Cast fix

* Minor fix for two back-to-back Improv packets

* Improv checksum update and logic simplification

* Improved improv failed connection behavior
2021-11-16 23:20:26 +01:00
Blaz Kristan
eb92c0bbf5 Fix for ACCURATE auto-white mode. 2021-11-11 17:34:38 +01:00
Jeff Cooper
6df64d0d31 Fix a bug which prevents DMX channel mappings from loading correctly. (#1525) (#2328) 2021-11-10 00:29:04 +01:00
cschwinne
83753a5f81 Fixed no gamma correction for JSON individual LED control 2021-11-09 17:50:29 +01:00
Blaz Kristan
3161f5fa47 Fix for network 'pin' conflicts. 2021-11-09 17:46:05 +01:00
Christian Schwinne
5784092c1b Fix settings JS buffer too small (#2323) 2021-11-09 09:56:02 +01:00
Blaž Kristan
d6ad089c60 Merge pull request #2324 from yoeywire/DMXdefine
Corrected WLED_USE_DMX to WLED_ENABLE_DMX
2021-11-09 07:57:41 +01:00
yoeywire
446b4b084c Changed WLED_USE_DMX to WLED_ENABLE_DMX 2021-11-08 17:05:47 +01:00
Blaz Kristan
d590e01a58 Merge branch 'master' into CCT-support 2021-11-05 21:27:52 +01:00
Shaun Eccles-Smith
adeb9bccb1 Use New Issue Forms for Bug Reports (#2312)
* Convert to Github Issue Forms

* Remove pre-filled title

* Change bug report from textarea to input
2021-11-04 12:23:53 +01:00
cschwinne
b44ffffed8 Fixed DDP override 2021-11-03 16:14:01 +01:00
Christian Schwinne
2bdaf53ecf Merge pull request #2311 from underritoSR/master
Add MX-CST/CDT Time Zone
2021-11-03 09:14:22 +01:00
Rod Minor
46e7db6d94 Add MX-CST/CDT Time Zone
Add the Mexico City CST/CDT timezone.
The start and finish date for DLS differs with the US-CST/CDT rules.
2021-11-02 21:26:11 -06:00
Christian Schwinne
7e1920dc4b Remove ledCount (#2300)
Bus initialization on reading from eeprom
2021-10-31 11:57:41 +01:00
Blaž Kristan
a93f05c047 Multirelay button support. (#2284)
* Multirelay button support.
Added button hook for usermods.

* Added MultiRelay relay states to JSON state object

* Move button timings to constants

No delay waiting for double press on button 0 if no macro set

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-10-31 11:57:03 +01:00
Christian Schwinne
00238247cd JSON in/decrementing (#2258)
* Initial JSON in/decrementing

* Segment brightness in/decrement

* Update json-increment (#2290)

* Add Basic Overlay support to Usermods.

* Add seven segment overlay usermod

* Add seven_seg debug build

* Add scrolling message to seven seg um

* Fixed red color on IP address

* bh1750

* Add msg scroll. Add MQTT and Config support

* Add readme

* Restore platformio.inii

* Edit comments

* Add strip off refresh option in LED settings. (#2259)

* Add strip off refresh option in LED settings.
New strip initialization logic.
Minor code clen-up.

* Dev code removal.

* Missing ethernet include

* Renamed mainseg to selseg

* Fix for preset cycling bounds.

* "Preset 0" bugfix.

* Auto segments only if segments were not modified

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>

* Exclude virtual busses from current calculation (#2262)

* Refactor string usage

* 0.13.0-b4

* Fix MQTT Null publish

* Additional Flash string concat

* Add AKST/AKDT

* UM RGB-Rotary-Encoder: Properly used PinOwner

* Cycling bugfix.

Co-authored-by: Gregory Schmidt <gregory.b.schmidt@hotmail.com>
Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
Co-authored-by: Caleb Mah <calebmah@gmail.com>
Co-authored-by: ezcGman <ich@andy-hofmann.com>

* Working JSON preset cycle

* Fix some Codacy style issues

Co-authored-by: Gregory Schmidt <gregory.b.schmidt@hotmail.com>
Co-authored-by: Blaž Kristan <blaz@kristan-sp.si>
Co-authored-by: Caleb Mah <calebmah@gmail.com>
Co-authored-by: ezcGman <ich@andy-hofmann.com>
2021-10-30 14:42:17 +02:00
Andy Hofmann
b33e28835d New Usermod: QuinLED-An-Penta (#2296)
* UM QuinLED-An-Penta: First version

* UM QuinLED-An-Penta: Made OLED seconds a setting; small improvements

* UM QuinLED-An-Penta: Fixed unique ID

* Merge branch 'master' of https://github.com/Aircoookie/WLED

* UM QuinLED-An-Penta: Fixed config loading

* UM QuinLED-An-Penta: Replaced ledcRead() with calculating the percentage

* UM QuinLED-An-Penta: Fixed temp sensor readings

* UM QuinLED-An-Penta: Removing OLED bus clk setting

* UM QuinLED-An-Penta: ETH support, lots of OLED improvements
2021-10-30 11:38:09 +02:00
Blaž Kristan
f55f803531 Updated aut-white calculation. 2021-10-27 14:02:48 +02:00
Blaz Kristan
8ca298b299 Removed legacy auto-white calculation.
Introduced color mangling macros.
Minor optimizations/fixes.
2021-10-26 19:17:42 +02:00
Blaz Kristan
090e29effd Moved auto white calculation to bus manager.
Other minor fixes.
2021-10-25 20:15:42 +02:00
Blaz Kristan
0acca2e313 Cycling bugfix. 2021-10-22 23:24:41 +02:00
Blaz Kristan
0d77027f60 Bugfix for white value. 2021-10-22 07:21:47 +02:00
Blaz Kristan
39b7b3ad53 CCT (color white balance support) 2021-10-20 20:29:13 +02:00
Blaž Kristan
00f1b483eb Merge pull request #2279 from ezcGman/um-rgb-rotary-encoder
UM RGB Rotary Encoder: Now properly using the PinOwner class and unique ID
2021-10-17 14:16:18 +02:00
ezcGman
c3d48acb4c UM RGB-Rotary-Encoder: Properly used PinOwner 2021-10-17 01:24:23 +02:00
Blaž Kristan
392bda7d8c Merge pull request #2261 from AK5nowman/overlayum
Basic Usermod Overlay support & Seven Segment UM
2021-10-13 06:14:32 +02:00
Blaž Kristan
10cfcdab8c Merge pull request #2264 from AK5nowman/Alaskatime
Add AKST/AKDT Time Zone
2021-10-11 07:37:52 +02:00
Gregory Schmidt
3f71d3b250 Add AKST/AKDT 2021-10-10 19:09:48 -08:00
Gregory Schmidt
1b50fbab22 Additional Flash string concat 2021-10-10 17:24:36 -08:00
Gregory Schmidt
303fc65a6a Merge branch 'master' of https://github.com/Aircoookie/WLED into overlayum 2021-10-10 17:06:12 -08:00
Gregory Schmidt
445b6ee13f Fix MQTT Null publish 2021-10-10 17:05:55 -08:00
cschwinne
8afaac1e30 0.13.0-b4 2021-10-11 02:42:58 +02:00
Gregory Schmidt
0327f9428e Merge branch 'master' of https://github.com/Aircoookie/WLED into overlayum 2021-10-10 16:27:47 -08:00
Gregory Schmidt
a5de66bbd5 Merge branch 'overlayum' of https://github.com/AK5nowman/WLED into overlayum 2021-10-10 16:26:42 -08:00
Gregory Schmidt
d47157eec3 Refactor string usage 2021-10-10 16:26:14 -08:00
Christian Schwinne
f4b47ed399 Exclude virtual busses from current calculation (#2262) 2021-10-11 02:19:53 +02:00
Blaž Kristan
8b2145bd88 Add strip off refresh option in LED settings. (#2259)
* Add strip off refresh option in LED settings.
New strip initialization logic.
Minor code clen-up.

* Dev code removal.

* Missing ethernet include

* Renamed mainseg to selseg

* Fix for preset cycling bounds.

* "Preset 0" bugfix.

* Auto segments only if segments were not modified

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-10-11 02:19:33 +02:00
Christian Schwinne
de454e8b78 Edit comments 2021-10-11 01:29:13 +02:00
Gregory Schmidt
6cd770b4c7 Restore platformio.inii 2021-10-09 11:29:41 -08:00
Gregory Schmidt
355525c248 Add readme 2021-10-09 11:14:52 -08:00
Gregory Schmidt
47d4e7381f Merge 'master' of Aircoookie/WLED into overlayum 2021-10-08 00:00:09 -08:00
Gregory Schmidt
5dac6690d7 Add msg scroll. Add MQTT and Config support 2021-10-07 23:56:57 -08:00
Christian Schwinne
b89f7180db Merge pull request #2257 from calebmah/bh1750-usermod
Add BH1750 usermod
2021-10-07 23:52:48 +02:00
Caleb Mah
2ebb837a15 bh1750 2021-10-08 02:11:39 +08:00
Blaž Kristan
849aa64678 Fixed red color on IP address 2021-10-07 14:11:47 +02:00
cschwinne
cbb12e1b7c Updated vid and changelog 2021-10-06 20:46:49 +02:00
Christian Schwinne
cc87ba4962 Merge pull request #2245 from Aircoookie/network-bus
Network bus/virtual WLED instances
2021-10-06 20:05:32 +02:00
Blaz Kristan
fb2e556726 Allow playlist as end preset in playlist.
Playlist chaining.
2021-10-06 19:01:56 +02:00
Blaz Kristan
3f0eb0a046 Code optimization, updated URL links. 2021-10-06 16:29:04 +02:00
cschwinne
7d6d9eddc4 Change virtual bus type range 2021-10-06 14:30:41 +02:00
Blaž Kristan
cf87da0ef3 Minor UI fixes. 2021-10-06 08:37:27 +02:00
Blaž Kristan
0775acedc0 Merge pull request #2250 from Proto-molecule/master
Fix Glyphs for 4 line display
2021-10-04 21:15:19 +02:00
Blaz Kristan
8f1cee2e61 Fixed mem calculation. 2021-10-04 19:44:46 +02:00
Blaz Kristan
caa9cc32d7 Removed double buffer.
Moved bri scaling into UDP function.
Prevent double DDP port allocation.
2021-10-04 19:41:20 +02:00
Blaž Kristan
b750f827c5 Merge pull request #2168 from itCarl/usermod_battery_status
Updated Usermod Battery Status Basic
2021-10-04 14:56:33 +02:00
Blaž Kristan
5d147163e5 Merge pull request #2251 from blazoncek/pwm-fan-usermod
Pwm fan usermod enhancement
2021-10-04 13:12:22 +02:00
Blaž Kristan
75fe1a19eb Merge master 2021-10-04 13:01:06 +02:00
Blaž Kristan
5c9405fffc Added configurable PWM fan parameters:
- min PWM value (%)
- IRQs per rotation
2021-10-04 11:48:03 +02:00
Proto-molecule
6457314794 Glyph fix for 4 line 2021-10-03 21:23:52 -07:00
Proto-molecule
84f4e3eedc Merge branch 'Aircoookie:master' into master 2021-10-03 18:13:01 -07:00
Blaž Kristan
b003ed3f03 PWM fan with temperature control usermod (#2246)
* PWM fan with temperature control usermod

* Fix for incorrect RPM reported.
2021-10-03 23:34:21 +02:00
cschwinne
330da137db Fixed virtual getPixelColor() returning scaled values 2021-10-03 22:01:50 +02:00
cschwinne
9e5d45d0de Optional custom start indices 2021-10-03 20:48:08 +02:00
Blaz Kristan
b5c15d97fa Fix for incorrect RPM reported. 2021-10-03 14:01:05 +02:00
cschwinne
6ddcba8917 Change currentPreset to byte
JSON API still returns -1 for no preset
2021-10-03 13:53:37 +02:00
cschwinne
91598cbbbf Remove Total LEDs field 2021-10-03 12:23:24 +02:00
Blaz Kristan
772c80aa85 PWM fan with temperature control usermod 2021-10-03 10:33:17 +02:00
Proto-molecule
a28345d858 Merge branch 'Aircoookie:master' into master 2021-10-02 12:33:02 -07:00
Proto-molecule
05b532b9eb Add new Usermod (#2244) 2021-10-02 20:19:12 +02:00
cschwinne
0b0d18f182 Fix preset variable 2021-10-02 20:10:52 +02:00
Blaz Kristan
c1b0877956 Bus implementation.
Added separate DDP listener.
LED settings overhaul.
Minor fixes:
- reduced LED memory
- boot brightness fix
- reduced debug frequency
- added usermod time spent debug
- mDNS glitch fix
2021-10-02 15:07:02 +02:00
Blaz Kristan
46b66c76ef Merge pbolduc/WLED/feature/upd-ddp-send into network-bus 2021-10-02 10:48:48 +02:00
Gregory Schmidt
d00b4335b5 Add scrolling message to seven seg um 2021-10-01 21:34:20 -08:00
Proto-molecule
7a129e6de1 Add new Usermod 2021-10-01 20:46:58 -07:00
cschwinne
17c20276a9 Make sbuff local
This should save 4 bytes per ESPAsyncE131 instance
2021-10-01 20:26:23 +02:00
Blaž Kristan
dc9dedf220 Fixed pin reservations. (#2214)
* Fixed pin reservations.
Added ethernet pin reservations.
Minor tweaks in usermods.

* Optional ADA compile (not default, free GPIO3 use)

* Move ethernet definitions

Remove pin 3 used check

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-09-30 16:30:44 +02:00
Gregory Schmidt
3ac772badc Add seven_seg debug build 2021-09-29 20:59:02 -08:00
Gregory Schmidt
22fc58d93b Add seven segment overlay usermod 2021-09-29 20:01:26 -08:00
Gregory Schmidt
ccd3152b24 Add Basic Overlay support to Usermods. 2021-09-29 19:23:32 -08:00
Blaž Kristan
7d929dcde6 Merge pull request #2236 from scottrbailey/ir_bri_fix
Add colorUpdated call
2021-09-29 17:44:20 +02:00
Scott Bailey
3a874bc8c7 Add colorUpdated call 2021-09-28 09:56:00 -07:00
cschwinne
8453cd82e9 Fixed DMXmap 2021-09-27 22:51:40 +02:00
cschwinne
f62e56b7ec Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-09-27 14:20:41 +02:00
cschwinne
2ac90bbb96 Fixed sunrise/set UTC offset 2021-09-27 14:20:21 +02:00
Blaž Kristan
f85f2d5d22 Merge pull request #2203 from protoplasma-mx/master
Updated links in files generated by cdata.js
2021-09-26 20:20:23 +02:00
Blaz Kristan
a94269ceb9 Novosibirsk time-zone. 2021-09-26 17:21:32 +02:00
Blaž Kristan
476ac263fb Merge pull request #2227 from blazoncek/master
Add "on":true to playlist JSON
2021-09-24 16:07:01 +02:00
Blaž Kristan
51a4f61a8f Add "on":true to playlist JSON 2021-09-24 12:20:20 +02:00
Blaz Kristan
267f5159a3 Wled math bugfix. 2021-09-23 20:38:50 +02:00
cschwinne
96422de031 0.13.0-b3 2021-09-21 23:37:35 +02:00
Blaž Kristan
f2043dc181 Merge pull request #2219 from blazoncek/analog-invert
Fix for missing inverted analog.
2021-09-21 12:19:15 +02:00
Blaž Kristan
e416ec9279 Removed dev types. 2021-09-21 12:05:28 +02:00
Blaž Kristan
5eb4ffb1cc Fix for missing inverted analog. 2021-09-21 11:59:23 +02:00
Christian Schwinne
8fae964ee8 Allocate segment data based on currently active segments (#2217) 2021-09-20 21:22:50 +02:00
cschwinne
baf49b88f4 Semi-working segment on/off transition 2021-09-20 21:22:04 +02:00
Phil Bolduc
3577da05ac Avoid redundant localIP calls, each call takes 0.700 us on ESP32 240Mhz (#2206)
* Avoid redundant localIP calls, each call takes 0.700 us on ESP32 240Mhz

* Fall through to check Wifi local ip if not connected to ETH

* Changed local var from ipAddress to localIP to better reflect content
2021-09-19 19:51:54 +02:00
Christian Schwinne
b8e8028eb9 Merge pull request #2184 from Aircoookie/fx-mods
FX optimisations and segment names
2021-09-19 15:16:23 +02:00
Gabriel
a899666e68 Merge branch 'master' of https://github.com/protoplasma-mx/WLED 2021-09-18 09:04:54 -05:00
Gabriel
10a52f8cf9 Updated cdata.js so generated files point to knoWLEDge 2021-09-18 09:02:37 -05:00
Gabriel
72d04a0120 Updated reference to docs on readme to knoWLEDge 2021-09-18 00:23:51 -05:00
Gabriel
6dbed30008 Updated Web UI dev docs reference 2021-09-18 00:03:59 -05:00
cschwinne
c5eac298e6 Do not delete name if segment bounds are unchanged 2021-09-18 01:20:17 +02:00
cschwinne
bc18eda336 Segment name UI changes
Text field accessible by edit icon
Replaced magnifier with iconfont
Use woff2 font format
Fix scaled checkboxes visible in UI settings header
2021-09-18 00:31:39 +02:00
Blaž Kristan
3cefb14297 Merge pull request #2195 from scottrbailey/sp511
add env for sp511
2021-09-16 08:53:47 +02:00
Scott Bailey
4bc401278e add env for sp511 2021-09-15 18:44:09 -07:00
cschwinne
d7e3765efe Fix segment creation 2021-09-14 23:35:04 +02:00
Christian Schwinne
3d51d1e345 Merge pull request #2175 from henrygab/revert_pr1902
Revert changes from PR1902
2021-09-14 00:29:59 +02:00
cschwinne
bd23942893 Fixed IR JSON cmd string (closes #2187 ) 2021-09-12 01:37:41 +02:00
cschwinne
c8610b8ad2 Small improvements to segment names 2021-09-12 01:15:51 +02:00
Blaz Kristan
d0440122b9 Bugfix for AutoSave & 4LD. 2021-09-12 01:08:19 +02:00
Christian Schwinne
8d4636bbab Merge pull request #2170 from scottrbailey/error-12-fix
Fix error 12 issues
2021-09-11 14:32:06 +02:00
cschwinne
f59c6e7a7c Replace wiki link in readme to knoWLEDge 2021-09-11 11:18:39 +02:00
Christian Schwinne
c24ab1b21d Auto create segments setting (#2183) 2021-09-11 01:17:42 +02:00
cschwinne
6a01658355 Use pbolduc fork of AsyncTCP
(fixing flicker with upstream AsyncTCP v1.1.1)
2021-09-09 17:50:59 +02:00
cschwinne
f1e2439e66 Slight IR JSON simplefication
Check for missing file
No duplicate cmd object
2021-09-09 12:05:02 +02:00
Blaz Kristan
4d89ed701d FX optimisations.
Added segment names.
2021-09-08 23:10:54 +02:00
Blaz Kristan
e80594d61d Bugfix (sclPin, sdaPin).
Removed unnecessary static_cast.
2021-09-07 17:03:46 +02:00
cschwinne
83c6f72eb0 Fix segment runtime not reset on FX change via HTTP API 2021-09-05 01:28:00 +02:00
cschwinne
e26299b998 Revert some small syntactical changes 2021-09-05 00:39:47 +02:00
Scott Bailey
a839809eb8 change random mode choice on presetFallback 2021-09-03 00:14:07 -07:00
Scott Bailey
88ceba59cf Fix error 12 issues 2021-09-02 22:56:49 -07:00
itCarl
f368bbec32 added MQTT support, Battery voltage to Info, circuit diagram to readme, minor fixes 2021-09-02 15:41:19 +02:00
Henry Gabryjelski
021c4ba68a Revert changes from PR1902 2021-08-29 11:49:06 -07:00
Christian Schwinne
54f4658dae Added JSON API over serial support (#2156)
* Added JSON API over serial support

* Disable Serial API if pin 3 is used

Disable serial response if pin 1 is used
2021-08-26 11:04:27 +02:00
Blaž Kristan
dbc67e077d Merge pull request #2134 from scottrbailey/sr_palettes
Add new palettes from SR branch
2021-08-26 06:52:56 +02:00
Scott Bailey
e968917dbc rename palette arrays 2021-08-25 10:16:30 -07:00
Scott Bailey
d8240bb683 Changing some palette names 2021-08-25 09:17:03 -07:00
Blaž Kristan
b481c13829 Sync groups (#2150)
* Added UDP sync groups.

* Shortened string.

* Changed sync default to group 1 only.

* Make packets with version < 9 group 1

* Send sync group options as bytes, parse in JS

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-08-25 16:39:12 +02:00
Blaž Kristan
77c0ba990d Bugfix for calling FX=~ from within playlist preset. 2021-08-24 06:10:59 +02:00
Henry Gabryjelski
1d4487b6cd Ethernet configuration fix, improve PinManager (#2123)
* Improved pin manager, ethernet config

* Ethernet is configured prior even to LED pins
* Pin Manager allocation / deallocation functions
   now take an "ownership" tag parameter, helping
   avoid accidentally free'ing pins that were allocated
   by other code
* Pin Manager now has ability to allocate multiple
  pins at once; Simplifies error handling

* Fix operator precedence error

Bitwise AND has lower precedence than the
relational "greater than" operator.

* PinManager update for some user modules

* don't build everything...

* Final step to reduce RAM overhead

* update comment

* remove macros

* Remove leftover allocated

* Init ethernet after settings saved

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-08-23 14:14:48 +02:00
Blaž Kristan
ff8145b745 Merge pull request #2101 from blazoncek/fix-mqtt-pir
Fix for missing off-only MQTT messages.
2021-08-21 11:10:41 +02:00
Blaz Kristan
530e8b39e5 Added SSD1306 SPI display option to 4 Line Display 2021-08-20 23:58:09 +02:00
Blaz Kristan
50aeee288b Merge branch 'master' of https://github.com/aircoookie/WLED 2021-08-20 23:22:53 +02:00
Blaz Kristan
72e001b0d5 Bash and Wnindows CMD scripts for updating multiple WLEDs. 2021-08-20 23:20:04 +02:00
Maximilian Mewes
f04c9d101e Added usermod "battery status basic" (#2127)
* added usermod battery_status_basic

* test.. something is wrong

* Squashed commit of the following:

commit 0f845527c53f838e2c68d50ec3e9d6c68c4cee46
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Tue Aug 10 18:35:15 2021 +0200

    updated readme and added image showing info modal

commit 055579fcf71796519d00566452030f31798121d0
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Mon Aug 9 20:53:07 2021 +0200

    small map function fix

commit 811614cf9e73f4731acb234d0d210a7b19565e9a
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Mon Aug 9 19:35:21 2021 +0200

    updated ui

commit cadf2e23b7
Author: itCarl <mewes.maximilian@gmx.de>
Date:   Mon Aug 9 16:07:32 2021 +0200

    added usermod battery_status_basic

* updated readme, changed USERMOD_BATTERY_MIN_VOLTAGE default to 2.6 volt

* fixed readme image file naming

* added usermod settings for runtime changes

* fixed copy and paste mistake

* undo ui changes

* reworked addToJsonInfo() to make it compatible with the standard Info page.

* removed images from readme

* added ESP32 support

* updated readme
2021-08-20 20:42:46 +02:00
Ahmed Shehata
2ecc53ba56 UDP Signal color correction (#1902)
* added ui changes for saturation in sync

* added setters/getters for hsv settings

* added color correction logic

* faster algorithm for color conversion

* added save/load config to fs

* adjusted value scale

* move color functions to colors.cpp

* remove unchecked file

* Various small changes

Moved settings location in sync settings
Changed wording from hyperion to live
Moved code into setRealtimePixel(), reducing duplication and enabling the functionality for DMX streams

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-08-19 18:24:41 +02:00
Christian Schwinne
3eb1fe0eb2 Merge pull request #2144 from coliss86/patch-1
Fix formatting of the first title
2021-08-19 08:44:43 +02:00
coliss86
aec998acc1 Fix formatting of the first title 2021-08-18 22:21:31 +02:00
cschwinne
91e758f66f Fixed JSON IR remote not working with codes greater than 0xFFFFFF (fixes #2135) 2021-08-18 02:10:40 +02:00
cschwinne
441416b241 Fixed edge case with transition 0 2021-08-18 01:59:01 +02:00
Christian Schwinne
e541d8697e Merge pull request #2140 from Aircoookie/ws-ping
Added application level pong websockets reply (#2139)
2021-08-17 17:56:29 +02:00
cschwinne
4b817208aa Added application level pong websockets reply (#2139) 2021-08-17 12:47:01 +02:00
Scott Bailey
7fea0c3244 Add new palettes from SR branch 2021-08-12 12:58:51 -07:00
cschwinne
bd13336256 Fixed undesirable boot color transition 2021-08-06 02:08:36 +02:00
Christian Schwinne
815940913b Merge pull request #2113 from tschundler/master
Fix ordering in platformio_override.ini.sample
2021-08-03 22:17:43 +02:00
Ted Schundler
f7191c0381 Fix ordering platformio_override.ini.sample
The flag examples must be after the build_flags line to be usable.
2021-08-01 20:23:05 -07:00
Blaz Kristan
07d11c845c Fix for missing off-only MQTT messages. 2021-07-28 22:50:29 +02:00
Blaž Kristan
2e9bd477d9 Upload files & skinning (#2084)
* Skinning WLED & uploading files.
Backup & restore configuration & presets.
External holidays.json

* Option for segment count instead of stop.

* Small fixes and improvements

* Further improvements

* Enable custom CSS by default

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-07-26 00:10:36 +02:00
Christian Schwinne
b058fb8db4 Merge pull request #2093 from blazoncek/PIR-sensor-update
Added PIR  option to trigger only if WLED is off.
2021-07-23 19:35:57 +02:00
Blaz Kristan
9f0f6181a1 Added PIR option to trigger only if WLED is off. 2021-07-23 18:43:51 +02:00
Christian Schwinne
f702e1a80d Merge pull request #2091 from blazoncek/white-slider-fix
White slider fix.
2021-07-22 23:55:12 +02:00
Blaz Kristan
e1527fcbb9 White slider fix. 2021-07-22 15:36:33 +02:00
Blaž Kristan
9ba7e5d567 Fix for not honouring enabled state for PIR usermod. (#2090) 2021-07-22 14:41:11 +02:00
Blaž Kristan
02b6d53544 Rotary Encoder Compilation fix. (#2085)
* Compilation fix.

* Make rotary encoder usermod runtime configurable.
2021-07-20 13:41:30 +02:00
cschwinne
123bd0bb92 v0.13.0-b2
Reduced unneeded websockets pushes
2021-07-11 02:38:31 +02:00
cschwinne
6a8ed1192f Accept hex color strings in individual LED API
Version bump to 0.13.0-b2 "Toki"
Fixed transition property not applying unless power/bri/color changed next
Moved transition field below segments (temporarily)
2021-07-10 16:14:17 +02:00
Andy Hofmann
0862859f93 New usermod: Support for RGB Rotary Encoder Board (#2068)
* Added RGB Rotary Encoder usermod v1

* RGB rotary encoder UM: Readme; Added example video

* RGB rotary encoder UM: Readme; Added example video

* RGB rotary encoder UM: Fixed getJsonValue usage

* RGB rotary encoder UM: Removed spaces in JSON keys

* RGB rotary encoder UM: Cleanup readFromConfig

* RGB rotary encoder UM: Cleaned up type usages

* RGB rotary encoder UM: Fixed crash on re-enable
2021-07-09 20:25:35 +02:00
Henry Gabryjelski
3ad336a1eb Bug 2064, 2063 - PinManager usage (#2066)
* Fix 2063 - Do not free pins unless allocated

* Fix 2064: Allocate pins used for Ethernet

* Fix obvious compilation errors.

* Fix multiple bugs...

* pinsAllocated[2] set twice due to copy/paste bug.
* wrong pin allocated for ETH_CLOCK_GPIO17_OUT due to copy/paste bug

* Stylistic change per PR review

* Stylistic change per PR review

* attempt to allocate pin for "default" button

* remove extra local variable

* check return value from ETH.begin()

Co-authored-by: Christian Schwinne <dev.aircoookie@gmail.com>
2021-07-09 20:06:48 +02:00
cschwinne
a17f83cedd Renamed NOTIFIER_CALL_MODE_ to CALL_MODE_ 2021-07-09 18:54:28 +02:00
cschwinne
2c6850f6e4 Fixed presets using wrong call mode (e.g. causing buttons to send UDP under direct change type)
Increased hue buffer
2021-07-09 18:42:52 +02:00
cschwinne
5da47636cf Busses extend total configured LEDs if required (closes #2056 )
Fixed extra button pins defaulting to 0 on first boot
2021-07-09 16:25:23 +02:00
cschwinne
e04b965659 Peek uses the main websocket connection 2021-07-08 02:01:17 +02:00
Aircoookie
17d2fb80f2 More robust initial resource loading in UI 2021-07-07 23:45:53 +02:00
Blaž Kristan
14b7ec2a80 Added support for ESP32 S2. (#2067)
Updated Wemos Shield parameters.
2021-07-07 01:56:07 +02:00
srg74
f27b31b581 Quick fix fro paltformio.ini (#2060)
* Added support for H803FW controller

* Create usermod_bme280.cpp

* Create usermod_bme280.cpp

* Added BME280 sensor

* Update readme.md

* Update usermod_bme280.cpp

* Update platformio.ini

* Update for lightweight sensor

* Added travis build badge

* Update readme.md

* Update readme.md

* Update .gitignore

* Changed ldscript for a file system

* Update NpbWrapper.h

* Update .gitignore

* Delete wled-ci.yml

* Added usermod for ST7789 display

Functionality tested with ESP32. Works with main WLED and @blazoncek fork.

* fixes

* Update .gitignore

* Firmware updates!!!

Updated official @Aircoookie firmware to v0.12.0-b4 build 2103290 and developer @blazoncek firmware to latest v0.12.0-b3 build 2103282.

* Updated platformio.ini for Universal Wemos Shield board

* Fixed errors in env:wemos_shield_esp32

- lib_deps must be for esp32;
- Commented global lib_deps for Dallas sensor.
2021-07-06 09:51:20 +02:00
Louis Beaudoin
8c44147a45 Usermod Settings polishing/documentation (#2061)
* Testing new wrapper functions to read Usermod config

* Usermod Settings polishing
- remove getBoolFromJsonKey() (no longer needed), fix getValueFromJsonKey(element, destination, defaultvalue)
- Update Usermod Settings html "number" field to use step="any", and make wider to make maximum values fully visible
  - step="any" allows viewing/submitting full 7/8-digit float values, and the arrow buttons step by 1 now, instead of .00001 (which wasn't good for integers or floats)
  - html wasn't generated/compressed yet

* Update usermod_v2_example.h with more complete example and documentation for Usermod Settings
- readFromConfig() has three options for how to load values from the config JSON, we need to pick one

* Update/rename usermode_rotary_brightness_color, to be used as an example of more robust parsing Usermod Settings values

* Update Usermod example, rename getValueFromJsonKey() to getJsonValue()
- chose single readFromConfig() pattern
- demonstrating 3-argument getJsonValue()
- remove leftover printf in getJsonValue()

Co-authored-by: Louis Beaudoin <louis@embedded-creations.com>
2021-07-05 23:14:57 +02:00
cschwinne
ec05215a5e Update ArduinoJSON to 6.18.1 2021-07-04 18:52:05 +02:00
cschwinne
5903e8256f Fixed preset immediately deselecting when set via HTTP API PL= 2021-07-04 13:29:59 +02:00
cschwinne
c879351063 JSON IR improvements
Restored support for "PL=~" mistakenly removed in 2106300
2021-07-04 13:23:45 +02:00
cschwinne
1bb7e36a65 More compact playlist entries 2021-07-04 00:55:32 +02:00
Christian Schwinne
793a01f7ca Bus wrapper simplification (#2054)
* Use RMTN method

* Simplify BusWrapper

* Update PlatformIO configuration

* Fix non-included dependencies
2021-07-03 13:52:23 +02:00
cschwinne
40c8fdbf64 Added WebSockets support to UI 2021-07-02 01:46:42 +02:00
cschwinne
dc01c907f1 Send websockets on every state change 2021-07-02 00:24:14 +02:00
cschwinne
801df94446 Update libraries 2021-07-01 21:20:52 +02:00
cschwinne
0197d89976 Added MQTT button option 2021-07-01 20:51:52 +02:00
Christian Schwinne
e16a67242e Merge pull request #2011 from blazoncek/multi-button-update
Added MQTT support for buttons and simplified switch.
2021-07-01 14:57:12 +02:00
cschwinne
4c678a5010 Fixed a minor visual issue with slider trail not reaching thumb on low values 2021-07-01 14:56:18 +02:00
srg74
3754088a44 Updated [env] for Universal Wemos Shield board (#2049)
* Added support for H803FW controller

* Create usermod_bme280.cpp

* Create usermod_bme280.cpp

* Added BME280 sensor

* Update readme.md

* Update usermod_bme280.cpp

* Update platformio.ini

* Update for lightweight sensor

* Added travis build badge

* Update readme.md

* Update readme.md

* Update .gitignore

* Changed ldscript for a file system

* Update NpbWrapper.h

* Update .gitignore

* Delete wled-ci.yml

* Added usermod for ST7789 display

Functionality tested with ESP32. Works with main WLED and @blazoncek fork.

* fixes

* Update .gitignore

* Firmware updates!!!

Updated official @Aircoookie firmware to v0.12.0-b4 build 2103290 and developer @blazoncek firmware to latest v0.12.0-b3 build 2103282.

* Updated platformio.ini for Universal Wemos Shield board
2021-07-01 12:05:02 +02:00
Christian Schwinne
c4f084a991 Merge JSON ircodes (#2048)
* add decodeIRJson and JSON remote option

* handle JSON API commands also

* removed code that forced IR codes in a certain range to be decoded by decodeIR24. Generate default ir.json files for currently supported remotes.

* comment out printing API commands in IR handling

* refactor decodeIRJson to change how ir.json is loaded add support for calling several c functions

* Handle setting palette when effect is still on default solid and will not display it

* remove colorUpdated notifier that was pasted in accidentally

* Update to handle both 24-key and 24-key old remotes (#1969)

* Update readme.md

* Update ir.cpp

Handle both 24-key and 24-key old in decodeIR switch statement

* Re-add JSON remote option

Co-authored-by: Scott Bailey <scottrbailey@gmail.com>
Co-authored-by: Artacus <40248830+scottrbailey@users.noreply.github.com>
2021-07-01 00:17:07 +02:00
cschwinne
4c73df4ba6 Shorten input size class names 2021-07-01 00:01:27 +02:00
cschwinne
4aa53aa5a5 Adjust input field widths 2021-06-30 21:53:22 +02:00
cschwinne
7483d3b229 Fixed settings page broken by using "%" in input fields (fixes #1516 ) 2021-06-30 18:21:56 +02:00
cschwinne
8b6cc708e7 Fixed a problem with disabled buttons reverting to pin 0 causing conflict 2021-06-30 12:33:51 +02:00
cschwinne
200960899e Removed preset cycle 2021-06-30 01:48:38 +02:00
cschwinne
599a456c81 Version bump to 0.13.0-b0 "Toki"
-   Added playlist editor UI
-   Reordered segment UI and added offset field
-   Raised maximum MQTT password length to 64 (closes #1373)
2021-06-30 01:23:35 +02:00
Christian Schwinne
4b46502d22 Playlist UI (#2046)
* Test 1

* State 2

* Playlist UI progress

* Playlist saving

* Playlist saving

* Playlist object array

* Added Offset to segment options

* Positioning

* Playlist UI complete
2021-06-30 01:01:15 +02:00
cschwinne
7233c55428 Segment Offset 2021-06-30 00:45:36 +02:00
Christian Schwinne
a58c5cce78 Merge pull request #1967 from poelzi/max_segments
Allow to override the max segments setting when compiling
2021-06-29 23:43:20 +02:00
Christian Schwinne
0b23bf65b3 Merge pull request #2045 from blazoncek/better-num-handling
Better number handling in Usermod settings.
2021-06-29 23:39:33 +02:00
Blaz Kristan
bc0a3f8a47 Better number handling in Usermod settings. 2021-06-29 18:36:55 +02:00
Christian Schwinne
9b2a0102be Merge pull request #2043 from blazoncek/v2-usermod-settings
Usermod settings v2
2021-06-27 22:22:32 +02:00
Aircoookie
04b4ef6d85 Regenerate html_settings.h 2021-06-27 22:19:03 +02:00
Blaz Kristan
9e8aadb750 Usermod settings v2
- added POST field parsing
- simpler handling in readFromConfig()
2021-06-27 15:32:33 +02:00
cschwinne
0ae0f40628 Fixed four line display usermod compilation
Thanks @Serg74!
2021-06-25 23:42:53 +02:00
cschwinne
af9aa7d201 Do not compile in example usermod 2021-06-25 12:15:23 +02:00
cschwinne
4cd3a614de Fixed preset only disabling on second effect/color change (fixes #2038 ) 2021-06-25 10:12:21 +02:00
cschwinne
1e5420e6a7 readFromConfig() update 2021-06-25 01:26:15 +02:00
cschwinne
660de0b4e5 Auto-create segments based on configured busses 2021-06-24 02:29:14 +02:00
cschwinne
b73aaecd22 Fix 4MB 1MB FS partition table 2021-06-21 13:22:14 +02:00
cschwinne
c831d62bc3 Added 2 Ethernet boards and split Ethernet configs into separate file 2021-06-20 00:14:09 +02:00
cschwinne
1539e703e9 Use sprintf_P for color array generation 2021-06-19 11:13:05 +02:00
Christian Schwinne
f43bf03768 Merge pull request #2031 from DickSwart/dickdev
made sn_photorisistor configarable
2021-06-18 19:30:43 +02:00
cschwinne
495f7f190f Fixed DOS on Chrome tab restore causing reboot 2021-06-18 13:50:22 +02:00
Dick Swart
16216b9eb9 made sn_photorisistor configarable 2021-06-18 13:07:41 +12:00
cschwinne
dfdb22f584 Optimized JSON buffer usage (pre-serialized color arrays) 2021-06-17 19:46:18 +02:00
Christian Schwinne
0b264176bc Merge pull request #2024 from Aircoookie/dependabot/npm_and_yarn/normalize-url-4.5.1
Bump normalize-url from 4.5.0 to 4.5.1
2021-06-15 23:20:46 +02:00
Christian Schwinne
bde70a27f0 Merge pull request #2025 from Aircoookie/dependabot/npm_and_yarn/glob-parent-5.1.2
Bump glob-parent from 5.1.1 to 5.1.2
2021-06-15 23:19:57 +02:00
cschwinne
7d2f5f0799 Fixed div by 0 when using palette on single LED segment 2021-06-15 20:12:20 +02:00
cschwinne
7610ab7a8d Update logo 2021-06-14 01:58:12 +02:00
dependabot[bot]
51db653b1a Bump glob-parent from 5.1.1 to 5.1.2
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 20:27:21 +00:00
dependabot[bot]
dc4e4395a9 Bump normalize-url from 4.5.0 to 4.5.1
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 12:49:20 +00:00
cschwinne
623694ab73 Playlist additions 2021-06-10 02:52:20 +02:00
cschwinne
374457df70 A few small fixes 2021-06-09 12:57:16 +02:00
Christian Schwinne
7885dddef2 Create FUNDING.yml 2021-06-09 12:43:29 +02:00
Christian Schwinne
73d6cc1e54 Merge pull request #2020 from blazoncek/endless-playlist-fix
Endless playlist fix.
2021-06-07 22:29:17 +02:00
Blaz Kristan
8fdf84068d Optimisations. 2021-06-07 21:05:31 +02:00
Blaž Kristan
131625bb53 Endless playlist fix. 2021-06-07 14:16:29 +02:00
Christian Schwinne
29c9e5cb17 Merge pull request #2015 from RedNax67/master
Added support for raw 16bpp RGB565 images, and added elekstube env to examples in platformio.ini
2021-06-04 13:11:23 +02:00
Xander X
52b60fd6a6 Added elekstube env to examples in platformio.ini
Added support for raw 16bpp RGB565 images. Upload /0.bin etc.
See https://github.com/neptune2/EleksTube-IPS-Retro-Nixie-Digits for
how to get the original digits.
2021-06-04 10:39:31 +02:00
Blaž Kristan
d6337f7500 Added MQTT support for buttons and simplified switch.
Added PIR sensor option.
2021-06-03 12:18:11 +02:00
Christian Schwinne
625e04d208 Merge pull request #2007 from Aircoookie/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.26.4 to 1.26.5
2021-06-02 14:25:13 +02:00
Christian Schwinne
6da657d3e2 Merge pull request #2008 from DickSwart/dickDev
added SN_Photoresistor usermod
2021-06-02 14:24:01 +02:00
Dick Swart
344c9e9238 added SN_Photoresistor usermod 2021-06-02 12:01:06 +12:00
Christian Schwinne
89b2b066ef Merge pull request #2004 from HyperAtlas/master
CRONIXIE check in json.cpp
2021-06-02 00:25:04 +02:00
dependabot[bot]
894e084c7f Bump urllib3 from 1.26.4 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.4 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.4...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-01 22:24:59 +00:00
Aircoookie
2ba064b2a5 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-06-02 00:23:12 +02:00
Aircoookie
dfe065ef82 Fixed Pushbutton inverted not selectable 2021-06-02 00:22:57 +02:00
Christian Schwinne
7bd4b78470 Merge pull request #2006 from juanesf/master
Add diyHue repo to readme.md
2021-06-02 00:17:38 +02:00
juanesf
d7991a247d Add diyHue repo to readme.md
Wled has been supported by diyHue for some time, now it also supports Hue Sync (Entertainment) under UDP in the flask branch which will be the new master branch. 

https://github.com/diyhue/diyHue/pull/628
2021-06-01 12:31:52 -04:00
SpikeyHelmet
2178fd6ee9 CRONIXIE check in json.cpp 2021-06-01 06:37:35 +05:30
Christian Schwinne
7019ddb165 Merge pull request #1997 from Aircoookie/toki
More precise NTP timekeeping
2021-05-30 13:27:35 +02:00
Christian Schwinne
9f13763637 Merge branch 'master' into toki 2021-05-30 13:22:42 +02:00
Christian Schwinne
beeba27f46 Merge pull request #1977 from blazoncek/multi-button
Multi-button support.
2021-05-30 13:16:52 +02:00
cschwinne
315d4f225a Added analog button hue control 2021-05-30 02:03:32 +02:00
cschwinne
85489458d8 Small improvements
Settings cosmetic changes (spaces, smaller pin inputs, moved analog legend to wiki)
Uncommented STATUSPIN code (still defined out by default)
Removed adalight pin 3 lock
Added define for PSRAM
2021-05-30 01:31:04 +02:00
cschwinne
bfc7f56c4d Accurate UDP sync for NTP enabled instances 2021-05-30 00:08:24 +02:00
Blaz Kristan
7685f9b73d Ignore analogue pin -1 on ESP8266 2021-05-28 17:45:14 +02:00
Blaž Kristan
664fad96fa Fixed error-prone use of shifting. 2021-05-28 14:14:50 +02:00
Christian Schwinne
669a610e36 Merge branch 'master' into multi-button 2021-05-28 10:03:27 +02:00
Blaž Kristan
7e0d9cb48c Added:
- analogue FX speed
- analogue FX intensity
- analogue palette selection
- UI legend
2021-05-28 08:47:15 +02:00
cschwinne
7cbc9d21b5 Fixed difference calculation 2021-05-27 23:29:11 +02:00
cschwinne
55b26751ae Cache CORS preflight request 2021-05-27 11:09:57 +02:00
cschwinne
c2892d7887 Add UDP sync of system time 2021-05-27 02:02:02 +02:00
cschwinne
6c8bf090fe Small optimizations 2021-05-27 00:09:52 +02:00
Blaz Kristan
13bc378069 Fixes for analog. 2021-05-25 23:59:43 +02:00
cschwinne
8431d0bd5c Replace Time with Toki 2021-05-25 09:59:19 +02:00
cschwinne
852f758be3 Subsecond accuracy NTP 2021-05-24 19:05:34 +02:00
cschwinne
b455f432d5 Toki 1st experiment 2021-05-24 14:34:03 +02:00
stevelup
306cea60a1 Update usermod_v2_rotary_encoder_ui.h (#1988)
Typo DISLAY -vs- DISPLAY
2021-05-23 21:22:15 +02:00
stevelup
ba2e07c4b9 Update readme.md (#1987)
Typo DISLAY -vs- DISPLAY
2021-05-23 21:22:01 +02:00
cschwinne
9b796531b2 Fixed Sunrise calculation (atan_t approx. used outside of value range) 2021-05-23 18:49:23 +02:00
cschwinne
08d7a1c123 Set Nixie contents via JSON API
Elekstube mod support a subset of the cronixie display patterns
2021-05-21 22:23:12 +02:00
Christian Schwinne
1f70a735c7 Merge pull request #1980 from stevelup/patch-1
Update platformio_override.ini.sample
2021-05-21 20:38:00 +02:00
stevelup
6713fcfeb1 Update platformio_override.ini.sample
Typo on lines 12 and 31 (DISLAY -vs- DISPLAY)
2021-05-21 19:01:42 +01:00
Christian Schwinne
c3107d213a Merge pull request #1979 from Aircoookie/elekstube_usermod
Elekstube IPS and RTC usermods
2021-05-21 15:34:14 +02:00
cschwinne
adf5c8c278 Center smaller images 2021-05-21 15:19:18 +02:00
Blaž Kristan
5f86a8a15b Merge branch 'master' into multi-button 2021-05-21 13:59:33 +02:00
Blaž Kristan
042c756be8 Added analog button support.
Inverted switch fix.
2021-05-21 13:33:22 +02:00
cschwinne
2d586406da First working Elekstube IPS and RTC mod 2021-05-21 10:10:29 +02:00
cschwinne
371c4e0051 Fixed WS281x output on ESP32
Fixed potential out-of-bounds write in MQTT
Fixed IR pin not changeable if IR disabled
Fixed XML API <wv> containing -1 on Manual only RGBW mode (see #888, #1783)
2021-05-20 21:41:39 +02:00
Blaz Kristan
69099fcdd7 Multi button support. 2021-05-20 19:54:07 +02:00
Daniel Poelzleithner
57e50d0c33 Allow to override the max segments setting when compiling 2021-05-20 11:46:12 +02:00
Blaž Kristan
1617658bfe Per strip skip first LED implementation (#1871)
* Per strip "skip first LED".
Moved skip first led into bus manager.

* Update cfg.cpp

* Do not display Skip 1st on analog types

Rename skipFirstLed() to clarify what it does
Remove RGBW override

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
Co-authored-by: Aircoookie <cschwinne@gmail.com>
2021-05-17 16:23:46 +02:00
Christian Schwinne
4bcfff780a Merge pull request #1965 from blazoncek/usermod-update
Updated usermod readme and usability enhancements.
2021-05-17 13:05:11 +02:00
Blaž Kristan
12f9ad8f7f Updated usermod readme and usability enhancements. 2021-05-17 12:52:27 +02:00
cschwinne
6f843fcb27 Added experimental {"on":"t"} (resolves #1952 ) 2021-05-17 12:29:30 +02:00
cschwinne
e0f17e1778 Always copy MQTT payload 2021-05-17 10:38:07 +02:00
cschwinne
bfb27c49a2 Fixed possibility of non-0-terminated MQTT payloads 2021-05-13 01:04:33 +02:00
cschwinne
cb7b7f1dca Add notice if no usermod installed 2021-05-11 23:21:57 +02:00
cschwinne
5ca8bc3f2a Fixed various Codacy code style and logic issues 2021-05-11 14:54:03 +02:00
Aircoookie
1ccc8eec0a Merge pull request #1922 from esev/tm1814
TM1814 requires refreshes to remain powered off and a slightly faster refresh speed
2021-05-11 12:10:52 +02:00
Aircoookie
9c5afda83a Merge branch 'master' into tm1814 2021-05-11 11:59:35 +02:00
cschwinne
d94d3d4bc5 Added experimental /json/cfg endpoint for changing settings from JSON 2021-05-11 01:11:16 +02:00
Aircoookie
119826cb9b Merge pull request #1951 from blazoncek/user-configurable-usermods
User configurable usermods.
2021-05-09 23:10:37 +02:00
cschwinne
6ab95ed4ef Remove Usermod inheritance from UsermodManager 2021-05-09 22:54:04 +02:00
cschwinne
4f1eb64ac6 Added changes to set.cpp and wled_server.cpp 2021-05-08 18:04:44 +02:00
Blaz Kristan
3f8dc76f84 Added missing config info. 2021-05-08 12:13:39 +02:00
cschwinne
f60579fd21 Remove outdated Visual Studio files (please make PR to re-add if still required) 2021-05-07 16:51:41 +02:00
Blaz Kristan
136a00a301 User configurable usermods.
- Utilizing addToConfig() & readFromConfig()
- UM configuration Settings page
- MQTT support for usermods
- A few sample usermods including rewritten Temparature and new Multi-Relay
2021-05-07 12:41:39 +02:00
cschwinne
fa075f6800 Revert TV reversion 2021-05-07 11:42:12 +02:00
cschwinne
277f395595 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-05-07 11:32:13 +02:00
cschwinne
e2061464a5 Fixed not turning on after pressing "Off" on IR remote twice (fixes #1950)
Fixed OTA update file selection from Android app (TODO: file type verification in JS, since android can't deal with accept='.bin' attribute)
2021-05-07 11:32:08 +02:00
Aircoookie
fcf5cd4655 Merge pull request #1946 from jaredgisin/br-remove-unused-configs
remove unused flags
2021-05-05 10:04:45 +02:00
Jared Gisin
3816f0b68b remove unused flags 2021-05-04 18:45:05 -07:00
Aircoookie
1a2543ddde Added FPS test utility 2021-04-30 00:00:46 +02:00
Eric Severance
7c9db7edeb Add comment about the TYWE3S controller (#1924)
The `codm-controller-0.6` env also works for the [`TYWE3S` controller](https://github.com/Aircoookie/WLED/issues/1519#issuecomment-826126116). This PR just adds a note so that folks who search for `TYWE3S` will find the proper env to use.
2021-04-27 09:05:40 +02:00
Eric Severance
8b759bc5d9 TM1814 requires refreshes to remain powered off and a slightly faster refresh speed. 2021-04-25 09:08:02 -07:00
acshef
9a0aac4745 Add IP Address to JsonInfo (#1912)
* Add IP Address to JsonInfo

The value is added to the JSON only if the device is connected to the network, and uses the JSON key `"sip"` to match [wled00/xml.cpp](wled00/xml.cpp#L249). The overarching goal of this is to expose the IP Address to the Home Assistant WLED Integration, so that Home Assistant can provide a link to the WLED device (either directly through the Integration/Device page 🤞 or *ad hoc* in Lovelace).

* IP in JSON info

Empty string if not connected

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2021-04-25 01:37:16 +02:00
cschwinne
ced0cc1bac 0.12.1-b1 2021-04-22 01:12:31 +02:00
cschwinne
3c49f22266 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-22 00:47:58 +02:00
cschwinne
13ae99edec Reduce TV simulator flash usage 2021-04-22 00:47:50 +02:00
Andy Shinn
0f82730a78 Release engineering improvements (#1844)
* version set from package.json and release bin names

* support direnv virtualenv

* versioned PlatformIO environment

* matrix support for parralel CI

* gather artifacts

* release on tagging

* minor scripts formatting
2021-04-22 00:41:36 +02:00
cschwinne
ff083daf31 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-21 17:22:00 +02:00
cschwinne
7f6a554e1b Small adjustments 2021-04-21 17:21:55 +02:00
Eric Severance
eb99271120 Use 22.5 for the TM1814 max current (#1905)
* Configure TM1814 max current

* Use 22.5 mA as this seems to be a common value for the LEDs
2021-04-20 21:36:52 +02:00
Eric Severance
13e5c695c3 Initialize PixelSettings for TM1814 strips (#1847)
* Better handling for TM1814 strips

* Call SetPixelSettings after Begin as described on the NeoPixelBus wiki

* Use NeoTm1814Settings::MaxCurrent constant
2021-04-18 19:14:12 +02:00
Def3nder
12de47c923 Fix TV-Simmulator Effect flash usage (#1621)
* Add alternative TV-Sim version without tv_colors.h

...and safe 18k flash this way

* ...remove the define
2021-04-16 10:22:22 +02:00
cschwinne
afde7940d8 NUM_STRIPS no longer required with compile-time strip defaults 2021-04-16 01:01:24 +02:00
cschwinne
01dd41bdbf Added ability to add multiple busses as compile time defaults using the esp32_multistrip usermod define syntax 2021-04-15 10:55:22 +02:00
cschwinne
f3b84f1365 Switch trigonometric implementation, saves 460b memory 2021-04-14 16:49:47 +02:00
cschwinne
5751d5c1b0 Fixed Button, IR, Relay pin not assigned by default (resolves #1891)
Fixed instance discovery not working if MQTT not compiled in
2021-04-14 01:16:32 +02:00
Aircoookie
3d2336aac1 Merge pull request #1890 from blazoncek/holiday-list
Easier holiday/special events handling for background images.
2021-04-14 00:56:41 +02:00
cschwinne
afe5f19464 Update holiday BG durations
Fix semicolons
2021-04-14 00:44:07 +02:00
Aircoookie
4091a3c238 Merge pull request #1889 from blazoncek/sunrise-sunset-012
Sunrise and sunset calculation and sunrise/sunset triggered presets.
2021-04-13 23:41:03 +02:00
Blaz Kristan
f411e07fb4 Easier holiday/special events handling for background images. 2021-04-12 23:00:22 +02:00
Blaz Kristan
9bfe27dd5e Sunrise and sunset calculation and sunrise/sunset triggered presets. 2021-04-12 21:53:22 +02:00
Aircoookie
c4201d9a2a Merge pull request #1886 from betaphi/BME280_Patch
Usermod BME280_v2 refinement
2021-04-12 11:07:22 +02:00
Bastian Rössler
58e9817a6d Add PublishAlways to BME280_v2 Usermod 2021-04-12 10:31:59 +02:00
cschwinne
48d5584491 Add switch support 2021-04-12 00:45:33 +02:00
Aircoookie
5786f1d057 Merge pull request #1863 from fishbone-git/running_dual
Running dual
2021-04-11 00:59:56 +02:00
cschwinne
87c6f3c757 Add gap for Running Dual 2021-04-11 00:50:14 +02:00
cschwinne
0e99c948d6 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-10 12:22:12 +02:00
cschwinne
0f5e0f640b Updated codm environments
Added custom 8MB ESP32 partition csv
2021-04-10 12:22:09 +02:00
Aircoookie
3d2c6388de Merge pull request #1875 from zoide/patch-1
updated bottom/top sensor
2021-04-10 12:19:49 +02:00
Udo Waechter
ad8e614ae8 updated bottom/top sensor
bottomsensor and topsensor were incorrect: bottom-sensor / top-sensor according to API
2021-04-09 17:50:26 +02:00
Aircoookie
48c0360877 Merge pull request #1850 from eg321/VL53L0X-gestures
Support of simple gestures for VL53L0X laser sensor
2021-04-08 15:31:37 +02:00
Aircoookie
d230be3e1c Merge pull request #1851 from kolcun/patch-1
Increase buffer size
2021-04-07 01:15:42 +02:00
Aircoookie
daa77d40a3 Merge pull request #1862 from fishbone-git/drip
Drip: use constrain to keep in segment limits
2021-04-07 00:59:38 +02:00
Aircoookie
6ae743684f Merge pull request #1864 from blazoncek/ledmap-multisegment-fix
Ledmap multisegment fix.
2021-04-06 12:03:45 +02:00
cschwinne
789c00dde1 Change indexSet to signed 32 bit 2021-04-06 11:42:21 +02:00
Blaž Kristan
90da471084 Fix for mirrored segments. 2021-04-06 07:48:12 +02:00
Blaž Kristan
2d55056015 Merge branch 'master' into ledmap-multisegment-fix 2021-04-05 21:19:19 +02:00
Blaz Kristan
ffab9bb893 Ledmap multisegment fix. 2021-04-05 21:14:36 +02:00
fishbone-git
1192d04391 sync and merge master 2021-04-05 20:49:31 +02:00
fishbone-git
f18dced2f3 use constrain to keep in segment limits 2021-04-05 16:08:35 +02:00
cschwinne
ecdc0a3800 Fixed ESP32 crash on Drip effect with reversed segment (#1854) 2021-04-03 17:18:29 +02:00
cschwinne
46d66dded8 Release of WLED v0.12.0 2021-04-03 00:15:28 +02:00
Mike Kolcun
a69dcfc49d Increase buffer size
Avoid buffer overflows with longer mqtt topics
mqtDeviceTopic in wled.h is defined with a size of 33, so this should be set to 45 to accommodate the additional 12 characters - /temperature
2021-04-02 14:04:27 -04:00
Egor Chernodarov
601005f837 Support of simple gestures for VL53L0X laser sensor 2021-04-02 23:04:10 +07:00
cschwinne
de6f32e486 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-04-02 16:52:57 +02:00
cschwinne
fbe866198d Fixed iOS LED settings 2021-04-02 16:52:53 +02:00
Aircoookie
d603a8a9be Merge pull request #1840 from brammittendorff/patch-1
Updated readme.md
2021-03-30 22:55:50 +02:00
Bram Mittendorff
8f92077454 Updated readme.md
Updated readme.md because currenly the DallasTemperature and Onewire are under `lib_deps`.
2021-03-30 11:45:48 +02:00
cschwinne
8755a9bcda 0.12.0 Beta 5 (fixes #1837) 2021-03-30 02:04:02 +02:00
Aircoookie
4a1ecc7b72 Merge pull request #1836 from Aircoookie/blackmagic
Defeat the black magic
2021-03-29 02:53:37 +02:00
cschwinne
e46078286d 0.12.0 Beta 4 2021-03-29 02:28:34 +02:00
cschwinne
806221bc3f Move RGBW activation to wled.cpp 2021-03-28 17:31:05 +02:00
cschwinne
4264c2a173 Test for arcane curses 2021-03-25 20:00:31 +01:00
cschwinne
1f4a15ee6b Fixed current estimation 2021-03-23 14:08:01 +01:00
cschwinne
bab4f9963f Bump version code (never deploy at 3am) 2021-03-23 03:15:43 +01:00
cschwinne
1dbcac4f53 Framerate bug workaround 2021-03-23 03:10:24 +01:00
cschwinne
8d20a13776 Fixed chevron icon not included 2021-03-22 00:31:01 +01:00
cschwinne
213bc75ae1 Change cache control to revalidate each time 2021-03-21 02:40:12 +01:00
cschwinne
8a2256e0d8 0.12 beta 2021-03-20 18:43:05 +01:00
Aircoookie
eee2450c9e Merge pull request #1786 from DerFetzer/fix_fx_sync
Send notification for HTTP API calls with only effects parameters
2021-03-19 09:09:17 +01:00
Aircoookie
e2242f5d99 Merge pull request #1804 from blazoncek/chunchun-fix
Slight modification of Chunchun effect.
2021-03-19 00:05:21 +01:00
Aircoookie
30df67721d Merge pull request #1807 from Aircoookie/dev
Pull dev branch into master. 0.12 release soon!
2021-03-19 00:05:02 +01:00
Christophe Gagnier
4a20f43fbf Search bar and palettes preview (#1637)
* Fix swipe behavior on firefox when clicking on palette selection input

When clicking on the palette select element on firefox, it would often swipe to the next tab due to a bug in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1410816

* Update UI .h files and remove console log

* Fix indentation in requestJson

* Add palette preview
Add palette and effects search

* Add palette preview
Add palette and effects search

* Add palette preview

Add palette and effects search

* Add palette preview

Add palette and effects search

* Fix error with background image

* Add missing palettes

* Add expiration to cached palette data

* Remove extra console.log

* bug fixes for palettes

* Rename "Default" effect back to "Solid"

* Fix scrolling issue when selecting an effect

* Add sticky default and sticky selected item

* Change checkboxes for radio button

* build html .h files

* Design Iteration 1

* Palette preview style changes

* Add button for clearing search field

* Use version ID for caching palette data rather than 24h expiration

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2021-03-18 23:59:56 +01:00
Blaz Kristan
e06d269b82 Slight modification of Chunchun effect. 2021-03-15 17:01:56 +01:00
Aircoookie
ba4c3e3852 Merge pull request #1724 from blazoncek/playlist-fix
Playlist handling.
2021-03-13 22:46:32 +01:00
cschwinne
b8de36b340 Cleanup 2021-03-13 22:46:08 +01:00
Aircoookie
bbe3e8093c Merge pull request #1782 from aledthom/master
Usermod for Artemis udp control
2021-03-13 22:05:24 +01:00
cschwinne
26096bc136 Added options for Auto Node discovery
Optimized strings (no string both F() and raw)
2021-03-13 22:04:37 +01:00
cschwinne
3460f9d9cc Auto discovery follow-up 2021-03-09 18:00:02 +01:00
Aircoookie
6eacf8ed7e Merge pull request #1683 from blazoncek/autodiscovery
Auto node discovery.
2021-03-09 17:25:17 +01:00
Aircoookie
20bebe98b1 Merge branch 'dev' into autodiscovery 2021-03-09 17:24:57 +01:00
cschwinne
91d885eae4 Fix node type 2021-03-09 17:21:19 +01:00
cschwinne
ea3358ecb2 Autodiscovery improvements 2021-03-09 16:23:19 +01:00
cschwinne
9b3e6270d5 Auto start field population in bus config 2021-03-07 00:42:21 +01:00
cschwinne
71edc3a084 Fixed incorrect over-memory indication in LED settings on ESP32 2021-03-06 02:35:49 +01:00
cschwinne
05521bfd3a Added destructor for BusPwm (fixes #1789) 2021-03-04 22:17:25 +01:00
Blaz Kristan
6c997f573a Added vrsion info to autodiscovery packet. 2021-03-04 14:34:36 +01:00
cschwinne
c0dd98b6d7 Fixed relay mode inverted when upgrading from 0.11.0 2021-03-04 12:10:18 +01:00
DerFetzer
56cf1c818b Send notification for HTTP API calls with only effects parameters 2021-03-01 22:44:28 +01:00
Blaz Kristan
5553964d52 Moved nodes from Info to separate tab. 2021-03-01 11:13:40 +01:00
Blaz Kristan
90808ac67e Power off playlist unload. 2021-02-28 15:34:18 +01:00
Aled
7aab7678e9 Usermod for Artemis udp control
enables use as a device within the artemisRGB software
2021-02-27 09:05:30 +00:00
Aircoookie
195af002cf Merge pull request #1779 from Aircoookie/fixwarnings
Fix warnings
2021-02-27 02:08:01 +01:00
cschwinne
38db8d2bfd Update platformio.ini 2021-02-27 02:01:27 +01:00
cschwinne
44a9fed8a9 Fix more warnings 2021-02-27 01:50:08 +01:00
cschwinne
cfc346abad Fix warnings misc fixes 2021-02-27 01:16:06 +01:00
cschwinne
befeb55349 Memory check on bus creation 2021-02-27 00:57:12 +01:00
Louis Beaudoin
b460d0f533 Fix Warnings (#1744)
* Remove -w (Suppress all warnings, including those which GNU CPP issues by default.) and add back in -Wall (Turn on all optional warnings which are desirable for normal code.) from build_flags

* Fixes warning: suggest parentheses around '+' in operand of '&' [-Wparentheses]

* Fixes warning: "CONFIG_LITTLEFS_FOR_IDF_3_2" redefined

* Fixes warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]

* Fixes warning: enumeration value 'onoff' not handled in switch [-Wswitch]

* Fixes warning: "ntohl" redefined, warning: "ntohs" redefined, warning: "htonl" redefined, warning: "htons" redefined
- Original fix: 858f8f4ee9

* Fixes warning: unused variable 'mainSeg' [-Wunused-variable]

* Fixes warning: unused variable 'start' [-Wunused-variable]

* (untested!) Fixes warning: operation on '...' may be undefined [-Wsequence-point]

* Fixes warning: unused variable

* Fixes warning: unused variable and warning: narrowing conversion

* Fixes warning: unused variable

* Fixes warning: unused variable

* (untested!) Fixes warning: statement has no effect [-Wunused-value]

* Fixes warning: control reaches end of non-void function

* Fixes warning: unused variable

* Fixes warning: left operand of comma operator has no effect

* Fixes warning: no return statement in function returning non-void

* (untested!) Fixes warning: ISO C++ forbids converting a string constant to 'char*' and fixes warning: unused variable 'nPins'

* Fixes warning: deleting array 'dmxData'

* Fixes warning: unused variable

* Remove all warning suppression buildflags

Co-authored-by: Louis Beaudoin <louis@embedded-creations.com>
Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2021-02-27 00:20:31 +01:00
Rolf
746a8badac Animated Staircase Usermod (#1763)
* Initial version of the PIR Staircase wipe up/down.

* Add pulldown reminder

* Workaround for missing D6 and D7 definitions on esp32dev

* Add pinouts for d1 mini (esp8266 and esp32) and NodeMCU (and Arduino)

* These IO pins on all these boards... NodeMCU and d1_mini esp32 supported. The others? Fingers crossed.

* Changed to not collide with led strip pins

* PIR on GPIO 15 and 16 on esp32 d1 mini

* Removed PIN number ifdefs, it is impossible to match all boards

* Settings in flash, info and API

* Update README.md

* Small doc changes

* Improved README

* Fixed error in reading configuration

* Add API documentation

* Documentation and code cleanup

* Add enable/disable to API settings

* Restore segment state when disabling plugin

* Add debounce

* Set segments in animation mode

* Set segments in animation mode

* Add support for HR04 sensors

* Add preliminary description for  using an HR04 sensor

* Fixed typenumber and linked to datasheet

* Moved config away from defines to prevent user error

* Trigger Sensors through API

* Rename scripts folder so that it's name doesn't clash with the `pio` command (prevents platformIO in VSCode to work properly on Mac)

* Bugfix for detection problems

* Separated config from code

* Renamed Signal to Trigger pin

* Filename adjusted

* Clarifications and additions to README

* Fixed references to pio scripts

* Fixed API trigger bug

* Adjustments to README.md

* More efficient use of flash cycles, better naming

* Bugfix: bottom sensor was not read properly

* Renamed to Animated_Staircase

* Add note on ultrasonic sensor and esp32

* Better naming of defines

* Bugfix: Swipe down started with two steps.

* Removed upload port in nodemcuv2 section

Co-authored-by: Rolf <rolf@phobos.local>
Co-authored-by: Rolf <>
2021-02-25 09:52:48 +01:00
cschwinne
d7790a04c5 5 configurable pins per bus (for analog) 2021-02-24 14:49:39 +01:00
cschwinne
2c0b07387b Added QuinLED-ESP32-Ethernet type
Set 19531 as default ESP32 PWM frequency
2021-02-23 00:47:48 +01:00
Aircoookie
06f2f9adbb Merge pull request #1771 from Aircoookie/mergedev_210222
Update dev
2021-02-22 22:31:22 +01:00
Aircoookie
37d5b9109f Merge branch 'dev' into mergedev_210222 2021-02-22 22:31:12 +01:00
Aircoookie
76e269ee21 Merge pull request #1764 from k7bbr/master
Add support for WESP32 board, change default Ethernet type to none, add macro to specify default Ethernet type at compile time
2021-02-21 22:38:15 +01:00
Aircoookie
3103939197 Merge pull request #1766 from edwinm/patch-1
Use ldscript_1m128k in platformio_override.ini.sample
2021-02-21 17:23:50 +01:00
Edwin Martin
3f01c87223 Use ldscript_1m128k in platformio_override.ini.sample
The current value ldscript_1m0m doesn't exist anymore and WLED won't compile. Using ldscript_1m128k makes it compile.
2021-02-20 23:21:55 +01:00
k7bbr
e4cda4bb99 change default Ethernet board to none 2021-02-20 02:18:37 -07:00
k7bbr
f333f867c5 Updated platformio.ini to reference esp32_eth env
change default ethernet type to none
add macro option to change default eth board at compile time
2021-02-20 01:54:54 -07:00
Kevin Dorff
75c46f7a0e Create the sorted index of modes and palettes at startup (#1741)
* Very incomplete work toward sorting.

* Sort modes and palettes upon startup so I don't have to maintain the static index array.

* Remove cpp test file I used for development

* Added ModeSortUsermod, modified the other two usermods to use it.

* Update platformio_override.ini.sample and readme for ModeSortUsermod

* restore methods accidentally removed.
2021-02-18 00:28:01 +01:00
Aircoookie
5c6cb41124 Merge pull request #1742 from WJCFerguson/geometric_IR_brightness_steps
IR: change to non-linear brightness steps
2021-02-17 23:59:38 +01:00
Aircoookie
94f7c03871 Merge pull request #1760 from embedded-creations/fixWrapperEsp32Spi
bus_wrapper fixes/improvements for ESP32 SPI
2021-02-17 23:38:19 +01:00
Louis Beaudoin
96d5c03a6d bus_wrapper improvements for SPI output
- Identifying ESP32 hardware SPI by pin number is broken and flawed, replace with temporary hack instead until a better method of assigned resources can be devised
  - NeoPixelBus doesn't support HSPI, only VSPI right now, so matching HSPI pins to enable a non-existent VSPI driver is broken
  - ESP32 SPI peripherals can use alternate pins, so choosing to use hardware SPI only on the default pins is flawed
- Specify pins during Begin() call to allow for alternate pins and avoid driving the chip select signal
- Dotstar Software/Hardware output tested on ESP32, other SPI protocols and ESP8266 support was not tested
2021-02-17 17:03:57 +00:00
Louis Beaudoin
3a03bc41a7 Fix bus_wrapper.h bugs:
- missing breaks in switch(busType identifying SPI LEDs)
- set correct pin order for begin()
2021-02-17 16:58:03 +00:00
Aircoookie
331844ff73 Merge pull request #1708 from Matchlighter/patch-1
Add DNRGBW Mode for Real Time UDP Control
2021-02-16 17:43:33 +01:00
James Ferguson
2bc38e3784 IR: change to non-linear brightness steps
Prior Incrementing/decrementing by fixed steps (typically 10) means large
perceptual jumps at low brightness and small jumps at high brightness.  This
change moves to a geometric progression, closer at the bottom of the range and
widely spaced at the top.

While it could be done as a relative jump (incrementing by bri/4 and
decrementing bri/5 works quite well), it makes for irregular behavior when
moving back and forth.
2021-02-13 18:29:56 -05:00
cschwinne
d580dedfc8 Remove stray endif 2021-02-13 01:48:05 +01:00
cschwinne
aa0f4c9985 Update dev branch (resolve conflicts) 2021-02-13 01:43:16 +01:00
b3nj1
aa242d897d DHT22/DHT11 humidity/temperature sensor usermod (#1719)
* DHT22/DHT11 humidity/temperature sensor usermod

* cleanup - don't report when usermod is auto-disabled since report isn't persistent

* track error count; retry once after error occurs

* for esp32, use esp32DHT library

* fix unreliable ESP32 readings by switching DHT library to https://github.com/alwynallan/DHT_nonblocking

* change default pin to Q2; don't burst readings if error occurs

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2021-02-13 01:21:13 +01:00
Aircoookie
d56ab6c971 Merge pull request #1738 from blazoncek/dynamic-led-map
Dynamic LED map creation from JSON file
2021-02-13 01:07:52 +01:00
cschwinne
2f7be3475d Updated mapping comment 2021-02-13 01:02:14 +01:00
Blaz Kristan
2544d2e068 Dynamic LED map creation from JSON file /ledmap.json in format {"map":[4,3,2,1,...]}.
Used for rearranging LEDs (matrices, awkward placement, ...)
2021-02-12 11:54:35 +01:00
k7bbr
a09f64aee5 Add Ethernet support for WESP32 board 2021-02-11 02:36:15 -07:00
Aircoookie
f7114fc2aa Merge pull request #1729 from blazoncek/tetris-fx
Tetris (falling bricks) effect & Colortwinkles low brightness fix.
2021-02-10 00:42:35 +01:00
cschwinne
7092f337ef Faster Tetrix mode
- Replaced a letter in name (copyright)
- 2x speed
- Replaced Merry christmas mode
2021-02-10 00:37:05 +01:00
Kevin Dorff
8e71c3ae17 Rotary Encoder, Four Line Display, and Auto Save Usermods (#1722)
* Ability to lookup Usermod by id so Usermods can use other Usermods.

* Rotary Encoder UI using two Usermods

* Updates. More to come, probably.

* Updated rotary usermod to honor USE_FOUR_LINE_DISPLAY if you want to use four line display. It should be truly optional, now.

* minor logic improvement to showing the current time in clock mode.

* improved 24 hour display foratting and ability to use the FourLineDisplayUsermod without the RotaryEncoderUIUsermod (option disable sleep and clock modes).

* Improved ordering of defines in the FourLineDisplayUsermod to put options people might need to change together toward the top.

* relocate plugins. add mention of the Wire requirement.

* usermod filenames changed, updating comment in const.h

* fix usermod locations.

* fix usermods_list to include changed folder.

* Improved for both usermods: install, config, and docs. Included sample platform_override.ini.

* Updated name of SDA and SCL defines for config of display

* update docs.

* Wrong year. Fixed.

* Fix youtube link, improve config of sleep/clock when the rotary usermod isn't installed.

* Minor fixes to four line display. Addition of Auto Save v2 usermod.

* Allow config for auto-save to set the preset number to use. Load preset at startup (so brightness is set correctly).

* Updated docs for Auto Save.

* Updated docs for Auto Save.

Co-authored-by: Kevin Dorff <kevin@macbookpro-kevin-wifi.local>
2021-02-09 17:15:43 +01:00
Blaz Kristan
a9c211d66c Tetris (falling bricks) effect & Colortwinkles low brightness fix. 2021-02-07 14:45:34 +01:00
Blaz Kristan
a1c2c04510 Playlist handling. 2021-02-05 17:36:53 +01:00
cschwinne
0902b628f8 Added FPS indication in info 2021-02-05 01:33:26 +01:00
Aircoookie
517a85f9e9 Merge pull request #1711 from Aircoookie/dev-multipin-select
Multipin select working!
2021-01-31 00:42:39 +01:00
Aircoookie
94941a7732 Merge pull request #1704 from Moustachauve/content-cache
Add Cache-Control to index
2021-01-31 00:42:24 +01:00
cschwinne
f3aa8d368e Multipin appears to work 2021-01-31 00:38:27 +01:00
cschwinne
9518c5f2e4 might work 2021-01-30 20:51:36 +01:00
cschwinne
e44173ff09 JSON ledDoc (does not work, crash on delete) 2021-01-30 13:23:38 +01:00
Matchlighter
fa1106d3cf Add DNRGBW Mode for Real Time UDP Control
Add DNRGBW mode so that >367 RGBW LEDs may be controlled, similar to the DNRGB mode.
2021-01-29 23:11:37 -07:00
Christophe Gagnier
c24d574f90 Add Cache-Control to index 2021-01-28 22:16:36 -05:00
cschwinne
8ed35652bc LED memory usage indicator, better pin checker 2021-01-29 02:34:03 +01:00
cschwinne
9bdcfc8a45 LED settings JS possibly complete (need to add saving logic to set.cpp) 2021-01-26 01:58:34 +01:00
cschwinne
89b76b514c Settings progress 2021-01-26 00:19:41 +01:00
Blaz Kristan
dd433d8af0 Auto node discovery. 2021-01-22 16:17:18 +01:00
cschwinne
c105f3b970 Mulipin select compiles
Need to work on JS and set.cpp next
2021-01-21 01:21:16 +01:00
Aircoookie
94471c0d1c Merge pull request #1675 from Aircoookie/blazoncek-dev
Dynamic bus configuration and pin management
2021-01-19 18:46:51 +01:00
cschwinne
849e04ab83 Better handling of DMA re-init 2021-01-19 17:22:37 +01:00
cschwinne
67833c5513 getPins() and reversed 2021-01-19 16:51:03 +01:00
cschwinne
b0306867b4 Resolve merge conflict 2021-01-18 21:03:10 +01:00
cschwinne
d5025fdbcc Fixed canAllShow() and removeAll() 2021-01-18 20:51:32 +01:00
Blaz Kristan
e6cf1dc98d Temperature usermod update (pin management). 2021-01-17 15:00:14 +01:00
Aircoookie
0266370218 Merge pull request #1662 from Matoran/patch-1
fix COO_MAX comment
2021-01-17 14:51:49 +01:00
cschwinne
aeb3f2b018 Fix ESP32 2021-01-17 00:34:34 +01:00
Blaz Kristan
bb8d5ac13f Dynamic allocation for bus manager. 2021-01-17 00:20:31 +01:00
cschwinne
d02bf37167 Fix a few warnings 2021-01-16 21:40:04 +01:00
cschwinne
99dbd9e649 Added bus cleanup 2021-01-16 19:53:08 +01:00
cschwinne
0d63dad8c2 Working getPixelColor() 2021-01-16 17:11:23 +01:00
Marco Lopes
6ce465664f fix COO_MAX comment
COO_MAX value changed but comment does not take modification into account.
2021-01-16 16:01:50 +01:00
cschwinne
b934634159 First light from busmanager! (still not usable though) 2021-01-16 00:50:43 +01:00
cschwinne
ef904e01ec Circular include problem 2021-01-15 15:43:11 +01:00
Aircoookie
25b77db4cd Merge pull request #1658 from Aircoookie/mergedev-210115
Update multistrip dev branch
2021-01-15 11:15:04 +01:00
Aircoookie
88c0a9e30a Merge branch 'dev' into mergedev-210115 2021-01-15 11:07:21 +01:00
THATDONFC
75c219d6c6 Update LedFx url to point to new repo (#1656)
Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2021-01-15 11:01:05 +01:00
lonestriker
82e7328903 Add support for WT32-ETH01 ethernet board and make ethernet support configurable (#1583)
* Initial support for WT32-ETH01 board

* Initial ethernet config option, doesn't save yet

* Fixed saving/restoring ethernet option, works now!

* Fixed ESP32-POE pin config (thanks to tbnobody)

* Remove esp32_eth target (use poe), minor cleanup

* Fix BTNPIN for WT32-ETH01, as found by @k7bbr

* Various fixes to ethernet option

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-01-15 10:37:45 +01:00
cschwinne
d6b366c77f Finished multi segment transitions 2021-01-13 11:24:27 +01:00
cschwinne
42a7c84a33 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-01-13 11:13:29 +01:00
cheffpj2
1f4c1f2af5 A build file and README for the QuinLED-Dig-Quad Preassembled (#1643)
* runs w/ multi and temp on my preasmbld QL-DQuad

* working build file

* runs w/ multi and temp on my preasmbld QL-DQuad

* working build file

* Remove custom info

* Added README, found the UI update wasn't necessary

* Rebase the precompiled HTML file

* Spellcheck

Co-authored-by: cheffpj2 <patrick.j.mcdonough@gmail.com>
2021-01-13 00:11:43 +01:00
cschwinne
e665e4dc57 Merge branch 'master' of https://github.com/Aircoookie/WLED 2021-01-09 00:35:51 +01:00
cschwinne
9551519a35 First working multisegment transitions 2021-01-09 00:35:48 +01:00
Christophe Gagnier
df51b80e07 Fix swipe behavior on firefox when clicking on palette selection input (#1631)
* Fix swipe behavior on firefox when clicking on palette selection input

When clicking on the palette select element on firefox, it would often swipe to the next tab due to a bug in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1410816

* Update UI .h files and remove console log
2021-01-08 16:49:56 +01:00
cschwinne
0df6826c91 Fixed HTTP changing segments uncommanded (#1618)
Replaced Red & Blue effect with Aurora effect (PR #1589)
Updated copyright year and contributor page link
2021-01-05 21:35:07 +01:00
Mazen
af61962314 Add Aurora Borealis effect (#1589)
* Added aurora effect

* Cosmetic changes prior to PR to match some guidelines

* Update FX.cpp

Moved mode_aurora function to end of FX.cpp

* Cosmetic changes prior to PR

- Changed new palette name to have a whitespace
- Undid changes to platformio.ini

* Removed commented out test palette

* Improved memory handling

Use SEGENV to allocate and manage dynamic memory needs of effect.
Only allocate as much memory as needed for current amount of waves set.

* Improvements to Aurora effect

- Smoother on low speed
- CRGB is trivially copiable
- Replaced Red & Blue mode
- Simplified logic and mem use a tiny bit
- Aurora2 palette a bit less yellowish

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2021-01-04 11:11:36 +01:00
cschwinne
f5ed710c0b Same procedure as every year James 2020-12-31 20:47:38 +01:00
cschwinne
e5ae07b3e8 Fixed usermod info in Info screen (#1608) 2020-12-31 17:27:40 +01:00
cschwinne
f1535e1f71 Fixed info screen 2020-12-31 16:16:33 +01:00
ChessSpider
a6316b40d1 Usermod SensorsToMqtt: Add bmp280+ccs811+si7021 sensors to wled and publish them via MQTT to Home Assistant (#1588)
* Adding SensorsToMqtt usermod, which allows WLED to read bmp280/SI7021/CCS811 sensors and publish it via MQTT to e.g. Home Assistant.

* undo some changes we dont want upstream

* undo some changes we dont want upstream2

Co-authored-by: Machiel Pronk <machiel.pronk89@gmail.com>
2020-12-29 19:35:59 +01:00
Aircoookie
c2746a55e3 Merge pull request #1529 from GrumpyMeow/feature/live-preview-websockets
Added liveviewws-page for liveview via websockets
2020-12-27 19:47:51 +01:00
Aircoookie
e9c782bf9e Merge branch 'dev' into feature/live-preview-websockets 2020-12-27 19:36:58 +01:00
spiff72
ad6c154eb6 TTGO T-Display Usermod Updates (#1565)
* Adding new usermod for TTGO T-DIsplay.

* Finalizing the code

* Modified and cleaned up readme.md file

* Fixes to platformio.ini to restore back to previous state

* Cleaned up comments in usermod file

* Updated readme with clarifications on how to modify the library files.  Saving the platformio.ini file after uncommenting the line to add the TFT_eSPI library should download the necessary library files without needing to build (and fail) first.

* Cleanup

* Readme cleanup

* corrected error in commenting platformio.ini

* updated usermod to add more info to built-in display, revised readme, added images for readme

* readme file updates
2020-12-27 19:33:51 +01:00
Aircoookie
b747b10642 Merge pull request #1580 from Aircoookie/mergedev-201226
Update multipin dev branch
2020-12-26 21:52:51 +01:00
Aircoookie
2005a2abd4 Merge branch 'dev' into mergedev-201226 2020-12-26 14:23:14 +01:00
Aircoookie
c5818ff5e4 Merge pull request #1577 from Aircoookie/gh-actions
Github Actions
2020-12-26 12:00:52 +01:00
Aircoookie
b5e02e6ff9 Merge pull request #1579 from blazoncek/fire2012-mod
Fire2012 mod & optimization.
2020-12-26 11:59:47 +01:00
cschwinne
205f62e732 Try Github Actions 2020-12-26 01:04:59 +01:00
Aircoookie
fdc8b5eb54 Merge pull request #1576 from xBelladonna/BME280
Add BME280 v2 usermod
2020-12-26 00:58:05 +01:00
cschwinne
36abe8e808 Added PR message to BME280 usermod as readme 2020-12-26 00:57:39 +01:00
xBelladonna
fcf0e08e01 Add BME280 v2 usermod 2020-12-26 05:57:20 +09:30
Blaz Kristan
0edcf97e3f Fire2012 mod & optimization. 2020-12-25 17:53:00 +01:00
Aircoookie
0707b26303 Merge pull request #1567 from WoodyLetsCode/settingsSync
Remove not allowed attribute
2020-12-24 01:00:56 +01:00
Aircoookie
09662a4bcd Merge pull request #1566 from WoodyLetsCode/settingsUiFixes
Add lang attribute to the html start tag
2020-12-24 00:21:54 +01:00
Woody
cb06961b82 removed not allowed attribute 2020-12-23 21:58:38 +01:00
Woody
824fb4adae added lang attribute to the html start tag 2020-12-23 21:43:30 +01:00
Def3nder
a91d993c6d Dynamic fade effect (#1550)
* New Effect "TV Simulator"

based on "Fake TV Light for Engineers" by Phillip Burgess https://learn.adafruit.com/fake-tv-light-for-engineers/arduino-sketch

* removed some not-used functions 

...from my 1st attempt with "Phoney TV" - but this one did not look good.

* Dynamic Effect extended with a "smooth" variant

...to close #1114 / the "Dynamice fade effect" in the projects section

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2020-12-22 16:26:19 +01:00
Def3nder
e16bab8dd9 TV Simulator Effect (#1548)
* New Effect "TV Simulator"

based on "Fake TV Light for Engineers" by Phillip Burgess https://learn.adafruit.com/fake-tv-light-for-engineers/arduino-sketch

* removed some not-used functions 

...from my 1st attempt with "Phoney TV" - but this one did not look good.

* Created new version of tv_colors.h based on 18 movies

...and some corrections

* Add include guards for tv_colors.h and disable option

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-12-22 13:15:57 +01:00
Mike
068c5851ef Add fields for customization Blynk host (#1543)
* Add fields for customization Blynk host

Add fields to 'Sync Interfaces' for customization Blynk host.
Now you can set you own Blynk server.
All you needs its set custom host and port to local Blync server.

* Lower blynk host length (memory usage)

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-12-22 00:44:16 +01:00
Aircoookie
af48dcd884 Merge pull request #1551 from mherweg/master
minor bugfix for https://github.com/Aircoookie/WLED/issues/1525
2020-12-21 21:46:45 +01:00
Aircoookie
058806c241 Merge pull request #1552 from WoodyLetsCode/randomBg
Random Background image
2020-12-21 21:45:57 +01:00
Aircoookie
48f6e33bf2 Merge pull request #1553 from WoodyLetsCode/fasterUpload
Add option for faster upload speed in platformio.ini
2020-12-21 21:45:08 +01:00
Woody
6a3ef42d37 add option for faster upload speed 2020-12-21 21:23:52 +01:00
Woody
f10a9d7f61 random bg image 2020-12-21 21:12:07 +01:00
mherweg
c315c04b9a minor bugfix for https://github.com/Aircoookie/WLED/issues/1525 2020-12-21 21:04:21 +01:00
cschwinne
f7893d4e4b Fixed JShint warnings and minify HTML 2020-12-21 19:48:21 +01:00
Aircoookie
2e2f7fa6c3 Merge pull request #1542 from WoodyLetsCode/web-final
split up index.htm
2020-12-21 15:21:37 +01:00
Woody
7aff64f877 reverting additions in cdata.js 2020-12-21 14:53:03 +01:00
Aircoookie
0d05bc2676 Merge pull request #1541 from Master-MiShutka/patch-3
Change to utf-8 to support localization
2020-12-21 13:55:20 +01:00
Master-MiShutka
131b350ee7 Change to utf-8 to support localization 2020-12-20 22:23:20 +03:00
Woody
06651dbc4c split up index.htm 2020-12-20 20:18:07 +01:00
Aircoookie
0296247d82 Merge pull request #1536 from WoodyLetsCode/settings
Fixes in settings.htm
2020-12-20 18:56:03 +01:00
cschwinne
79e767ba79 Boot brightness 0 will now use the brightness from preset
Add iOS scrolling momentum (from PR #1528)
2020-12-20 18:51:46 +01:00
Woody
f771dee852 bug fixes in settings.htm 2020-12-20 15:16:22 +01:00
Sander Schutten
c4d8ef5954 Added liveviewws-page for liveview via websockets 2020-12-19 17:26:36 +00:00
cschwinne
5d6b97a63e Release of WLED v0.11.1
Fixed AP hide not saving (fixes #1520)
Fixed MQTT password re-transmitted to HTML
Hide Update buttons while uploading, accept .bin
Make sure AP password is at least 8 characters long
2020-12-19 17:09:39 +01:00
cschwinne
c277ebb43e Fixed Alexa discovery 2020-12-16 22:55:07 +01:00
Aircoookie
c9cd7b087a Merge pull request #1499 from leon-anavi/anavi-miracle-controller
platformio.ini: Support ANAVI Miracle Controller
2020-12-16 00:37:00 +01:00
Leon Anavi
da7ff52a2f platformio.ini: Support ANAVI Miracle Controller
Add support for ANAVI Miracle Controller open source hardware
development board with ESP8266. For the moment use a single LED
strip connected to LED1.

Signed-off-by: Leon Anavi <leon@anavi.org>
2020-12-16 01:19:41 +02:00
cschwinne
84e4a4bb52 Fixed an issue that made it impossible to deactivate timed presets 2020-12-16 00:10:48 +01:00
guardmedia
34c9c5a9b1 Adding palette blends effect (#1491)
* Adding palette blends effect

* Fixes for blends effect

* Improved blend effect intesity and speed control

* Simplify Blends timing

Co-authored-by: Tyler Walters <tyler@guardmedia.com>
Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-12-15 13:35:50 +01:00
Aircoookie
e348e66f14 Merge pull request #1492 from guardmedia/usermod-buzzer
Create "buzzer" WLED usermod
2020-12-15 10:36:27 +01:00
Tyler Walters
1e83614f8b create "buzzer" WLED usermod 2020-12-14 20:50:48 -05:00
cschwinne
c53647cd18 Added Preset ID quick display option 2020-12-14 23:32:57 +01:00
Aircoookie
faa4e7753c Merge pull request #1462 from danecreekphotography/preset-number
Add preset number to display
2020-12-14 20:49:51 +01:00
Aircoookie
220757be06 Merge branch 'master' into preset-number 2020-12-13 23:40:34 +01:00
cschwinne
7f1013123a Preset ID in separate div 2020-12-13 23:37:41 +01:00
cschwinne
b1a7fe0f80 Fixed RGBW mode not saved between reboots (fixes #1457) 2020-12-13 19:02:12 +01:00
Florian Baumann
153e6b56ba Feature/scale palette fallback (#1484)
* scale color_from_palette fallback by brightnes

* reuse `crgb_to_col` function

Co-authored-by: Florian Baumann <derflob@derflob.de>
2020-12-13 18:36:18 +01:00
Aircoookie
35998df05c Merge pull request #1483 from DerFlob/bugfix/mode-count
update MODE_COUNT after candy cane fx was added
2020-12-13 18:08:40 +01:00
Aircoookie
5176a8cb9e Merge pull request #1478 from broccoliboy/esp32_multistrip
Update esp32_multistrip usermod to fix compile errors
2020-12-13 18:08:22 +01:00
Florian Baumann
4892b648ae update MODE_COUNT after candy cane fx was added
It was not possible to select the candy cane effect after it was added in #1445 due to wrong MODE_COUNT.
2020-12-13 17:30:11 +01:00
Aircoookie
b4506c2b9b Merge pull request #1480 from Aircoookie/dependabot/npm_and_yarn/ini-1.3.8
Bump ini from 1.3.5 to 1.3.8
2020-12-13 13:58:57 +01:00
dependabot[bot]
4373163869 Bump ini from 1.3.5 to 1.3.8
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-12 21:10:44 +00:00
Sam Martin
4b8cde7b3b added CanShow function to fix build errors 2020-12-12 07:58:25 -06:00
Sam Martin
b7543c8a45 Merge branch 'master' into esp32_multistrip 2020-12-12 07:33:14 -06:00
cschwinne
b5232886d9 Fixed preset cycle default duration rounded down to nearest 10sec interval (fixes #1458)
Enabled E1.31/DDP/Art-Net in AP mode
2020-12-10 17:57:38 +01:00
cschwinne
aefd81228e Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-12-10 16:27:27 +01:00
cschwinne
03516e11f7 Various fixes 2020-12-10 16:27:23 +01:00
Aircoookie
455a17cdb2 Merge pull request #1465 from pbolduc/bug/1431
Fixes an issue where switching effects causes crash
2020-12-10 12:13:16 +01:00
Aircoookie
564ad09b98 Merge pull request #1466 from pbolduc/feature/1461-know-if-strip-is-updating
Add utility function to expose if strip is being updated
2020-12-10 12:08:36 +01:00
Phil Bolduc
135f6b0050 Add utility function to expose if strip is being updated 2020-12-09 20:29:53 -08:00
Phil Bolduc
d5e79ff36c Fixes an issue where switching effects causes crash
When change effect, flag the the segment's runtime state needs to be cleared. Only clear data that before processing the segment in the main loop.
2020-12-09 17:55:14 -08:00
gegu
7a7f34746e Update usermods: FixUnreachableNetServices and PIRsensorSwitch (#1448)
* Removed usermod Fix_unreachable_webserver

* Changed README. Added a compiler warning for ESP32

* Fix ESP32 compiling issue. Add instance ptr API.

* Updated usermods. Store config values. ESP32 fix.

* Store analog clock settings

* Rename JSON values

bring them visually more in line with the other settings

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-12-10 01:28:42 +01:00
Aircoookie
6b4bbe625b Merge pull request #1464 from CalvinSchwartz/patch-1
Suggestion: Add link to "Akemi" in images folder
2020-12-10 01:12:06 +01:00
Calvin
28c0b2737b Suggestion: Add link to "Akemi" in images folder
Just add a link to additional images. One may could also add this to the wiki but in my opinion the images folder is a good location for this information.
2020-12-09 20:26:08 +01:00
Maik Allgöwer
7684fb83d6 Fix #1400: Using sliders / colorwheel sometimes slides the whole UI (#1459)
* Prevent UI from sliding when using sliders (#1400)

An iro.js version bump in commit 98e4ac6 changed names for the slider &
colorwheel classes which made the filter in function lock() fail.

Also it seems that not all elements of the Iro sliders & colorwheel have
appropriate classes set. Just changing the names still sometimes failed
when the user accidentally grabbed a part of the slider / colorwheel
that has no class name set.

To mitigate this, lock() now checks the events classlist for classes
starting with "Iro" as well as it's parents classlist if no "Iro" classes
were found

* Regenerate wled00/html_ui.h
2020-12-09 14:08:05 +01:00
Sam Martin
4d22608724 Merge branch 'master' into esp32_multistrip 2020-12-08 08:40:01 -06:00
Neil Enns
b7a42d61c4 Add preset number to display 2020-12-08 09:16:53 +00:00
Munsterlander
bdaef7e541 Adding a candy cane mode (#1445)
* Adding Candy Cane mode

* Added Candy Cane mode
2020-12-07 08:33:08 +01:00
cschwinne
854501385e Bus progress 2020-12-07 01:39:42 +01:00
Sam Martin
7b875ed378 Merge branch 'master' into esp32_multistrip 2020-12-05 08:16:15 -06:00
Aircoookie
c930d6ddc0 Merge pull request #1432 from Aircoookie/master
Merge master to dev
2020-12-04 10:04:02 +01:00
Brandon
aab2e4555a Added Temperature Palette (#1430)
* Added Temperature Palette

Added cpt-city temperature_gp palette. Palette is nice combination of blues to reds to yellows. Reduced original cpt-city palette to 18 lines to fit WLED constraints. Tested palette and it visually is consistent with original cpt-city colors and look and works in WLED.

* Update palettes.h

* Update palettes.h
2020-12-04 10:01:41 +01:00
danecreekphotography
938eefae9b Add VSCode build tasks (#1421)
* Add VSCode build tasks

* Split to two build tasks

* Add combined task
2020-12-04 09:55:30 +01:00
Aircoookie
eccc5e6d61 Merge pull request #1420 from danecreekphotography/devcontainer-updates
Add PlatformIO and npm install
2020-12-03 10:22:10 +01:00
cschwinne
bc96ca48b6 UDP parsePacket() with sync disabled 2020-12-02 22:47:31 +01:00
Neil Enns
e5dd88cdce Add PlatformIO and npm install 2020-12-02 12:45:11 +00:00
Aircoookie
51acd4952b Merge pull request #1383 from sunbowch/master
mutiple RGBW leds support for DMX control
2020-12-02 12:20:49 +01:00
cschwinne
88e0da765c Remove code duplication for RGBW 2020-12-01 14:40:00 +01:00
Jason2866
3ba708b98d Silence Platformio setup warnings (#1413)
* silence setup warnings

* silence compile Option
2020-12-01 13:33:22 +01:00
broccoliboy
dfb6216271 update to track core NpbWrapper.h (#1409)
Co-authored-by: Sam Martin <a0221077@ti.com>
2020-12-01 10:11:43 +01:00
Sam Martin
70387e6976 Merge branch 'master' into esp32_multistrip 2020-11-30 20:32:39 -06:00
cschwinne
55fd781c77 Fixed compilation for analog (PWM) LEDs 2020-12-01 00:38:26 +01:00
cschwinne
36a0a240f9 First progress in busmnger 2020-12-01 00:33:47 +01:00
Def3nder
ed0b507fb5 Fix IR-Remote type to cfg.json (#1395)
* Save IR-Remote type to cfg.json

...instead of defaulting it to 0 (this way the IR-Remote waas disabled after each reboot).
2020-11-29 22:29:44 +01:00
cschwinne
3a3948e74f Release of WLED v0.11.0 2020-11-29 22:07:12 +01:00
Def3nder
c01dd232c5 FIX IR_PIN to IRPIN (#1394)
...in cfg.cpp the if statement used "IRPIN" (which is consistent to all other PIN names), but on the declaration-side "IR_PIN" was used.

Changed all occurences of "IR_PIN" to "IRPIN".
2020-11-29 20:47:13 +01:00
Aircoookie
825cc096c0 Merge pull request #1393 from danecreekphotography/devcontainer
Add support for VSCode devcontainer development
2020-11-29 17:49:27 +01:00
Neil Enns
bcd574036e Add python devcontainer config 2020-11-29 14:33:59 +00:00
Sam Martin
634fe64dca update to track core NpbWrapper.h 2020-11-28 21:58:02 -06:00
larrywal
e33a0bf940 Update custom32_LEDPIN_16 build config to use the right relay pin (#1385)
The Quin-Dig-Quad has the relay pin on IO19 (Q3).  However, it is on IO12 by default.  Update the build flags for the custom32_LEDPIN_16 build to also move the relay pin to IO19 so it works properly with the board.
2020-11-28 00:19:49 +01:00
cschwinne
fb91d9b2d4 Color order override macros 2020-11-27 23:59:00 +01:00
sunbowch
3d89588eb1 mutiple RGBW leds support for DMX control
RGBW leds can be individually adressed through E1.31 control.
-Added option 'Multi RGBW' to the settings
-Modified e131.cpp accordingly
-Tuned other parameters to make it work
2020-11-27 11:37:39 +01:00
Aircoookie
ac010cd7b2 Merge pull request #1378 from andyshinn/feature/slider-value-display
Display tooltip with value on slider change
2020-11-26 23:17:13 +01:00
cschwinne
d0c94ba565 Center slider tooltips and hide on very small screens 2020-11-26 23:07:15 +01:00
cschwinne
adbeb4ae54 Add live property to state, allowing toggling of realtime (not incl. in state resp.) ( #1308 ) 2020-11-26 10:54:37 +01:00
Andy Shinn
c7e1b47c59 display tooltip on slider value change 2020-11-24 23:34:47 -06:00
Aircoookie
b25e22bca4 Merge pull request #1362 from broccoliboy/esp32_multistrip
ESP32 multiple data pin outputs
2020-11-23 01:01:51 +01:00
toto79
6cb6a8ee98 create stairway-wipe-for-usermod-v2 (#1359)
* create stairway-wipe-for-usermod-v2

* Update and rename stairway-wipe-usermod.h to stairway-wipe-usermod-v2.h
2020-11-23 01:00:02 +01:00
cschwinne
223bd969fd Version bump to 0.11.0 "Mirai"
Improved preset name sorting
Fixed Preset cycle not working beyond preset 16
2020-11-23 00:58:58 +01:00
cschwinne
ae46eeabef Fixed invalid save when modifying preset before refresh (might be related to #1361)
Fixed brightness factor ignored on realtime timeout (fixes #1363)
Fixed Phase and Chase effects with LED counts >256 (PR #1366)
2020-11-23 00:10:14 +01:00
Def3nder
79c83a96a0 Fix code for long LED strips (>256 LEDs long) (#1366)
* Alexa RGBW Support

When adding an RGBW device to Alexa and then selecting a white color tone, Alexa will send CT values to the device. Having a warm white or cold white strip should use 100% of that strip and then add the RGB colors to get either a warmer color or a colder one.

* 40 keys IR Remote 

Added IR remote with 40 keys to use with RGBW stripes.

* ESU8285 flash size corrected

* ESP32 fixes for Solid RGBW

...not implemented for ESP32 yet
ESP32 Solid RGBW defines

moved from env:esp32dev to env:esp32
ESP32 Solid RGBW defines

* Update readme.md

* Update readme.md

* Update readme.md
Update readme.md

* Use different IR remotes in the settings

To turn off IR remote use "0" in the settings, use 1 to 4 for different IR remote types.

* Use 5CH solid RGB stripes

adapt the logic to use CW and WW for different CT-values

* change from Opt-Out to Opt-In for solid (analoge) RGB stripes

Changed code from #define WLED_DISABLE_ANALOG_LEDS to #define WLED_USE_ANALOG_LEDS

* DEFINES for different devices added

* order of PINs alligned to hardware

* Update readme.md

* correct initialization of variable rgb[]

* SunRise Effect

NightLight used to brighten the light combined with fading from the actual (primary) color to the secondary color

* Fixed headline

RLYPIN definition dependant on WLED_USE_ANALOG_LEDS

Corrected list-item indents (readme.md)

updated to match upstream master (briLast in wled00.ino)

* Updates to adopt to upstream master

RLYPIN definition dependant on WLED_USE_ANALOG_LEDS

Fixed headline and corrected list-item indents (readme.md)

updated to match upstream master (briLast in wled00.ino)

* Sync with upstream master

* PIO ini correction

* sync of upstream readme.md

* FX intensity slider to desaturate Color in Colorloop FX

in default intensity (128) everything looks the same, decreasing the intensity will desaturate the color towards WHITE

* PIO changes

* adjusted linker scripts, debug settings etc.

* Override script updated accordingly

* ldscriipt for 1m0 adjusted

* backup files deleted

* deletion of wled00,ino.cpp

* remove travis build from PIO

* add custom builds to PIO

...to map the releases

* removed build_type = release (as this is default)

* updated to use espressif8266@2.3.3

...instead of espressif8266@2.3.2  (both on arduino 2.6.3)

* added more options to the PIO-override.ini

* analog, too

* build only 5 envs with Travis.CI

* should be include not exclude

* YAML correction

* next YAML

* UNDO

* some effects behave wrong with strips longer then 256 LEDs

This is particular true for the effects "Phased" and "Phased Noise" as well as for "Chase Rainbow".

The reason is that in this cases 256 is divided by SEGLEN and used in the formula, but with SEGLEN greater than 256 the integer result will always be ZERO.
2020-11-23 00:06:57 +01:00
Sam Martin
db33eb5b1f esp32_multistrip usermod enables driving up to 8 LED strips using RMT hardware accelerated pixel data pushing 2020-11-21 21:25:38 -06:00
cschwinne
bc45f8f1d8 Fixed Brightness slider beneath color wheel not working (fixes #1360)
Fixed invalid UI state after saving modified preset
2020-11-21 22:23:00 +01:00
Aircoookie
7875a96137 Merge pull request #1355 from Aircoookie/filesystem
The wait is almost over
2020-11-20 01:06:54 +01:00
cschwinne
4875f5e275 BTNPIN can now be disabled by setting to -1 (fixes #1237)
Added HEX color receiving to JSON API
Moved Kelvin color receiving in JSON API
2020-11-20 00:33:17 +01:00
Aircoookie
7f9da22626 Merge pull request #1356 from mcqn/fix-bug-with-mqtt-group-topics
Fix bug where messages sent to the group topic were incorrectly ignored
2020-11-19 11:47:47 +01:00
Adrian McEwen
78098e612d Fix bug where messages sent to the group topic were incorrectly ignored. Fixes #5 2020-11-19 00:01:21 +00:00
cschwinne
e19ab9a0d5 Add Hawaii time (resolves #1354 )
Platformio.ini updates and streamlining (PR #1266)
my_config.h custom compile settings system (not yet used for much, adapted from PR #1266)
Linebreak after 5 quick select buttons
2020-11-18 23:27:54 +01:00
Aircoookie
ace45516d9 Merge pull request #1352 from Aircoookie/1m_ota
Merge new platformio to FS branch
2020-11-18 10:52:30 +01:00
cschwinne
fe57bfce1b FS define 2020-11-18 09:45:07 +01:00
Aircoookie
453cc0cc05 Merge pull request #1353 from AbhiGulati/fix-hue-white
Fix Hue sync for RGBW white in XY color mode
2020-11-18 08:37:35 +01:00
Abhi Gulati
39009c482d Fix Hue sync for RGBW white in XY color mode 2020-11-17 23:18:30 -06:00
Aircoookie
6b942be1cd Merge branch 'filesystem' into 1m_ota 2020-11-18 01:05:51 +01:00
cschwinne
77aa2b6ba9 Streamline platformio.ini 2020-11-18 00:54:41 +01:00
cschwinne
074d53fa17 Fix a few compiler warnings 2020-11-17 22:46:17 +01:00
Jason2866
a839ec4832 Add gzip support for full OTA possibilitys for 1M build (#1266)
* delete history

* add firmware

Signed-off-by: Jason2866 <obermeier.johann@googlemail.com>

* Delete platformio_override.ini

* Update .gitignore

* Delete WLED_tasmota_1M.bin

* Delete WLED_tasmota_1M.bin.gz

* Update platformio.ini

* Core 2.7.4.5

* new override

* actual firmware

* Update user_config_override_sample.h

* Delete platformio_override.ini

* Delete WLED_tasmota_1M.bin

* Delete WLED_tasmota_1M.bin.gz

* core 2.7.4.7
2020-11-17 21:49:39 +01:00
cschwinne
5119799256 Fixed compilation when BTNPIN, IRPIN or RLYPIN not defined (fixes #1350 ) 2020-11-17 09:25:31 +01:00
cschwinne
176e18e4c0 Move Network class to src/dependencies (fixes #1349 ) 2020-11-17 08:57:05 +01:00
cschwinne
b697df35c6 A few more small fixes 2020-11-15 22:52:59 +01:00
cschwinne
5236625485 A few small fixes 2020-11-15 20:58:04 +01:00
cschwinne
f36073f5cd Add new 404 page 2020-11-15 16:37:09 +01:00
cschwinne
595fd9377c Remove FS defines
Increase boot preset max. to 250
Update changelog
Update readme
2020-11-15 15:45:51 +01:00
Aircoookie
76f4c49e22 Merge pull request #1341 from Aircoookie/mergefs-201115
Merge ethernet support to FS branch
2020-11-15 14:01:47 +01:00
Aircoookie
8c0592cdb7 Merge branch 'filesystem' into mergefs-201115 2020-11-15 13:21:56 +01:00
cschwinne
0c73ecf6a8 Added Pin Manager 2020-11-15 12:41:51 +01:00
tbnobody
c365fd9d74 Ethernet Support (#1316)
Ethernet Support
2020-11-13 18:25:13 +01:00
Aircoookie
aa8c587ac8 Merge pull request #1332 from Aircoookie/mergefs-201112
Update FS branch
2020-11-12 11:26:30 +01:00
Aircoookie
e9d9760e16 Merge branch 'filesystem' into mergefs-201112 2020-11-12 11:12:10 +01:00
cschwinne
560f72a320 Add JSON receiving to MQTT /api 2020-11-12 09:13:08 +01:00
cschwinne
3425f2bf34 Add Playlist feature 2020-11-11 23:48:14 +01:00
cschwinne
e28dbb3b93 Usermod callbacks for custom settings 2020-11-11 15:50:15 +01:00
Aircoookie
1b3ed80d37 Replace readme tutorials with link to tutorial overview wiki page 2020-11-10 23:36:28 +01:00
Aircoookie
89a2e15cfb Merge pull request #1302 from catlee/nightlight-remaining
Return remaining nightlight time in json API
2020-11-10 21:16:54 +01:00
Aircoookie
99b1282e98 Merge pull request #1317 from jsloyer/patch-1
correct the copyright year and add a link to the license
2020-11-10 13:47:56 +01:00
cschwinne
ed753b590c Add copyright and license link to .htm 2020-11-10 13:30:42 +01:00
Aircoookie
bda095b0ec Merge pull request #1325 from e850205/patch-1
Update readme.md
2020-11-10 13:27:12 +01:00
cschwinne
9d7f1d230c Only add 16 to macros if they are not 0 2020-11-09 20:48:44 +01:00
e850205
bdf0458780 Update readme.md 2020-11-09 13:14:24 -06:00
cschwinne
7f973ad131 Unaccessible wsec.json and preset loading fix 2020-11-09 11:09:47 +01:00
cschwinne
1f42070104 A few fixes 2020-11-09 00:50:13 +01:00
cschwinne
98e4ac6b27 FS working for ESP8266 2020-11-08 23:44:10 +01:00
Chris AtLee
8d318e7206 Return remaining nightlight time in json API
This returns the number of seconds remaining in the nightlight in the
"rem" field of the nightlight ("nl") state. If there is no nightlight
active, it returns -1.
2020-11-08 10:44:25 -05:00
cschwinne
362156c8ab F() 2020-11-07 23:54:56 +01:00
cschwinne
3ff23ade8b Done in principle 2020-11-06 22:12:48 +01:00
cschwinne
d9050dd8b9 Progress with parsers 2020-11-05 22:54:13 +01:00
Jeff Sloyer
bcee2c37d7 correct the copyright year and add a link to the license 2020-11-05 14:54:57 -05:00
cschwinne
b8fcab29ac Inversed Rain direction (fixes #1147) 2020-11-04 23:20:34 +01:00
cschwinne
8ddae6bba0 wsec start 2020-11-04 17:17:54 +01:00
cschwinne
fc9255cdc4 Added new file for JSON cfg parsing code 2020-11-04 11:04:40 +01:00
cschwinne
f725506df0 Settings deserialization 2020-11-03 00:35:04 +01:00
cschwinne
aa27b85538 Re added old C9 palette 2020-11-01 20:54:35 +01:00
Aircoookie
afe75f8a89 Merge pull request #1309 from herm/usermod_mqtt_switch
Usermod mqtt switch
2020-11-01 20:29:50 +01:00
Hermann Kraus
b725d66ee3 Add options for inverted switches and default values. 2020-11-01 18:08:30 +01:00
Hermann Kraus
fe3fb622ee New usermod: MQTT switches.
This user mod adds a function to toggle output pins via MQTT.
2020-11-01 16:27:23 +01:00
Aircoookie
e8bd114c01 Merge pull request #1307 from herm/mqtt_topic
Fix MQTT topic parsing.
2020-11-01 12:13:21 +01:00
Hermann Kraus
b694bcf62a Fix MQTT topic parsing.
The previous code only looked for certain keywords in the topic instead of comparing it completely.
For example if mqttDeviceTopic is set to "lights/colorRGB" the MQTT interface is unusable because
the search for "/col" will always return a match and therefore any MQTT command is interpreted as
a color.
The new code checks the full topic.
2020-11-01 02:23:37 +01:00
Aircoookie
b0f933c926 Merge pull request #1306 from Aircoookie/master
Update FS branch (yes, it is necessary)
2020-10-31 23:53:29 +01:00
Lech Perczak
2d12bc01de Change SP501A -> SP501E build configuration (#1305)
Fix a typo in previous commit. Correct board name is SP501E.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2020-10-31 23:51:52 +01:00
Lech Perczak
17b4ff7a1f Add build configuration for SP501A controller (#1303)
This controller uses ESP8285 with 2MB built-in flash.
Features:
- LED string is connected to GPIO3,
- On/off button connected to GPIO1,
- Built-in transistors to drive non-addressable R-G-B-Wc-Ww strips
  (by default not connected, only pads are present).

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
2020-10-31 21:41:44 +01:00
Aircoookie
6aff9f91d5 Merge pull request #1304 from Aircoookie/mergefs-201031
Update FS branch (again)
2020-10-31 21:33:59 +01:00
Aircoookie
cac8fd93e4 Merge branch 'filesystem' into mergefs-201031 2020-10-31 21:21:32 +01:00
Miha Frangež
f046abefbc Mention analog strips in README (#1297) 2020-10-29 20:29:15 +01:00
Aircoookie
b34e060b17 Merge pull request #1287 from huksley/html-es6
Use html-minifer-terser for ES6+ support
2020-10-29 16:59:43 +01:00
cschwinne
907be77ef4 Include minified JS 2020-10-29 10:14:21 +01:00
cschwinne
373d12be64 Realtime max. brightness now honors brightness factor (fixes #1271)
- Colorful effect now supports palettes
- Added C9 2 palette (#1291)
- Improved C9 palette brightness by 12%
- Disable onboard LED if LEDs are off (PR #1245)
- Added optional status LED (PR #1264)
- Realtime max. brightness now honors brightness factor (fixes #1271)
- Updated ArduinoJSON to 6.17.0
2020-10-29 01:23:04 +01:00
Ruslan Gainutdinov
bf45d55b4a Use html-minifer-terser for ES6+ support 2020-10-26 23:31:35 +02:00
cschwinne
2525429070 deEEP for presets 2020-10-23 17:48:01 +02:00
Aircoookie
2513bcf2c6 Merge pull request #1270 from Aircoookie/mergefs-201019
Update FS branch
2020-10-19 23:37:29 +02:00
Aircoookie
bbffb6d901 Merge branch 'filesystem' into mergefs-201019 2020-10-19 23:37:18 +02:00
cschwinne
3b7f5a1397 Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-10-19 23:30:07 +02:00
cschwinne
600e949628 Update ArduinoJson-v6.h 2020-10-19 23:30:02 +02:00
Jeff Rescignano
235c123ad0 Add status led (#1264)
* Add status led

* Shorten code

* Fix "Shorten code"

* Change ledStatusType to an unsigned short
2020-10-19 18:08:45 +02:00
guilhermebera
dcea584a9a Update readme.md (#1257) 2020-10-17 12:13:41 +02:00
cschwinne
d583adb958 New quota calculation 2020-10-16 23:59:34 +02:00
Aircoookie
0d96a0fb7c Merge pull request #1255 from guilhermebera/patch-1
Update usermod_PIR_sensor_switch.h
2020-10-14 13:58:38 +02:00
guilhermebera
fb6b2cbfa2 Update usermod_PIR_sensor_switch.h
Current: If I disable PIR after it switch strip on, it'll switch off by timer.
Update: If I disable PIR after it switch strip on, it'll keep strip on.
2020-10-14 01:07:20 -03:00
cschwinne
eb65eafbe0 Working API commands 2020-10-13 01:39:34 +02:00
Jeff Rescignano
13f18492ad Disable onboard LED when LEDs are not in use (#1245)
* Disable onboard LED when LEDs are not in use

* Remove unused variable

* Only disable onboard LED if LEDPIN == LED_BUILTIN

* Change LEDPIN to LED_BUILTIN
2020-10-12 20:13:13 +02:00
Aircoookie
3d04541ee3 Merge pull request #1239 from rawframe/patch-1
Usermod PIR with Highlight & Standby modes and more control. (branched from Gegus PIR_sensor_switch)
2020-10-09 15:51:31 +02:00
Jeff Rescignano
6ded0cce12 [ImgBot] Optimize images (#1238)
*Total -- 2,546.93kb -> 2,358.92kb (7.38%)

/images/wled_logo_clean.png -- 2.48kb -> 0.59kb (76.3%)
/usermods/Enclosure_with_OLED_temp_ESP07/assets/pcb.png -- 235.03kb -> 201.10kb (14.43%)
/images/wled_logo.png -- 46.43kb -> 40.20kb (13.41%)
/images/wled_logo_akemi.png -- 24.41kb -> 21.60kb (11.5%)
/usermods/TTGO-T-Display/assets/ttgo_hardware1.png -- 685.48kb -> 613.17kb (10.55%)
/usermods/Enclosure_with_OLED_temp_ESP07/assets/controller.jpg -- 149.82kb -> 136.31kb (9.02%)
/usermods/battery_keypad_controller/assets/bat-key-ctrl-1.jpg -- 318.82kb -> 298.56kb (6.36%)
/usermods/battery_keypad_controller/assets/bat-key-ctrl-3.jpg -- 343.93kb -> 322.75kb (6.16%)
/usermods/battery_keypad_controller/assets/bat-key-ctrl-2.jpg -- 250.06kb -> 235.49kb (5.83%)
/images/macbook-pro-space-gray-on-the-wooden-table.jpg -- 490.48kb -> 489.15kb (0.27%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-10-09 12:48:19 +02:00
rawframe
1ecbaf2c7f Create PIR_Highlight_Standby
* Rawframe edit:
 * - TESTED ON WLED VS.0.10.1 - WHERE ONLY PRESET 16 SAVES SEGMENTS - some macros may not be needed if this changes.
 * - Code has been modified as my usage changed, as such it has poor use of functions vs if thens, but feel free to change it for me :)
 * 
 * Edited to SWITCH between two lighting scenes/modes : STANDBY and HIGHLIGHT
 * 
 * Usage:
 *  - Standby is the default mode and Highlight is activated when the PIR detects activity.
 *  - PIR delay now set to same value as Nightlight feature on boot but otherwise controlled as normal.
 *  - Standby and Highlight brightness can be set on the fly (default values set on boot via macros calling presets).
 *  - Macros are used to set Standby and Highlight states (macros can load saved presets etc).
 * 
 *    - Macro short button press   =  Highlight state default (used on boot only and sets default brightness).
 *    - Macro double button press  =  Standby state default   (used on boot only and sets default brightness).
 *    - Macro long button press    =  Highlight state         (after boot).
 *    - Macro 16                   =  Standby state           (after boot).
 *
 *    ! It is advised not to set 'Apply preset at boot' or a boot macro (that activates a preset) as we will call our own macros on boot.
 * 
 *  - When the strip is off before PIR activates the strip will return to off for Standby mode, and vice versa.
 *  - When the strip is turned off while in Highlight mode, it will return to standby mode. (This behaviour could be changed easily if for some reason you wanted the lights to go out when the pir is activated).
 *  - Macros can be chained so you could do almost anything, such as have standby mode also turn on the nightlight function with a new time delay.
 * 
 * Segment Notes:
 * - It's easier to save the segment selections in preset than apply via macro while we a limited to preset 16. (Ie, instead of selecting sections at the point of activating standby/highlight modes). 
 * - Because only preset 16 saves segments, for now we are having to use additional macros to control segments where they are involved. Macros can be chained so this works but it would be better if macros also accepted json-api commands. (Testing http api segment behaviour of SS with SB left me a little confused).
 * 
 * Future:
 *  - Maybe a second timer/timetable that turns on/off standby mode also after set inactivity period / date & times. For now this can be achieved others ways so may not be worth eating more processing power.
2020-10-08 23:42:32 +01:00
cschwinne
b0828a6280 Bigger buffer testing 2020-10-08 00:52:15 +02:00
cschwinne
d2ffb3ca9d FQ quota and info 2020-10-07 17:48:22 +02:00
cschwinne
606cd18dc4 Working deletion
Added HTTP API support to JSON API
2020-10-03 00:29:36 +02:00
Aircoookie
8a713b2bbb Merge pull request #1218 from Aircoookie/mergefs-201002
Update FS branch
2020-10-02 13:49:13 +02:00
Aircoookie
c68f31a11c Merge branch 'filesystem' into mergefs-201002 2020-10-02 13:39:25 +02:00
cschwinne
3107943af8 Fixed interaction of T and NL HTTP API commands (#1214) 2020-10-02 12:30:17 +02:00
Aircoookie
bf9360f374 Merge pull request #1217 from Landrash/master
Add shield for license in Readme.md
2020-10-02 08:58:32 +02:00
cschwinne
f66c28a1bc Fix MQTT bootloop (no F() macro, #1199 ) 2020-09-29 21:41:52 +02:00
Aircoookie
5d6e214e0e Merge pull request #1213 from Aircoookie/ddp-protocol
DDP protocol
2020-09-29 01:18:05 +02:00
cschwinne
ee8596d175 DDP working 2020-09-29 01:13:29 +02:00
Landrash
3c900814be Add shield for license 2020-09-29 00:08:12 +02:00
cschwinne
52df963be9 DDP Support 2020-09-28 16:29:01 +02:00
Aircoookie
8c513c2aad Merge pull request #1208 from Phunkafizer/master
Added washing machine FX
2020-09-27 14:57:40 +02:00
cschwinne
1e3834dc3d Move tristate_square8 to FX_fcn.cpp 2020-09-27 14:42:14 +02:00
cschwinne
386b10a004 Update CHANGELOG.md 2020-09-27 11:53:24 +02:00
Aircoookie
f697f3d7ad Merge pull request #1209 from Aircoookie/merge-loxone
Merge loxone support
2020-09-27 11:49:08 +02:00
cschwinne
8d3ff16037 Add udpNotifier2 (JSON+HTTP, closes #1205 )
Added Loxone defines
Fix missing timezones (#1201)
2020-09-27 11:43:28 +02:00
m0fa
b10ab358da Loxone support added (#1185)
* A separate socket for UDP api has been added. This uses the same API as HTML. Commands for Loxone were added to the API.

* html files for udp api newly generated

* codm pixel controller board configurations added to platformio.ini file

* Parser for LX/LY commands adapted. Calculation of the values corrected. Segment handling for LX/LY removed.

* Lox parser moved to own file. Lox parser added to the JSON api. Within a segment LX and LY are now supported.

* serial port removed

* F() macro added

Co-authored-by: Marius Groos <marius.groos@codm.de>
2020-09-27 11:37:16 +02:00
S. Seegel
2cc6edd868 Added washing machine FX 2020-09-27 01:58:21 +02:00
Aircoookie
cac974b8e1 Merge pull request #1200 from Joeboyc2/patch-2
Add the ability to override R,G,B,WPIN values
2020-09-23 18:47:48 +02:00
Joeboyc2
2c02e27197 Add the ability to override R,G,B,WPIN values
Enable the ability to use the -D option in the platform_override.ini to set the pin numbers outside of the file
2020-09-23 16:49:55 +01:00
Aircoookie
85c0002a78 Merge pull request #1193 from Aircoookie/merge-fs2
Update FS branch
2020-09-22 08:34:23 +02:00
Aircoookie
bd65bf2175 Merge branch 'filesystem' into merge-fs2 2020-09-21 19:48:12 +02:00
cschwinne
d70332f2a2 Fixed LPD8806 compilation (#971) 2020-09-20 22:21:29 +02:00
cschwinne
35b54e2f88 Add CY=2 for cycle toggling (closes #1174) 2020-09-20 16:40:32 +02:00
Jake
a3e1af72ab Add ESP32 touch sensors as button alternative (#1190)
* Add touch option to button handler

* Check if touch is pressed in setup

* Add TOUCHPIN build env and override example

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2020-09-20 16:12:46 +02:00
Peter
1313a44ba3 ESP8266: Allow auto modem sleep if power off and sleep permitted (#1184)
* Allow modem sleep if power off and sleep permitted

* Only add auto modem sleep handling for ESP8266

* Add comment and remove redundant condition

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2020-09-20 16:00:24 +02:00
cschwinne
edbe8131ab Reduce heap usage by 4kB 2020-09-20 01:18:31 +02:00
cschwinne
ff55a305cd Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-09-17 10:40:36 +02:00
cschwinne
10c22efbb5 Fixed 170th pixel dark in E1.31 2020-09-17 10:40:32 +02:00
Aircoookie
118bbfbcf7 Merge pull request #1186 from antoni-k/patch-1
Fix typo
2020-09-17 09:35:24 +02:00
NeariX67
e7709d8463 Upload TouchBrightnessControl Usermod for ESP32 (#1183)
* Upload Usermod

* Fix missing : public Usermod

* Increased default threshold, added touchPin #define

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2020-09-16 21:21:26 +02:00
Antoni K
d70e421db3 Fix typo
Added an "l" to Compatible PC RGB...
2020-09-16 12:39:45 +08:00
Andreas Perhab
0028c3c640 enable sliders with a different max value (#1156)
* enable sliders with a different max value

* Only change in index.htm for now

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-09-15 21:59:12 +02:00
cschwinne
2594cb23c4 Merge branch 'filesystem' of https://github.com/Aircoookie/WLED into filesystem 2020-09-15 21:28:51 +02:00
cschwinne
d975f6e23a Update ArduinoJson to 6.16.1
Add fsinfo to JSON info
2020-09-15 21:28:43 +02:00
Aircoookie
5e46975c63 Merge pull request #1182 from Aircoookie/merge-200914
Merge master into filesystem
2020-09-14 17:00:10 +02:00
Aircoookie
16f41fc4b4 Merge branch 'filesystem' into merge-200914 2020-09-14 16:32:31 +02:00
cschwinne
1263f5e046 Presets work 2020-09-14 00:31:38 +02:00
cschwinne
96713ef383 LittleFS by default 2020-09-13 22:00:47 +02:00
Jeff Rescignano
26a8686a54 Firefox Custom Scrollbar (#1163)
* Firefox custom scrollbar

* Put Firefox scrollbar css in first body tag

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-09-13 21:29:36 +02:00
Phil Bolduc
57421d2392 Async temperature usermod (#1178)
* Change Temperature usermod to use async reading to avoid blocking

* Fix comparison on wait time

* Add

* Simplify logic in the loop method

* Optimize calls to minimize latency, inform user how long till first measurement

* disable usermod if sensor not found

* Added debug statements on init, update readme

* fix spelling error of celsius
2020-09-13 19:26:27 +02:00
Jeff Rescignano
63d92381ee New WLED logo on the welcome screen (#1164)
* Akemi on the welcome screen

* Move style element to CSS

* Use smaller Akemi image, improve margin, rounded buttons

* New WLED logo on welcome page

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-09-12 21:16:31 +02:00
cschwinne
2716f4cbe9 Fixed passwords not clearable 2020-09-10 11:01:05 +02:00
cschwinne
6ef4582ebd Fix write with string 2020-09-09 10:21:56 +02:00
cschwinne
649ebb8a4e Add previously unsaved changes 2020-09-09 09:54:58 +02:00
cschwinne
b1acf6088f Presets in FS function 2020-09-09 09:51:04 +02:00
Aircoookie
78f5d80c5b Merge @WoodyLetsCode Open releases in new tab (#1152)
* New Segments are now initialized with default speed and intensity

* Open releases in new tab (#1152)

* open releases in new tab

* Revert "open releases in new tab"

This reverts commit 6e3940c8eb.

* open releases in new tab

Co-authored-by: Woody <>

Co-authored-by: Woody <27882680+WoodyLetsCode@users.noreply.github.com>
2020-09-07 21:17:29 +02:00
Woody
5896b1eb71 Open releases in new tab (#1152)
* open releases in new tab

* Revert "open releases in new tab"

This reverts commit 6e3940c8eb.

* open releases in new tab

Co-authored-by: Woody <>
2020-09-07 21:04:21 +02:00
Aircoookie
559891ac43 New Segments are now initialized with default speed and intensity (#1158) 2020-09-07 21:02:02 +02:00
cschwinne
1fbe1d1855 New Segments are now initialized with default speed and intensity 2020-09-07 21:01:10 +02:00
cschwinne
71473fd5c4 Saving progress 2020-09-07 20:39:12 +02:00
Aircoookie
c7beacf3b9 Merge pull request #1139 from Aircoookie/master-to-fs
Merge master to filesystem branch
2020-09-03 21:08:14 +02:00
Aircoookie
3dc55ff8b5 Update platformio.ini 2020-09-03 17:36:14 +02:00
Aircoookie
b6789e0011 Merge branch 'filesystem' into master-to-fs 2020-09-03 15:02:17 +02:00
cschwinne
2f2bebe506 Fixed bootloop if mDNS is used on builds without OTA support 2020-09-03 14:04:33 +02:00
cschwinne
503b8cbf34 Release of WLED v0.10.2 2020-08-31 17:03:07 +02:00
Phil Bolduc
916356afad Use maximum gzip compression (#1126)
* Use maximum gzip compression

* Revert extra changes

* Remove extra code used when testing brotli compression

* Remove extra space on unrelated changes
2020-08-31 10:57:17 +02:00
cschwinne
41a84160ec 0.10.2-rc 2020-08-30 23:31:58 +02:00
Aircoookie
55f071e4a0 Merge pull request #1125 from CyberLine/master
make PCARS usermod compatible with WLED > 0.10.0
2020-08-30 22:01:09 +02:00
Alexander Over
0afe0f8fbd make PCARS usermod compatible with WLED > 0.10.0 2020-08-30 21:27:52 +02:00
Aircoookie
427b5bd126 Merge pull request #1108 from xxv/xxv-dancing-shadows
Add Dancing Shadows effect
2020-08-30 11:45:00 +02:00
cschwinne
20f6378a3e Move blendPixelColor() to FX_fcn.cpp 2020-08-30 10:57:42 +02:00
cschwinne
36e0a1eb23 Individual LED control via JSON (closes #226 ) 2020-08-29 22:26:39 +02:00
cschwinne
ac9a567e1f Pacifica better speed 2020-08-25 17:23:17 +02:00
bwente
33cd52cddd design updates (#1112)
* initial word clock usermod

Based on code provided by Aircoookie I added my code to create a word clock using a 8x8 RGB matrix

* construction source files

files for laser or 3d printing enclosures

* Update word-clock-matrix.cpp

fixed missed localTime var and removed brightness schedule to use timed macros

Co-authored-by: Aircoookie <dev.aircoookie@gmail.com>
2020-08-25 10:33:47 +02:00
Aircoookie
d543ba82ac Add CLKPIN/DATAPIN to PIO override (as suggested in #1109) 2020-08-25 10:32:32 +02:00
Aircoookie
5a98993df9 Merge pull request #1109 from xxv/xxv-override-clkdata
Allow overriding CLKPIN/DATAPIN
2020-08-25 10:30:24 +02:00
Steve Pomeroy
aee9c4a193 Add Dancing Shadows effect 2020-08-23 17:06:11 -04:00
Steve Pomeroy
0262f89bb0 Allow overriding CLKPIN/DATAPIN 2020-08-22 14:57:44 -04:00
Aircoookie
a8c530a3a9 Merge pull request #1101 from droloff/fix-npe
check payload to avoid npe
2020-08-20 08:44:09 +02:00
Aircoookie
7dc1240c18 Merge pull request #1100 from mickabrig7/master
Improve TPM2.NET code
2020-08-20 08:43:22 +02:00
Dirk Roloff
3b4bccd0a7 check payload to avoid npe 2020-08-20 00:13:06 +02:00
cschwinne
39a80f8dc7 Add easy segment mirroring (closes #1010) 2020-08-20 00:04:02 +02:00
mickabrig7
ce446dac92 Improve TPM2.NET code
Add support for receiving TPM2.NET packets out of order, and hopefully prevent crashes if faced with protocol errors
2020-08-19 10:40:16 +02:00
cschwinne
b1c9dbd0a5 Removed verbose live mode info from HTTP API
Add logo without background tags
2020-08-19 09:10:47 +02:00
Aircoookie
a5c57d7fb0 Create readme.md 2020-08-19 08:53:54 +02:00
Aircoookie
0a349e5298 Merge pull request #1099 from bwente/usermod-word-clock-matrix
initial word clock matrix usermod
2020-08-19 08:48:20 +02:00
Aircoookie
dc7d7150cd Refactor local to localTime
(variable name in latest master)
2020-08-19 08:47:16 +02:00
Brian Wente
7c4aa4441f initial word clock matrix usermod
Based on code provided by Aircoookie I added my code to create a word clock using a 8x8 RGB matrix
2020-08-18 16:22:22 -04:00
Aircoookie
62a795bd3b Merge pull request #1092 from JeffResc/arduino-framework
Bump espressif8266 to v2.6.2
2020-08-16 12:47:34 +02:00
Aircoookie
c583ab4f1a Merge pull request #1097 from peacepenguin/master
Add PC RGB notes
2020-08-16 10:33:37 +02:00
Ben
45a2970307 Add PC RGB notes
add info for pc argb enthusiasts to know they can use WLED as an alternative to the motherboard controller.
2020-08-15 13:16:07 -06:00
cschwinne
5a4b719995 Fixed Auto White mode setting (fixes #1088) 2020-08-10 23:35:18 +02:00
Aircoookie
34a4a89bc9 Merge pull request #1091 from garyd9/fix-for-UTC-rollover
couple of bug fixes for usermod_SunRiseAndSet
2020-08-10 10:27:33 +02:00
Jeff Rescignano
02989f65ff Bump espressif8266 to v2.6.2 2020-08-10 00:44:01 -04:00
garyd9
1da539ef05 couple of bug fixes
Fix a typo in one of the json vars
Fix an odd issue that would occur if sunrise or sunset occurs in the first hour after midnight UTC.  (The Dusk2Dawn lib would return a value greater than 1440.)
2020-08-09 21:58:27 -04:00
Aircoookie
38d6fbd3d3 Merge pull request #1089 from garyd9/UserMod_SunRiseAndSet
Add sunrise/set times to json state (for sunrise/set usermod)
2020-08-09 21:51:28 +02:00
garyd9
39682a4cf1 add more vars to json state 2020-08-09 13:55:40 -04:00
garyd9
993a5805cd Add sunrise/set times to json state 2020-08-09 13:40:12 -04:00
Aircoookie
09cf528cc6 Merge pull request #1085 from garyd9/UserMod_SunRiseAndSet
create "sunrise and sunset" WLED usermod.
2020-08-09 19:19:11 +02:00
garyd9
18ab2b3ab5 #if0 out a debug block that can be used to validate the sunrise/sunset times. 2020-08-07 15:21:45 -04:00
garyd9
655fbf91e2 create "sunrise and sunset" WLED usermod. 2020-08-07 15:14:55 -04:00
cschwinne
980794ea43 Fix filetype in usermod documentation 2020-08-07 16:06:54 +02:00
cschwinne
c1cab30daf Added mi property to APIs 2020-08-07 00:50:19 +02:00
twlare
b50e798d55 Add segment mirror option
* Add segment mirror option (#1010)

* Update new pull with playlist and palette changes

* Revert "Update new pull with playlist and palette changes"

This reverts commit 9802a7c4e2.
2020-08-04 18:50:16 +02:00
Aircoookie
230e3ef842 Merge pull request #1078 from garyd9/global-local-to-localTime
rename global var "local" to "localTime"
2020-08-04 17:34:14 +02:00
garyd9
2635a3edd0 rename global var "local" to "localTime" 2020-08-04 09:32:54 -04:00
jbucky86
47f24ac151 dmx_htm_fixes (#1070)
* Update cdata.js

* Update html_settings.h

* Update settings.htm

* Update settings_dmx.htm

* Add %DMXMENU% to cdata.js

* Fix single % being treated as template in settings.htm

Co-authored-by: cschwinne <dev.aircoookie@gmail.com>
2020-08-03 18:37:25 +02:00
Aircoookie
42397a01bf Merge pull request #1076 from tschundler/master
Fix multi-universe ArtNet output
2020-08-03 12:48:57 +02:00
cschwinne
7730a00dbb Rename local ledCount 2020-08-03 12:27:16 +02:00
Ted Schundler
3a4f4c8c34 Fix multi-universe ArtNet output
The existing code was very buggy - a 512 channel ArtNet packet sent data to
171 LEDs, not 170. Also the second ArtNet universe was off-by-one.

The math was very confusing with so many branches. The reduces the
amount of code and amount of branching.

Tested with Resolume + my own ArtNet software + 252 LEDs for ArtNet.
Tested with LedFx for e1.31
2020-08-02 17:48:47 -07:00
Aircoookie
a0d88b0cbe Merge pull request #1064 from garyd9/issue-1063
Fix for power on (T=1) resetting brightness.
2020-07-27 19:21:37 +02:00
Aircoookie
bb0419837b Merge pull request #1069 from juanesf/master
Add useful links to readme.md
2020-07-27 07:30:37 +02:00
juanesf
35098c474c Update readme.md
- add link to Hyperion.NG
- add link to WLED App (Android & iOS)
2020-07-27 00:32:32 -04:00
garyd9
0ca6535345 Fix for power on (T=1) resetting brightness.
In particular, if parsing T=1, and the brightness is already non-0,
don't do anything.
Resolves presets set from macros don't restore brightness #1063
2020-07-24 23:33:50 -04:00
Aircoookie
ec6a243e3e Hostname alphanumeric (#1048)
* Use string derived from serverDescription for wifi.hostname()

The code was sending illegal hostname strings to WiFi.hostname() (which is then submitted to DHCP and often times to DNS.)  A valid hostname contains only alphanumeric characters and hyphens (though it can't start with a hypen.)  This change simply alters the value passed to wifi.hostname() by replacing all non alphanum chars with hyphens while ensuring the first char is never a hyphen.  If the resulting hostname is empty, it uses the escapedMac value (which I'm assuming is initialized by the time this code executes.)

This change would result issue #1033

* replace string with char array
prefix wled
improve documentation

Co-authored-by: garyd9 <garyd9@hotmail.com>
Co-authored-by: Gary Dezern <gdezern@internal.youforgot.net>
2020-07-19 16:24:26 +02:00
Aircoookie
2cd8ee4a13 Merge pull request #1043 from calebmah/sensor-usermods
Photoresistor and PIR sensor MQTT usermods
2020-07-19 10:34:54 +02:00
Caleb Mah
432755e05d Use MQTT_TOPIC 2020-07-17 00:54:52 +08:00
Caleb Mah
51a7c2adc5 PIR sensor usermod 2020-07-16 23:32:23 +08:00
Caleb Mah
5c1f793887 photoresister sensor usermod 2020-07-16 23:29:06 +08:00
Aircoookie
e5dc473ced Merge pull request #1031 from THATDONFC/patch-1
Remove ESPAsyncUDP version requirement
2020-07-07 20:43:14 +02:00
THATDONFC
e57a518b34 Remove ESPAsyncUDP version requirement
The version requirement for the ESPAsyncUDP lib_dep has been causing failed builds in platformio and Travis-CI since 7/6/2020. Removing the version requirement fixes this issue. 
Please see the error below:
`Looking for ESPAsyncUDP library in registry
Found: https://platformio.org/lib/show/359/ESPAsyncUDP
LibraryManager: Installing id=359 @ 697c75a025
UndefinedPackageVersion: Could not find a version that satisfies the requirement '697c75a025' for your system 'linux_x86_64':`
2020-07-07 09:13:32 -07:00
Aircoookie
533f86c035 Merge pull request #1023 from Aircoookie/websockets
Merge Websockets branch
2020-07-02 11:25:38 +02:00
cschwinne
9947c51af7 Fix lightning effect never using last 2 LEDs
Disable Websockets by default (temporarily)
2020-07-02 00:49:37 +02:00
cschwinne
409303d0f5 Merge branch 'master' into websockets 2020-06-29 22:00:21 +02:00
cschwinne
10a1275a52 Added SV=2 to HTTP API, allow selecting single segment only 2020-06-26 23:30:13 +02:00
cschwinne
5464cbc2ed Fix Alexa not turning off white channel (fixes #1012) 2020-06-26 23:09:19 +02:00
cschwinne
3b3f8e6f43 WebSockets
Better TwinkleFox speed regulation
2020-06-26 17:28:35 +02:00
Aircoookie
2d4d7bf937 Merge pull request #1007 from axlan/mpu6050-usermod
Usermod adding Mpu6050 IMU driver
2020-06-22 15:04:11 +02:00
Aircoookie
652651668f Update MPU usermod ID 2020-06-22 15:03:37 +02:00
cschwinne
e57d5d86f3 Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-06-22 12:30:35 +02:00
cschwinne
4f7dc5be34 Added Sunrise nightlight mode and more UI features
-   Added Sunrise nightlight mode
-   Added Chunchun effect
-   Added `LO` (live override) command to HTTP API
-   Added `mode` to `nl` object of JSON state API, deprecating `fade`
-   Added light color scheme support to web UI (click sun next to brightness slider)
-   Added option to hide labels in web UI (click flame icon next to intensity slider)
-   Added hex color input (click palette icon next to palette select) (resolves #506)
-   Added support for RGB sliders (need to set in localstorage)
-   Added support for custom background color or image (need to set in localstorage)
-   Added option to hide bottom tab bar in PC mode (need to set in localstorage)
-   Fixed transition lag with multiple segments (fixes #985)
-   Changed Nightlight wording (resolves #940)
2020-06-22 12:30:31 +02:00
Jonathan Diamond
b2c656940b Added link for video and blog 2020-06-21 17:32:39 -07:00
Aircoookie
f8266d9811 Create CODE_OF_CONDUCT.md 2020-06-22 00:09:00 +02:00
Aircoookie
5c03550a8a Update issue templates 2020-06-22 00:03:24 +02:00
Axlan
ed5491a480 Added usermod for connecting MPU6050 IMU 2020-06-20 19:44:29 -07:00
Woody
e8371f403b images to jpg (#1004)
* images to jpg

* Delete macbook-pro-space-gray-on-the-wooden-table.png

* Delete walking-with-iphone-x.png

* Update readme.md
2020-06-19 22:57:24 +02:00
Aircoookie
373cffb261 Merge pull request #1002 from WoodyLetsCode/master
replace .webp images with .png images in README
2020-06-18 19:03:14 +02:00
Woody
2bf22766eb Update readme.md 2020-06-18 18:02:20 +02:00
Woody
83530fcaf1 Delete walking-with-iphone-x.webp 2020-06-18 18:01:41 +02:00
Woody
6a41123209 Delete macbook-pro-space-gray-on-the-wooden-table.webp 2020-06-18 18:01:34 +02:00
Woody
c895c5c16e add png images 2020-06-18 18:01:22 +02:00
Aircoookie
9ab4b3f3f4 Merge pull request #992 from gegu/master
Usermods: PIR sensor switch, v2 unreachable net services
2020-06-14 21:11:54 +02:00
gegu
b93dd47a01 Changed PIR sensor switch timeout 2020-06-14 13:02:04 +02:00
gegu
69a826f896 Usermods: PIR sensor switch, v2 unreachable net services 2020-06-14 12:54:35 +02:00
Aircoookie
60c7ec5aca Merge pull request #921 from huksley/codegen-html
Automatic UI codegeneration
2020-06-10 18:24:17 +02:00
cschwinne
888eacb574 Minor changes to auto UI code generation
Replace outdated CSS in HTML by style.css import
Fix missing button double press in time settings
FIx missing meta utf-8 in WiFi and UI settings
Modify cdata.js to add an info header to the top of auto-generated files
2020-06-10 12:45:44 +02:00
Woody
4def582ab1 smaller discord banner in readme (#976)
* smaller discord banner

* added dicord link to banner
2020-06-08 22:30:35 +02:00
Ruslan Gainutdinov
ee6f25cc47 Replace repo url and version automatically in HTML 2020-06-08 20:59:40 +03:00
Ruslan Gainutdinov
f5d6383f50 adds support for 9-key remote and intensity/speed repeat actions 2020-06-08 19:54:10 +03:00
Ruslan Gainutdinov
00f00b8198 Merge remote-tracking branch 'origin/master' into codegen-html 2020-06-08 19:43:03 +03:00
Woody
3d1f883465 New readme design (#973)
* nicer readme

- added emojis
- changed the first sentence (information about WS2801)

* added new images

* moved main image

* Delete wled_logo.png

* mail to image

* Some design changes in readme

- added images
- added discord banner
- replaced email with image (protection for spam bots)

* removed mail image

* Delete mail.png

* Added compatible LED Strips table

I added this, because I thought for a long time that WLED doesn't support WS2801.
I didn't read the wiki. And so I think this could be useful for many other people.

* Added emojy for Compatible LED Strips

* compressed images

* Changed path to compressed images

* Delete macbook-pro-space-gray-on-the-wooden-table.jpg

* Delete walking-with-iphone-x.jpg
2020-06-08 10:55:37 +02:00
Aircoookie
8613a89931 Merge pull request #969 from WoodyLetsCode/master
Centered images in readme
2020-06-07 21:47:12 +02:00
Aircoookie
dd1485a66a Merge pull request #970 from steveway/patch-1
v2 based usermod which allows changing color and brightness
2020-06-07 20:41:24 +02:00
Stefan Murawski
4198954d46 Create usermode_rotary_set.h 2020-06-07 19:25:58 +02:00
Woody
e56caa8959 Update readme.md 2020-06-07 14:51:13 +02:00
Woody
de7c72d5a7 Update readme.md 2020-06-07 14:50:25 +02:00
cschwinne
18a4a43f8a Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-06-06 00:57:39 +02:00
cschwinne
70c73d2e0e Lots of new effects! 2020-06-06 00:57:34 +02:00
Aircoookie
2049e8b8df Merge pull request #964 from kareem613/master
adds support for 9-key remote and intensity/speed repeat actions
2020-06-05 14:24:40 +02:00
spiff72
41da889a09 Updated Readme.md file (#965)
* Adding new usermod for TTGO T-DIsplay.

* Finalizing the code

* Modified and cleaned up readme.md file

* Fixes to platformio.ini to restore back to previous state

* Cleaned up comments in usermod file

* Updated readme with clarifications on how to modify the library files.  Saving the platformio.ini file after uncommenting the line to add the TFT_eSPI library should download the necessary library files without needing to build (and fail) first.

* Cleanup

* Readme cleanup

* corrected error in commenting platformio.ini
2020-06-05 14:22:03 +02:00
Kareem Sultan
0a1bbca321 adds support for 9-key remote and intensity/speed repeat actions 2020-06-04 08:24:55 -04:00
spiff72
7e01d113d8 New usermod to support the TTGO T-Display (ESP32 based board with integrated TFT display) (#957)
* Adding new usermod for TTGO T-DIsplay.

* Finalizing the code

* Modified and cleaned up readme.md file

* Fixes to platformio.ini to restore back to previous state

* Cleaned up comments in usermod file
2020-05-30 09:22:31 +02:00
Aircoookie
6e49cc54ac Merge pull request #954 from psi-4ward/feature/esp_rgbww_controller_pins
Add PWN Pins for esp_rgbww_controller
2020-05-29 14:07:57 +02:00
Christoph Wiechert
487a95eb79 Add PWM pins - to use with esp_rgbww_controller
from patrickjahns/pljakobs (https://github.com/pljakobs/esp_rgbww_controller)
2020-05-29 13:51:20 +02:00
cschwinne
696e438df7 Added v2 usermods API 2020-05-28 02:20:02 +02:00
Aircoookie
a4e093159e Merge pull request #941 from gegu/master
Usermod: fix unreachable network services
2020-05-24 19:34:28 +02:00
gegu
23986579bb Usermod: fix unreachable network services 2020-05-24 10:07:00 +02:00
cschwinne
0fc099926f Fixed TPM2 2020-05-23 16:09:49 +02:00
cschwinne
06b9b66272 Added TPM2 protocol support via Serial (#933) 2020-05-22 23:30:55 +02:00
cschwinne
fec8343f45 Added TPM2.NET protocol support 2020-05-18 16:36:31 +02:00
Ruslan Gainutdinov
2d8f2593f0 Remove hardcoded IP address if any 2020-05-17 23:22:42 +03:00
Ruslan Gainutdinov
ab0a03a420 Sync htm and fix js errors 2020-05-17 22:39:57 +03:00
Ruslan Gainutdinov
3ef30a42be Fix settings sync page JS 2020-05-17 22:18:23 +03:00
Ruslan Gainutdinov
034687163f Fix dynamic replacements for other pages 2020-05-17 21:59:00 +03:00
Ruslan Gainutdinov
190db80c28 Automatic UI codegeneration 2020-05-17 21:14:56 +03:00
Aircoookie
579f355852 Merge pull request #910 from Aircoookie/merge-dmx-proxy
Merge dmx proxy
2020-05-11 12:08:35 +02:00
cschwinne
d9104433a8 Remove proxy setting from sync settings file 2020-05-11 12:07:33 +02:00
Aircoookie
c6059f9bf6 Merge pull request #858 from pille/travis_all_features
travis: add own build targets that enable all features
2020-05-11 11:58:52 +02:00
cschwinne
fd06ff08c7 Move DMX proxy setting from sync to DMX settings 2020-05-11 11:51:11 +02:00
Aircoookie
afd990bd71 Merge pull request #862 from pille/DMX-proxy
implement DMX proxy mode via MAX485
2020-05-11 11:40:11 +02:00
cschwinne
8333c4b48d Travis environment selection in platformio.ini 2020-05-11 11:18:07 +02:00
Aircoookie
30c4f501fc Merge pull request #591 from tpmodding/patch-1
WS2801 Color Order Fix
2020-05-11 10:57:54 +02:00
Aircoookie
3b96eef2ad Merge branch 'master' into travis_all_features 2020-05-11 10:57:32 +02:00
Aircoookie
a769ab6cff Merge branch 'master' into patch-1 2020-05-11 10:46:18 +02:00
cschwinne
ef1f835e57 Update to Espalexa v2.4.6
(+1.6kB free heap memory)
-   Added `m5atom` PlatformIO environment
2020-05-10 23:58:50 +02:00
cschwinne
329b2ba275 Fixed Preset Slot 16 always indicating as empty (fixes #891) 2020-05-09 00:29:42 +02:00
Aircoookie
98383ef19b Merge pull request #898 from 8none1/master
Add new mode "Solid Glitter".
2020-05-08 23:10:16 +02:00
cschwinne
8bb70fb1b0 Filesystem Tests 2020-05-08 22:53:59 +02:00
Will Cooke
72cca365e5 Add new mode "Solid Glitter".
Gives a solid, static background colour as selected from the colour picker and overlays "glitter" (as per Rainbow Glitter, only without the rainbow).
2020-05-06 14:28:16 +01:00
cschwinne
dfc99faea8 First preset progress 2020-05-05 09:01:09 +02:00
cschwinne
71886c162b Release of WLED v0.10.0
DMX Single RGW and Single DRGB modes now support an additional white channel
Improved palettes derived from set colors and changed their names
2020-05-03 20:57:53 +02:00
cschwinne
df1f516f6b Added ACST and ACST/ACDT timezones ( closes #881 ) 2020-05-03 01:48:23 +02:00
cschwinne
2e55189d59 New web UI features 2020-05-02 01:59:41 +02:00
srg74
6ade40ce85 Updated Wemos shield usermod (#880)
* Added support for H803FW controller

* Create usermod_bme280.cpp

* Create usermod_bme280.cpp

* Added BME280 sensor

* Update readme.md

* Update usermod_bme280.cpp

* Update platformio.ini

* Update for lightweight sensor
2020-04-30 23:40:14 +02:00
cschwinne
94c5f0d7a8 New API properties
-   Added realtime override option and `lor` JSON property
-   Added `lm` (live mode) and `lip` (live IP) properties to info in JSON API
-   Added reset commands to APIs
-   Added `json/si`, returning state and info, but no FX or Palette lists
-   Added rollover detection to millis(). Can track uptimes longer than 49 days
-   Attempted to fix Wifi issues with Unifi brand APs
2020-04-30 01:52:36 +02:00
pille
69a2ac8de1 Merge branch 'master' into travis_all_features 2020-04-25 20:01:03 +02:00
Aircoookie
b1028086a3 Merge pull request #870 from pille/cleanup-segment-options
cleanup code to use descriptive segment options
2020-04-25 14:37:26 +02:00
pille
385b3570b2 cleanup code to use descriptive segment options 2020-04-24 23:35:39 +02:00
cschwinne
77edd12030 Added brightness and power for individual segments ( #289 , #290 ) 2020-04-23 23:52:33 +02:00
Aircoookie
217fca31e4 Merge pull request #865 from o0shojo0o/master
Add DIY PCB SHOJO_PCB (analog)
2020-04-23 00:31:05 +02:00
Dennis Hinzpeter
5e1d20fc72 Add DIY PCB SHOJO_PCB analog 2020-04-22 23:09:21 +02:00
cschwinne
db60309ce8 Added Candle Multi effect
Added Palette capability to Pacifica effect
2020-04-22 00:51:00 +02:00
pille
8bfae2fa74 implement DMX proxy mode via MAX485
output a configurable universe (E1.31 or ArtNet) via MAX485 module that connects its DI to D4 on d1_mini.
as this function competes with DMX output for the same hardware, the universe to proxy acts as a switch.
0       = DMX OUTPUT (of configured WLED LEDs, which is the classic behaviour)
1-63999 = DMX PROXY  (selected universe, ArtNet is limited up to 32768)
2020-04-21 22:56:14 +02:00
pille
2788dd1ada travis: add own build targets that enable all features 2020-04-20 13:26:09 +02:00
cschwinne
6a5b757a24 TM1814 support (closes #518 ) 2020-04-19 13:25:27 +02:00
Aircoookie
a19098a004 Merge pull request #835 from martament/f-bw-lt11
Added support for BW-LT11
2020-04-16 23:44:41 +02:00
srg74
ec10c29aca Added BME280 sensor (#850)
* Added support for H803FW controller

* Create usermod_bme280.cpp

* Create usermod_bme280.cpp

* Added BME280 sensor

* Update readme.md

* Update usermod_bme280.cpp
2020-04-15 23:52:10 +02:00
cschwinne
f90ab46794 Add rotary encoder brightness usermod 2020-04-15 01:21:07 +02:00
srg74
b8ca97e019 Added support for H803FW controller (#844) 2020-04-14 00:16:06 +02:00
cschwinne
e12757dbb9 Add Art-Net support (#417) 2020-04-13 00:42:27 +02:00
Ament Martin
3e9b44d193 Added support for BW-LT11 2020-04-10 21:33:16 +02:00
Aircoookie
3006d25406 Merge pull request #809 from raresserban/dmx_settings
DMX: Ability to work together with LEDs and set segment and start LED for fixtures
2020-04-10 12:52:22 +02:00
Aircoookie
f2ae9a0711 Merge branch 'master' into dmx_settings 2020-04-10 12:36:02 +02:00
cschwinne
19945e4ccb Fix DMX compilation 2020-04-10 12:30:08 +02:00
Aircoookie
61ab16acd6 Merge pull request #830 from srg74/patch-1
Update readme.md
2020-04-09 17:04:35 +02:00
srg74
3a84292f82 Update readme.md 2020-04-09 09:06:44 -04:00
Aircoookie
1d314294c7 Merge pull request #828 from srg74/master
Update user mode directories
2020-04-08 16:25:28 +02:00
Bukovina
b5b1dbfe85 Fix platformio.ini 2020-04-08 09:30:49 -04:00
Bukovina
5be88dd188 QuinLED mod update 2020-04-08 09:18:26 -04:00
Bukovina
88b67b9541 Usermod changes 2020-04-08 08:40:44 -04:00
Bukovina
a31da3186f UserMod files update 2020-04-08 08:35:32 -04:00
Bukovina
9a7a38e913 Merge branch 'Aircoookie-master' 2020-04-08 07:28:35 -04:00
Bukovina
a0960f5468 Merge branch 'master' of https://github.com/Aircoookie/WLED into Aircoookie-master 2020-04-08 07:20:33 -04:00
Aircoookie
9b87a512cf Merge pull request #827 from Aircoookie/refactor-cpp
Project structure refactor to .cpp/.h
2020-04-07 00:14:57 +02:00
cschwinne
8da985b6d0 Fixed RBG and BGR getPixelColor (#825)
Improved formatting
2020-04-07 00:04:09 +02:00
cschwinne
5cb2a39746 Consolidated global variables in wled.h 2020-04-06 02:25:17 +02:00
cschwinne
6268cadc95 Function definitions in func_declare.h
Significantly reducing number of header files
2020-03-31 02:38:08 +02:00
Aircoookie
470b4b3972 Merge pull request #814 from TravisDean/refactor-remove-ino
Refactor to remove ino usage
2020-03-31 02:33:38 +02:00
Travis Dean
a88ae2ca56 Delete .clang-format 2020-03-30 08:48:01 -04:00
Travis J Dean
9875fbef0a Layout changes. 2020-03-30 08:34:20 -04:00
Travis J Dean
cf29ddc8d0 Typo fix. 2020-03-30 08:03:55 -04:00
Travis J Dean
ad70fcba7f Typo fix. 2020-03-30 08:00:58 -04:00
Travis J Dean
a9a7720a11 Import dmx output library into project. 2020-03-30 07:45:33 -04:00
Travis J Dean
8ff4f50f79 Fix visual studio project files and organize. 2020-03-30 07:24:45 -04:00
Travis J Dean
aea07f42d1 Fix mistaken substitute. 2020-03-30 06:56:51 -04:00
Travis J Dean
8d75c06852 Format changes. 2020-03-30 06:42:21 -04:00
Travis J Dean
ffbedbc1e6 Add clang format to git ignore. 2020-03-30 06:27:36 -04:00
Travis J Dean
a47d48c973 Add clang format. 2020-03-30 05:19:09 -04:00
Travis J Dean
c54092c932 Remove redundant defines. 2020-03-30 05:04:20 -04:00
Travis J Dean
9134c3b4af Merge branch 'master' into refactor-remove-ino 2020-03-30 04:51:56 -04:00
Travis J Dean
7e21955211 wledInit -> setup 2020-03-30 04:43:37 -04:00
Travis J Dean
40ac760285 Move getSignalQuality to json.cpp 2020-03-30 04:41:42 -04:00
Travis J Dean
de63bdac39 Code reorg. 2020-03-30 04:35:52 -04:00
Travis J Dean
408d63825a Function prototype cleanup. 2020-03-30 04:26:41 -04:00
Travis J Dean
3e1eb02f54 Comment cleanup and line reduction. 2020-03-30 04:21:47 -04:00
Travis J Dean
d2f55e1064 Make dmx.h header only. 2020-03-30 03:55:44 -04:00
srg74
c97bead631 Merge pull request #65 from Aircoookie/master
Update
2020-03-28 17:33:57 -04:00
Aircoookie
8264ca4e9e Create stale.yml (to reduce older open issues) 2020-03-28 21:30:32 +01:00
Aircoookie
05bdaa4bc7 Merge pull request #808 from feindsender/P9813
Add P9813 LED driver support
2020-03-28 21:22:08 +01:00
Travis J Dean
cc2de04f6b Avoid name collision. 2020-03-28 09:24:07 -04:00
Travis J Dean
f99f13a090 Avoid name collision. Fix wled instance access in ino. 2020-03-28 08:45:20 -04:00
Travis J Dean
f35ab125ec Rename files to remove wled_ 2020-03-28 08:30:51 -04:00
Travis J Dean
b8342f1c9c actually call the setup function. 2020-03-28 07:32:02 -04:00
Rares Serban
0ce77bbc59 Add ability to set DMX fixtures to a segment and from what LED they should start. 2020-03-28 13:13:39 +02:00
srg74
e39eccb99e Merge pull request #64 from Aircoookie/master
update
2020-03-27 18:28:50 -04:00
feindsender
77ce67d685 Add P9813 LED driver support
Adds support for the P9813 LED driver
2020-03-27 10:03:23 +01:00
cschwinne
ef125ff109 Fixed compilation for Analog LEDs
Fixed sync settings network port fields too small
2020-03-26 19:43:23 +01:00
Travis J Dean
30e3bbd0e8 Renamed min/max macros to fix potential std::min/max conflict (depending on include order). 2020-03-26 05:18:19 -04:00
Travis J Dean
7bf1c35dcf Change interface of BlynkSimpleEsp. 2020-03-26 04:56:19 -04:00
Travis J Dean
c6ea2dff8a Add further includes. 2020-03-26 04:49:35 -04:00
Travis J Dean
f2329476ec Fix linker errors. All global vars declared extern. 2020-03-26 04:12:55 -04:00
cschwinne
c4512b75d9 Fixed live preview not displaying whole light if over 255 LEDs 2020-03-26 01:44:38 +01:00
srg74
92e43abbc4 Merge pull request #63 from Aircoookie/master
Updates
2020-03-25 16:58:17 -04:00
cschwinne
07d6bfa989 Added Pacifica effect (closes #790) 2020-03-25 11:17:45 +01:00
Travis J Dean
ccf5e66f31 Compiles, but does not link. 2020-03-25 05:43:12 -04:00
Travis J Dean
6f5e71164a Further fixing of includes. 2020-03-25 05:14:23 -04:00
Travis J Dean
12131764d1 Prior to refactoring includes and forward definitions. 2020-03-25 04:36:55 -04:00
Travis J Dean
594c0b8550 Transform ino to h/cpp. Class WLED created. 2020-03-25 04:00:55 -04:00
cschwinne
ed729c32d2 Fixed Alexa whites 2020-03-25 00:59:48 +01:00
srg74
ea26ee8d40 Merge pull request #62 from Aircoookie/master
Update
2020-03-22 22:38:23 -04:00
cschwinne
53f09c0630 Moved Cronixie driver from FX library to drawOverlay handler 2020-03-22 17:45:09 +01:00
Aircoookie
2856e02eac Merge pull request #787 from stockklauser/master
Fix a code Issue for non DMX usage and Adaopt Project structure to Visual Studio
2020-03-22 16:21:36 +01:00
Thomas Stockklauser
a4f0c9195e 1. Fix an Issue withtin the DMX Compiler Flags if you dont use it in wled00.ino
2. Fix the Build / working environment for Visual Studio and make a better Folder Structure within the Visual Studio Project
2020-03-22 11:38:29 +01:00
srg74
0e73a0293b Merge pull request #61 from Aircoookie/master
Update
2020-03-20 22:29:33 -04:00
cschwinne
f4f5d6e562 Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-03-21 00:57:58 +01:00
cschwinne
e5c3629e2e Added custom per-LED mapping 2020-03-21 00:57:54 +01:00
Aircoookie
5028471598 Merge pull request #784 from TravisDean/fix-skip-first
Fix initialization bug when toggling skip first.
2020-03-19 19:18:16 +01:00
Travis J Dean
c28027496d Fix initialization bug when toggling skip first. 2020-03-19 00:37:35 -04:00
srg74
c0f5509652 Merge pull request #60 from Aircoookie/master
Add on
2020-03-16 16:27:00 -04:00
Aircoookie
9bc48ececa Merge pull request #774 from hobbyquaker/battery-keypad-controller
add battery-keypad-controller usermod
2020-03-15 22:11:51 +01:00
srg74
1f53e4d4a2 Merge pull request #59 from Aircoookie/master
Various small fixes
2020-03-15 11:06:31 -04:00
hobbyquaker
dbef0e6583 fix lint issues 2020-03-15 12:43:09 +01:00
hobbyquaker
c246e5af35 add battery-keypad-controller usermod 2020-03-15 12:38:49 +01:00
cschwinne
d36796429e Various small fixes
Fixed color of main segment returned in JSON API during transition not being target color
- Fixed arlsLock() being called after pixels set in E1.31, (closes #772)
- Fixed HTTP API calls not having an effect if no segment selected (now applies to main segment)
2020-03-14 11:28:42 +01:00
srg74
37a31a9b94 Update platformio.ini 2020-03-13 20:44:05 -04:00
srg74
c2ab3f96a7 gitignore update 2020-03-13 20:42:15 -04:00
srg74
ef36b5377d Merge pull request #58 from Aircoookie/master
Update
2020-03-13 18:44:41 -04:00
Aircoookie
f12237d298 Merge pull request #769 from mike2nl/patch-1
CHANGELOG.md - Make it more readable
2020-03-13 09:51:38 +01:00
Mike
5b312d4c8b Make it better readable
Make it better readable and make use of single line for add/chgange and/or delete
2020-03-13 08:04:55 +01:00
Aircoookie
d21e82b020 Create changelog 2020-03-12 23:26:38 +01:00
srg74
c6e5606b4c Merge pull request #57 from Aircoookie/master
Update
2020-03-10 19:20:40 -04:00
Aircoookie
7b4dc43147 Merge pull request #766 from pille/E1.31-sequencenumber-per-universe
fixes #742
2020-03-10 23:02:38 +01:00
pille
62510ac6a3 add E1.31 packet out-of-sequence config option, wrt #742 2020-03-10 18:28:51 +01:00
pille
bffe2d7bd0 track E1.31 seqcuence numbers for each universe individually, wrt #742 2020-03-10 17:33:23 +01:00
srg74
cbaf1e576d Merge pull request #56 from Aircoookie/master
Usermod: Project Cars rpm indicator and shift lights (#759)
2020-03-06 21:25:30 -05:00
jwingefeld
0d355dbf35 Usermod: Project Cars rpm indicator and shift lights (#759)
* project cars shiftlight usermod

* added readme

* rephrased stuff in readme.md because reasons

Co-authored-by: Jan <jan.wingefeld@gmail.com>
2020-03-06 23:45:45 +01:00
srg74
d851bff762 Merge pull request #54 from Aircoookie/master
Trying to fix failed build (#756)
2020-03-05 17:14:15 -05:00
Aircoookie
453f4b549b Trying to fix failed build (#756) 2020-03-05 09:39:43 +01:00
srg74
8d669b12b6 Truing to fix failed build 2020-03-04 23:15:12 -05:00
srg74
ed3234d949 Update UserMod
Updating UserMod as per request from discourse forum user. He want to use with ESP32 also as QuinLED board support to types - ESP8266 ans ESP32.
Removed .txt file as it create an extra step in setup.
2020-03-04 23:01:00 -05:00
srg74
603a00376f Merge pull request #53 from Aircoookie/master
Add custom32_LEDPIN_16 environment (from #748 )
2020-03-04 20:31:56 -05:00
cschwinne
4f34cfb654 Add custom32_LEDPIN_16 environment (from #748 ) 2020-03-04 11:45:25 +01:00
srg74
fd1e536cdb Merge pull request #52 from Aircoookie/master
Update
2020-03-03 17:47:19 -05:00
cschwinne
0c6a880a74 Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-03-03 17:53:51 +01:00
cschwinne
89fa053310 Add "np" API option to not commit
Re-add IRremote flags to platformio.ini
2020-03-03 17:53:47 +01:00
Def3nder
267887908e New IRremote functions (#746)
* Switch to strip.getPaletteCount()

* fixed color conversion errors

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2020-03-02 13:31:34 +01:00
Def3nder
b86f58befe IR remotes can disable NightLight with "OFF" (#745)
* IR can disable Nightlight with "OFF"
2020-03-02 12:41:14 +01:00
Def3nder
b804101c24 lift NeoPixelBus library to 2.5.7 (#747) 2020-03-02 12:24:10 +01:00
Def3nder
f28502514f Remember lastColor and last Bri for Solid RGBW (#743) 2020-03-01 12:25:44 +01:00
cschwinne
79da716a44 Split esp01_1m env into 1m_full and 1m_ota (closes #740 ) 2020-02-29 19:52:47 +01:00
srg74
f76a440b74 Merge pull request #51 from Aircoookie/master
Update
2020-02-29 13:39:36 -05:00
cschwinne
18dad0c72c Remove defunct presetApplyCol and presetApplyFx 2020-02-29 18:42:55 +01:00
cschwinne
14a5ab6740 Fixed Chase modes 2020-02-29 18:24:51 +01:00
Def3nder
d0d56c4416 Travis.CI builds only for default_envs (#739) 2020-02-29 16:30:15 +01:00
srg74
9dd9a01211 Merge pull request #50 from Aircoookie/master
Update
2020-02-28 16:42:15 -05:00
Def3nder
480e7f5b54 Add all release environments to platformio.ini (#736) 2020-02-28 18:53:38 +01:00
Def3nder
cffee7bfa7 Fix 24-key IR remote (#738) 2020-02-28 16:27:18 +01:00
srg74
5b9eda9c63 Merge pull request #49 from Aircoookie/master
Update
2020-02-27 14:34:55 -05:00
Aircoookie
0a363d5fc0 Merge pull request #732 from Jason2866/patch-1
Reduce CPU load during interrupt handler
2020-02-27 18:56:54 +01:00
Jason2866
9eb646085e Reduce CPU load during interrupt handler
See https://github.com/esp8266/Arduino/pull/7057#issuecomment-591632232
2020-02-27 09:52:48 +01:00
Ser Ko
e3269f6edc Update wled06_usermod.ino 2020-02-26 20:36:27 -05:00
Ser Ko
57d3120b45 Grammar correction 2020-02-26 19:21:57 -05:00
Ser Ko
81da8261a0 Added board heltec_wifi_kit_8 2020-02-26 19:16:33 -05:00
srg74
7e5949b4a9 Merge pull request #46 from Aircoookie/master
Refactor platformio.ini (#721)
2020-02-26 19:01:27 -05:00
Def3nder
a776b8ac31 Refactor platformio.ini (#721)
* Override script updated accordingly

* ldscriipt for 1m0 adjusted

* backup files deleted

* deletion of wled00,ino.cpp

* remove travis build from PIO
2020-02-26 11:17:56 +01:00
srg74
14e19226ea Merge pull request #43 from Aircoookie/master
Update
2020-02-25 16:30:04 -05:00
Aircoookie
5473b3e42e Merge pull request #719 from zewelor/use_new_platformio_ldscript_syntax
Use new platformio ldscript syntax
2020-02-25 09:00:09 +01:00
zewelor
143179cac9 Use new platformio ldscript syntax 2020-02-25 08:42:28 +01:00
srg74
ad2c7ee363 Merge pull request #40 from Aircoookie/master
Update
2020-02-24 21:21:20 -05:00
cschwinne
755448f9f5 Fix LED pin changed 2020-02-25 02:25:17 +01:00
cschwinne
f304a6891f Free more than 2kB of RAM
Store Palettes in PROGMEM
F() select long and rarely used strings
Refactor hue error
2020-02-25 02:19:12 +01:00
srg74
1221661ae3 Added Heltec WiFi-Kit-8 to UserMod (#717) 2020-02-24 22:51:11 +01:00
srg74
a78f17abec Update readme.md 2020-02-24 16:48:01 -05:00
srg74
70bf957a8a Added Heltec WiFi-Kit-8 2020-02-24 16:44:56 -05:00
Ser Ko
e8e04db7b4 Merge branch 'master' of https://github.com/srg74/WLED 2020-02-24 16:39:37 -05:00
Ser Ko
d5def30c59 Update wled06_usermod.ino 2020-02-24 16:36:03 -05:00
srg74
81176bc4e6 Merge pull request #39 from Aircoookie/master
Indents for the #ifdef's in wled00.ino (#716)
2020-02-24 16:32:34 -05:00
Def3nder
730ba12c8d Indents for the #ifdef's in wled00.ino (#716) 2020-02-24 22:09:33 +01:00
srg74
80ad456d48 Merge pull request #38 from Aircoookie/master
Update
2020-02-24 15:23:35 -05:00
cschwinne
2d75526395 Fix brightness transition updating too often 2020-02-24 19:36:25 +01:00
Aircoookie
cd618a43d4 Merge pull request #714 from zewelor/allow_platformio_ini_overrides
Allow platformio ini overrides
2020-02-24 19:11:46 +01:00
Aircoookie
1979236f3a Merge pull request #715 from zewelor/allow_to_override_some_const
Allow to override some costs
2020-02-24 19:10:37 +01:00
cschwinne
3589adcb78 Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-02-24 19:08:35 +01:00
cschwinne
4a834ecfc8 Fix UTC offset not working 2020-02-24 19:08:29 +01:00
zewelor
3dcc3492e8 Allow to override some costs 2020-02-24 18:48:21 +01:00
Def3nder
2e77dcc660 Correct sun rise (#713) 2020-02-24 17:27:59 +01:00
cschwinne
89f60a0422 Refactor colorUpdated() 2020-02-24 17:25:40 +01:00
zewelor
0455c09e4c Allow platformio ini overrides 2020-02-24 16:42:24 +01:00
cschwinne
7360b882ac DMX settings only when enabled 2020-02-24 12:54:23 +01:00
cschwinne
5ffd29e31a Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-02-24 12:45:47 +01:00
cschwinne
5d7e892464 Different PIO settings 2020-02-24 12:44:41 +01:00
Def3nder
e8fd5de5b2 HTML API "/url" for the current effect settings (#664) 2020-02-24 12:18:30 +01:00
srg74
a8e7aa99e8 Update wled06_usermod.ino 2020-02-23 22:48:58 -05:00
srg74
9a0db83f83 Added Heltec WiFi-Kit-8 with 0.91" display 2020-02-23 21:03:36 -05:00
srg74
4e85566b88 Merge pull request #37 from Aircoookie/master
Update
2020-02-23 20:53:18 -05:00
jwingefeld
8be72f6f23 DMX Support for WLED (#704)
* initial dmx setup

* adds support for multiple fixtures, addr gaps, start addresses and all that good DMX stuff

* removes init function. do not need.

* adds some comments, removes others. words.

* added menu entry and dummy HTML

* added server request handler

* cloned options page UI for DMX

* only add code when DMX is enabled

* added infobutton to HTML

* DMX settings form

* procedurally generated HTML form. OBACHT: Values still not coming from the EEPROM.

* upped eeprom version to 15

* changed index for set to 255 to 6 because web interface wants it that way

* gets values for XML from actual settings

* changes the default values for dmx to blanks

* reads and writes DMX settings from EEPROM (2550 - 2569)

* fixes addressing bug in DMX EEPROM read

* saves settings from WebUI to memory

* disables DMX by default

* changed a comment in the ENABLE_DMX line

* makes the display of the DMX entry in settings dependant on WLED_DMX_ENABLE

* adds the server listener for the DMX map

* fixes a bug when selecting 255 for a channel at the dmx settings page

* now actually reads the DMX settings back to the HTML UI.

* cleans up a little

* adds a warning message to the HTML UI when setting up defunct DMX settings

* changed DMX EEPROM addressing to close a gap

* basic DMX map

* fixes a few styling flaws and bugs in the DMX map

* changes config variables to uint16_t

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2020-02-23 22:24:51 +01:00
Def3nder
513bc2c0ab Correct SunRise/NightLight with Color Fade (#710) 2020-02-23 22:21:32 +01:00
srg74
036ba77a68 Merge pull request #35 from Aircoookie/master
Release of WLED v0.9.1
2020-02-22 22:06:30 -05:00
cschwinne
392277100c Release of WLED v0.9.1 2020-02-23 02:18:25 +01:00
srg74
a7092ac503 Merge pull request #33 from Aircoookie/master
Update from orig
2020-02-22 17:38:00 -05:00
Aircoookie
027a16a39b Merge pull request #705 from pille/E1.31-fix-OOS
fix out-of-sync detection on E1.31 packets
2020-02-22 19:13:34 +01:00
pille
c66af86d88 fix out-of-sync detection on E1.31 packets 2020-02-22 18:13:21 +01:00
Def3nder
e621fdec0c Remove analog flicker (#678)
* remove analog LED flicker

run SetRgbwPwm from main loop and with GetPixelColor(0) to get all effects using fade_out() working.

* correct unintended bitwise AND to logical AND

* Update analogLastShow

* new Arduino Core WaveForm library included

* new Arduino Core only for 8266

* correct formating + define for MQTT_KEEP_ALIVE

* fix for ESP32

* reduce scope of variable "done"

* call analogWrite only if Color or Bri did change

* Remove duplicate wifi sleep code

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2020-02-22 17:20:34 +01:00
Debashish Sahu
447594b5ea PIO cleanup and ESP8266/32 core bump (#699)
* Try to fix TravisCI

* Bump ESP8266/ESP32 core version

Co-authored-by: Aircoookie <cschwinne@gmail.com>
2020-02-22 16:19:05 +01:00
srg74
a0b208cca0 Added new user mod for Wemos shield (#701) 2020-02-22 16:18:18 +01:00
Def3nder
1a4061fdb5 Refactor callMode (#702) 2020-02-22 16:17:32 +01:00
srg74
fb59f1f0a0 Update wled06_usermod.ino 2020-02-21 16:55:58 -05:00
srg74
b1961033b3 Update readme.md 2020-02-20 22:48:20 -05:00
srg74
863498f762 Update readme.md 2020-02-20 22:43:59 -05:00
srg74
bdc44a4070 Update readme.md 2020-02-20 20:53:17 -05:00
srg74
6451522f89 Update readme.md 2020-02-20 20:50:38 -05:00
srg74
5ca1e9268c Update readme.md 2020-02-20 20:49:33 -05:00
srg74
451a6841c9 Update readme.md 2020-02-20 20:48:25 -05:00
Ser Ko
3e3f46a683 Added new mod 2020-02-20 20:46:00 -05:00
srg74
2b0eaafea6 Merge pull request #29 from Aircoookie/master
Update
2020-02-20 14:40:58 -05:00
cschwinne
c1a8fde9a0 Add wifi sleep toggle (implements #672 ) 2020-02-20 17:08:56 +01:00
srg74
9dbd1b2a1b Updated wled06_usermod.ino (#698) 2020-02-20 11:43:17 +01:00
srg74
0cc1007543 Merge pull request #28 from Aircoookie/master
Update
2020-02-19 19:29:53 -05:00
Ser Ko
8ca86181e4 Updated wled06_usermod.ino
User mode file updated for flip display in case of using on WLED Wemos shield
2020-02-19 19:27:09 -05:00
cschwinne
8759d8f868 Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-02-20 00:45:14 +01:00
cschwinne
65a32b4166 Added new auto white modes (related to #573 ) 2020-02-20 00:45:09 +01:00
Aircoookie
933a0cddf8 Merge pull request #697 from huggy-d1/patch-2
Update readme.md
2020-02-19 20:54:16 +01:00
huggy-d1
d4c0542c84 Update readme.md
Minor spelling change
2020-02-19 13:24:56 -05:00
cschwinne
05f5aaaeca Refactoring 2020-02-19 15:53:42 +01:00
srg74
036bd07e72 Merge pull request #27 from Aircoookie/master
Update
2020-02-18 19:46:45 -05:00
fishbone-git
cb0452964e bidirectional running lights effect 2020-02-18 21:28:46 +01:00
fishbone-git
9c3e7b9ec0 allow intensity slider to adjust eye spacing (#681) 2020-02-18 20:52:12 +01:00
cschwinne
1fd0383f69 Various improvements
UI Quick color selectors
UI PC mode
Different Heartbeat effect
PoliceAll improvements
Clarified sync settings
2020-02-18 18:52:47 +01:00
Aircoookie
9e62db5237 Update html with PC mode 2020-02-18 14:22:20 +01:00
Aircoookie
3062786bb3 Corrected effect mode count 2020-02-17 18:02:14 +01:00
Aircoookie
b42847c135 Fix compilation 2020-02-17 11:12:39 +01:00
Def3nder
5befcd24b5 Effect "Heartbeat" (#680) 2020-02-17 11:01:05 +01:00
Aircoookie
61f3002568 Merge pull request #683 from fishbone-git/ripple_rainbow
water ripple effect with a dimmed rainbow background
2020-02-17 10:32:30 +01:00
fishbone-git
0b7e0e166c pio workaround for pio4.2.0 (#688) 2020-02-17 10:18:36 +01:00
cschwinne
3b52770a1b Fix segments when reverse 2020-02-16 17:34:28 +01:00
fishbone-git
d0b9f53d8c water ripple effect with a dimmed rainbow background 2020-02-15 20:07:15 +01:00
Aircoookie
92a9d7d26a Attempt to fix travis 2020-02-15 16:42:05 +01:00
Aircoookie
ffd958a1b3 Quick color selectors 2020-02-15 16:18:06 +01:00
Aircoookie
a7e9c7e24b Merge pull request #682 from fishbone-git/multicomet
port multi-comet to use the memory allocation method
2020-02-15 16:02:56 +01:00
fishbone-git
9839cc6386 port multi-comet to use the memory allocation method 2020-02-15 14:42:09 +01:00
srg74
8d66d38fd2 Merge pull request #26 from Aircoookie/master
Simplify Code for Gradient / Loading effect (#671)
2020-02-11 21:43:22 -05:00
Def3nder
a004d1647d Simplify Code for Gradient / Loading effect (#671) 2020-02-11 22:43:15 +01:00
srg74
21fe2c5f8f Merge pull request #24 from Aircoookie/master
Update
2020-02-09 17:36:06 -05:00
cschwinne
867e43637c Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-02-09 23:22:27 +01:00
srg74
c9025917b2 Merge pull request #23 from Aircoookie/master
Update
2020-02-09 14:24:45 -05:00
Aircoookie
258def854c Merge pull request #665 from pille/DMX-refactoring
DMX refactoring
2020-02-09 19:49:15 +01:00
cschwinne
e8481818c8 Small adjustments to new DMX options 2020-02-09 19:10:29 +01:00
cschwinne
f646e9bc59 Swap order of API parsing to make it possible to override preset brightness 2020-02-09 16:11:38 +01:00
srg74
680923bdd5 Merge pull request #22 from Aircoookie/master
Update
2020-02-09 08:57:15 -05:00
cschwinne
17e43a7ff2 No phy mode for ESP32 2020-02-09 11:04:30 +01:00
Def3nder
71a5cfed4b Intensity slider for "Police" and "Two Dots" (#670)
Enable intensity slider for the Effects based on "police_base"

the intensity slider controls the width of the "dot" from 1 pixel (as now) to 64 pixels.
2020-02-09 10:36:37 +01:00
cschwinne
c055477d3b Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-02-09 10:35:37 +01:00
cschwinne
ad4acca17a Minor adjustments 2020-02-09 10:35:32 +01:00
Def3nder
37b84300b4 Fix Chase Random effect (#669) 2020-02-09 10:33:26 +01:00
pille
d9a8dac266 expose refactoring to webUI:
add client stats
  add DMX settings (this increases EEPROM layout version)
2020-02-08 20:52:45 +01:00
pille
76f704b060 implement different DMX modes for E1.31:
DISABLED: don't act on packets
  SINGLE_RGB: treat all LEDs the same and controll them using 3 channels: RGB
  SINGLE_DRGB: as above, but has an additional first channel for Dimmer
  EFFECT: not a realtime mode. disables fadeTransition to reduce delay. just exposes parameters as 11 channels to trigger effects locally: Dimmer Effect Speed Intensity Palette PriRed PriGreen PriBlue SecRed SecGreen SecBlue
  MULTIPLE_RGB: legacy mode. address each LED individually with 3 channels: RGB.
  MULTIPLE_DRGB as above, but has an additional first channel for master Dimmer

add client stats (IP + user agent)
add support for DMX address (so you don't need a whole universe per fixture)
skip out-of-order packets
2020-02-08 20:38:28 +01:00
srg74
cde360f7ec Merge pull request #21 from Aircoookie/master
Update
2020-02-05 20:13:49 -05:00
Def3nder
d69a2f1514 Fix Chase Effects at high speeds + "Two Dots" Effect at low speeds (#659) 2020-02-06 01:37:47 +01:00
Def3nder
06a5c1a798 Percent Effect from both ends of the strip (#660)
from 0 to 100 the strip will get color(0) starting at the ESP, from 200 to 100 to strip will do it the other way around.

So, when using this effect for the staircase usermod, a person entering area near the ESP would set an intensity starting with 1 and getting bigger and leaving on the other side would need to further increase the intensity until 200. then the strip has color(1) again.
2020-02-06 01:36:01 +01:00
srg74
ca1f25ecf6 Pin order correction (#662) 2020-02-06 01:33:55 +01:00
Ser Ko
adcd7fb170 Added tested display sizes 2020-02-05 12:25:26 -05:00
Ser Ko
f105436b41 Corrected comment
Since 2 common size of OLED display can be used (0.91" and 0.96") removed comment about display size
2020-02-05 12:23:06 -05:00
Ser Ko
47738c751c Update wled06_usermod.ino
Controller design changed. New version with relay. Dallas sensor pin changed to GPIO 13.
2020-02-05 12:03:24 -05:00
srg74
0b3f2da6ef Merge pull request #20 from Aircoookie/master
Update
2020-02-04 15:59:06 -05:00
Aircoookie
fa7092cc17 Fix discourse badge 2020-02-04 17:46:43 +01:00
Aircoookie
773d6e002c Add discourse to readme 2020-02-04 17:43:46 +01:00
Aircoookie
b78d1baaaf Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-02-01 00:36:07 +01:00
Aircoookie
50ff59239c Segment grouping HTML support 2020-02-01 00:36:00 +01:00
srg74
8f36878dde Merge pull request #19 from Aircoookie/master
Update
2020-01-30 15:32:47 -05:00
Def3nder
a29e98fd41 Correct start of Lighthouse effect at high speeds (#643) 2020-01-29 23:20:32 +01:00
Def3nder
e4d5551f16 Correction for "Percent with speed" (#642)
The speed slider defines the "size" of pixels that will be added or substracted each refresh. If this size is bigger than the last value and you quickly move the intensity slider to zero, then the effect shows 100% all the time until it will be changed.
2020-01-29 23:10:02 +01:00
srg74
e610a1ffe4 Merge pull request #18 from Aircoookie/master
Update
2020-01-28 22:43:03 -05:00
Aircoookie
ac927d188b Merge pull request #640 from fishbone-git/settings
non-required HUE settings
2020-01-29 02:21:56 +01:00
fishbone-git
bbf2f6c7de non-required HUE settings 2020-01-28 20:47:37 +01:00
Aircoookie
398816dbeb Merge pull request #625 from stringandstickytape/IR6_Support_2
Add IR codes for 6-key learning remote https://www.aliexpress.com/ite…
2020-01-28 13:49:41 +01:00
Def3nder
f3b399b31f Fix Police All, Sinelon and Lighthouse (Comet) effects (#634) 2020-01-28 13:48:59 +01:00
Def3nder
2b0a38d25d Percent Effect with speed-slider (#637) 2020-01-28 13:47:18 +01:00
cschwinne
b41dacb6c0 FIx ESP32 compilation 2020-01-28 00:45:29 +01:00
cschwinne
c5f5532303 Bump version ID 2020-01-28 00:03:29 +01:00
cschwinne
09485c995e Merge branch 'master' of https://github.com/Aircoookie/WLED 2020-01-27 00:45:33 +01:00
cschwinne
dc936b63d6 Various fixes 2020-01-27 00:45:30 +01:00
srg74
b5213794a8 Merge pull request #17 from Aircoookie/master
update
2020-01-26 08:51:46 -05:00
Max Hedge
2f8365a790 Fix consecutive break statement. 2020-01-25 16:53:37 +00:00
Max Hedge
47be430bc1 Add IR codes for 6-key learning remote https://www.aliexpress.com/item/4000307837886.html
This cheap remote has the advantage of being more powerful (longer range) than cheap credit-card remotes

"CH" controls brightness, "VOL +" controls effect, "VOL -" controls colour/palette, "MUTE" sets bright plain white.
2020-01-25 16:46:10 +00:00
Aircoookie
918da24c8d Merge pull request #624 from axlan/user-relay
Added usermod for controlling a relay
2020-01-25 10:41:28 +01:00
Jonathan Diamond
0e82f2a02f Added usermod for controlling a relay 2020-01-24 15:39:04 -08:00
srg74
447f15cfa4 Merge pull request #16 from Aircoookie/master
Update from original
2020-01-24 17:24:22 -05:00
srg74
8f80c206e7 Platformio upcoming change (#623) 2020-01-24 23:18:27 +01:00
Def3nder
e1a61985a2 Plasma effect correction (#619) 2020-01-24 23:17:29 +01:00
Def3nder
16ad0c22f0 IRremote correction (preset load) (#618) 2020-01-24 23:15:57 +01:00
srg74
3d0d027216 Update platformio.ini 2020-01-24 16:52:41 -05:00
srg74
b58a17a99e Display size is irrelevant 2020-01-20 15:28:39 -05:00
srg74
adaf2e15cd Merge pull request #15 from Aircoookie/master
Update to usermod Enclosure_with_OLED_temp_ESP07 (#607)
2020-01-20 14:52:21 -05:00
srg74
1723683370 Update to usermod Enclosure_with_OLED_temp_ESP07 (#607) 2020-01-20 18:26:52 +01:00
srg74
9cd0a7982a Merge pull request #14 from Aircoookie/master
Re-add NEC decoder (closes #608)
2020-01-20 11:59:56 -05:00
cschwinne
d2726aae90 Re-add NEC decoder (closes #608) 2020-01-20 11:44:19 +01:00
srg74
607a66b983 Update readme.md 2020-01-19 18:54:48 -05:00
srg74
38b2adcaad Fixed wled06_usermod.ino
And added link to readme.md
2020-01-19 18:53:11 -05:00
srg74
d7879d8853 Merge pull request #13 from Aircoookie/master
Update
2020-01-19 11:59:13 -05:00
Aircoookie
2d5b09a16f Merge pull request #604 from recliq/fx_percent
Added percent display effect.
2020-01-19 16:01:48 +01:00
Aircoookie
a06a722c23 Merge pull request #603 from recliq/ir21_key
added support for 21-key remote
2020-01-19 15:53:31 +01:00
cschwinne
d9d45f86cb Fix PIO 2020-01-19 15:20:40 +01:00
recliq
e49b9cff67 Added percent display effect. 2020-01-19 13:51:49 +01:00
recliq
8c69a4cb7a added support for 21-key remote 2020-01-19 12:53:44 +01:00
srg74
1042ac141a Delete main.yml 2020-01-18 20:27:35 -05:00
srg74
81aab35231 Create main.yml 2020-01-18 20:22:44 -05:00
srg74
1c5742c7d4 Delete ccpp.yml 2020-01-18 20:04:15 -05:00
srg74
4d646e67f3 Create ccpp.yml 2020-01-18 20:03:18 -05:00
srg74
59fbc51283 Merge pull request #12 from Aircoookie/master
Update
2020-01-18 19:42:28 -05:00
cschwinne
125e21900a Added new HTTP API commands (resolves #597) 2020-01-19 01:07:38 +01:00
cschwinne
569efd3e45 Staircase reverse wipe 2020-01-19 00:50:26 +01:00
Def3nder
6c557ec015 Plasma effect (#600) 2020-01-19 00:06:17 +01:00
srg74
63b917eb07 Added usermod for esp-07s based controller (#602) 2020-01-18 23:59:27 +01:00
srg74
71af63dfc7 Update readme.md 2020-01-18 17:45:11 -05:00
srg74
0cae048ada Update readme.md 2020-01-18 17:40:52 -05:00
Ser Ko
71021da261 Update readme.md 2020-01-18 17:36:04 -05:00
Ser Ko
1d897e491a Update readme.md 2020-01-18 17:31:36 -05:00
Ser Ko
57c0b408e5 Update readme.md 2020-01-18 17:26:06 -05:00
Ser Ko
43e0186efe Update readme.md 2020-01-18 16:46:48 -05:00
srg74
8831d74cbc Update readme.md 2020-01-18 16:29:28 -05:00
srg74
9a9d2cb964 Update readme.md 2020-01-18 16:17:45 -05:00
srg74
2fc2a0cbdb Update readme.md 2020-01-18 16:16:51 -05:00
srg74
40c041c9e7 Update readme.md 2020-01-18 16:15:37 -05:00
srg74
b00c1dd055 Update readme.md 2020-01-18 16:14:32 -05:00
srg74
761245049f Update readme.md 2020-01-18 16:10:03 -05:00
srg74
30e142edd3 Update readme.md 2020-01-18 16:09:39 -05:00
srg74
b7d84c002d Add files via upload 2020-01-18 16:08:49 -05:00
srg74
551afe0cd7 Add files via upload 2020-01-18 16:08:14 -05:00
srg74
5d8bfc2930 Create readme.md 2020-01-18 16:07:27 -05:00
srg74
5d947cc8e1 Create readme.md 2020-01-18 16:06:26 -05:00
srg74
7bf92db4c9 Delete Enclosure_with_OLED_temp_ESP07 2020-01-18 16:05:49 -05:00
srg74
593c1d6b05 Create Enclosure_with_OLED_temp_ESP07 2020-01-18 16:01:31 -05:00
srg74
30e326b8b8 Merge pull request #11 from Aircoookie/master
Update
2020-01-15 16:20:06 -05:00
cschwinne
cf60eb52d8 Fix LED settings always displaying WS2815 2020-01-15 00:38:25 +01:00
Aircoookie
8850dac291 Merge pull request #587 from stringandstickytape/master
Add WS2815 brightness limiter power model, using "magic value" of 255mA.
2020-01-14 23:55:07 +01:00
srg74
bed52d0a4a Merge pull request #9 from Aircoookie/master
Sync with orig
2020-01-14 16:23:08 -05:00
cschwinne
10e564eeea Remove start from Drip 2020-01-14 19:12:23 +01:00
Aircoookie
ae47c4c79a Merge pull request #438 from spitsw/groupfinal
Grouping and Spacing
2020-01-14 16:21:21 +01:00
Serhan
8048bb85fb Update NpbWrapper.h
Fixes the WS2801 Color Order
2020-01-14 15:58:14 +01:00
cschwinne
e99e9fed11 Remove unneccessary null checks 2020-01-14 11:46:21 +01:00
Aircoookie
79e9dbb9c6 Merge branch 'master' into groupfinal 2020-01-14 11:12:33 +01:00
cschwinne
081a6888fa Remove G and S options (only segment properties now) 2020-01-14 10:59:57 +01:00
cschwinne
ae6ba79f1e Grouping and Spacing 2020-01-14 10:57:23 +01:00
srg74
d9d2ad4382 Merge pull request #7 from Aircoookie/master
Sync to parent
2020-01-13 15:31:01 -05:00
Max Hedge
31d277ffa2 Don't display "for most effects..." information for WS2815. 2020-01-13 17:30:10 +00:00
Def3nder
7fe5f8907e FX intensity slider to desaturate Color in Colorloop FX (#585) 2020-01-13 18:29:34 +01:00
cschwinne
2e9b59e2e0 Update readme 2020-01-13 18:24:23 +01:00
cschwinne
5188894301 Fix LPD8806 2020-01-13 18:23:06 +01:00
Max Hedge
4c16efbbf7 Ignore white component on WS2815 power calculation 2020-01-13 17:18:21 +00:00
Max Hedge
8055243909 Remove unintended platformio.ini change. 2020-01-13 17:16:39 +00:00
Max Hedge
2eb4383e03 Fix bug in WS2815 power calculation. 2020-01-13 17:14:40 +00:00
Max Hedge
bafd043aae Add WS2815 brightness limiter. Uses "magic value" of 255mA. 2020-01-13 17:09:20 +00:00
srg74
3379e7cc48 Merge pull request #6 from Aircoookie/master
Update to recent
2020-01-12 10:08:50 -05:00
cschwinne
d971fc440f Support WS2801 and LPD8806 (closes #178) 2020-01-12 15:16:45 +01:00
fishbone-git
31658f4eab Drip (water_torture) effect (#583) 2020-01-12 15:04:49 +01:00
srg74
339be2b7a4 Merge pull request #5 from Aircoookie/master
Add staircase wipe usermod
2020-01-10 20:08:23 -05:00
cschwinne
3e716e429f Add staircase wipe usermod 2020-01-11 00:26:43 +01:00
srg74
a8a61665f4 Merge pull request #4 from Aircoookie/master
Include new branch of IRremoteESP8266 to save 21k (#582)
2020-01-10 17:48:45 -05:00
Def3nder
a7a1002509 Include new branch of IRremoteESP8266 to save 21k (#582)
This saves 21024 bytes of program space
2020-01-10 21:12:23 +01:00
srg74
65154e48cb Merge pull request #3 from Aircoookie/master
Update to recent
2020-01-08 17:06:52 -05:00
Aircoookie
32c10e5ae8 Merge pull request #571 from Def3nder/SunRiseFading
SunRise using NightLight Fade
2020-01-08 19:25:05 +01:00
Aircoookie
61ee1c6ff3 Merge pull request #574 from Def3nder/ESP32IRsupport
ESP32 support for IR remotes
2020-01-08 19:13:28 +01:00
Def3nder
6642d96688 ESP32 support for IR remotes
uses library v2.7.2
2020-01-08 18:07:48 +01:00
Def3nder
df8b085f0e SunRise using NightLight Fade
changed WLED08_led.ino to fade from current color to the secondary color. This can be used without effecting the current logic with setting "NF=2" in a macro or through the API.

If a red color tone is chosen as primary and a yellow/white tone as secondary color, 
the actual brightness is set to 5 and the target brightness to 255,
the duration is set to 10 minutes,
this will create a smooth fade from darkest red to a bright warm light (like in a real SunRise)
2020-01-08 12:00:25 +01:00
Aircoookie
7a415ccdfc Merge pull request #569 from Def3nder/IRremotes
More IR remotes (24/40/44-keys) and select them in the settings
2020-01-08 11:01:12 +01:00
Def3nder
2a432dc6ee Corrected OR function in IF statement
from '|'  to  '||'
2020-01-08 10:35:42 +01:00
Unknown
322d1f09de More IR remotes (24/40/44-keys) and select them in the settings
added more IR remotes
2020-01-08 00:46:16 +01:00
Aircoookie
44f4bd6e62 Merge pull request #568 from Def3nder/ESP32solidRGB
ESP32 support for solid (analog) RGB(W) stripes
2020-01-08 00:20:41 +01:00
Unknown
2bb74233cc ESP32 support for solid (analog) RGB(W) stripes uses ledc funtion to drive analog RGB(W) stripes with 3, 4 or 5 channels.
uses ledc funtion to drive analog RGB(W) stripes with 3, 4 or 5 channels.

the define in platformio.ini needs to be "WLED_USE_ANALOG_LEDS"
2020-01-07 23:58:15 +01:00
srg74
19f6fd2295 Merge pull request #2 from Aircoookie/master
Update repository
2020-01-06 21:01:36 -05:00
cschwinne
558811e4f9 Update to Espalexa v2.4.4 2020-01-07 01:02:52 +01:00
Aircoookie
ed560a338e Merge pull request #560 from srg74/master
OLED contrast set to 10
2020-01-06 19:39:39 +01:00
srg74
74741682bf OLED contrast set to 10
Another OLED lifetime saving feature. With set to 10 is bright enough to see all labels, even more readable on cheap OLEDs.
2020-01-06 12:41:03 -05:00
Aircoookie
d32d4e21e9 Merge pull request #550 from srg74/master
ESP-07 module support
2020-01-06 01:30:05 +01:00
cschwinne
78f301d503 Removed verbose option from travis 2020-01-06 01:21:16 +01:00
cschwinne
318ffc821c Re-add accidentally reverted Frametime fixes 2020-01-06 01:06:02 +01:00
cschwinne
ef4ec16860 Add RSSI to info (#434) 2020-01-06 00:43:15 +01:00
Aircoookie
6bc927c535 Merge branch 'master' into groupfinal 2020-01-05 22:30:27 +01:00
Aircoookie
2fe2b3c975 Merge pull request #443 from fishbone-git/master
add bouncing balls effect
2020-01-05 21:38:24 +01:00
cschwinne
e4ad0d3b59 Improved bouncing balls 2020-01-05 21:26:14 +01:00
srg74
750261d205 Turn off display after 5 min.
Better shut off display after few minutes to preserve display life time.
2020-01-05 14:47:31 -05:00
srg74
df1b25f381 Added ESP8266 ESP-07 module with external antenna
Added 2 library dependency for temperature sensor
2020-01-03 23:46:00 -05:00
Aircoookie
4af7ccd84c Merge branch 'master' into master 2020-01-03 23:19:40 +01:00
Aircoookie
4282053f68 Merge pull request #524 from fishbone-git/1d-fireworks
1d fireworks
2020-01-03 23:09:24 +01:00
cschwinne
5c7d993dbe Numerous improvements to 1D FW 2020-01-03 22:56:56 +01:00
cschwinne
cdef7a53a4 Fireworks 1D working 2020-01-03 17:47:06 +01:00
Aircoookie
b1f26d4ebe Merge branch 'master' into 1d-fireworks 2020-01-03 12:58:31 +01:00
cschwinne
9bf534288c Removed pixel locking 2020-01-02 22:10:59 +01:00
cschwinne
3d359229cf Reworked effects to use data instead of locked 2020-01-02 20:41:15 +01:00
cschwinne
8013f8d5b3 Update year 2020-01-02 02:12:10 +01:00
srg74
cf12ab4b74 Merge pull request #1 from Aircoookie/master
Update to recent version
2019-12-31 21:27:27 -05:00
Aircoookie
0f3eecaa8a Merge pull request #540 from srg74/patch-3
Update readme.txt
2020-01-01 02:57:18 +01:00
srg74
22c1f4bb4e Update readme.txt
Minor editing
2019-12-31 19:53:25 -05:00
Aircoookie
43c5fea782 Merge pull request #527 from fishbone-git/starburst
add multi fireworks starburst effect
2020-01-01 01:17:59 +01:00
Aircoookie
41eab27f20 Merge pull request #538 from srg74/patch-1
Update wled06_usermod.ino
2020-01-01 01:14:01 +01:00
Aircoookie
ba354f68d1 Merge pull request #539 from srg74/patch-2
Update platformio.ini
2020-01-01 01:13:38 +01:00
cschwinne
a6c7cc7b41 Merge branch 'starburst' of https://github.com/fishbone-git/WLED into starburst 2020-01-01 01:06:48 +01:00
cschwinne
4dfc1631af Few Cronixie fixes 2020-01-01 01:04:54 +01:00
srg74
58861fa524 Update platformio.ini
Added commented library reference for OLED display
2019-12-31 17:57:15 -05:00
srg74
1c6b1c530f Update wled06_usermod.ino
Corrected pin numbering
2019-12-31 17:52:59 -05:00
cschwinne
21b498fece Memory optimizations 2019-12-31 19:01:37 +01:00
cschwinne
446e2c123f More improvements 2019-12-31 16:37:44 +01:00
fishbone-git
b3a7ee633d Merge branch 'starburst' of https://github.com/fishbone-git/WLED into starburst 2019-12-31 13:47:34 +01:00
fishbone-git
8b6366688a minor updates for cleanup 2019-12-31 13:47:17 +01:00
cschwinne
1671c78260 First working state 2019-12-31 12:35:18 +01:00
Aircoookie
96ca459df8 Merge branch 'master' into starburst 2019-12-31 11:13:40 +01:00
cschwinne
51fb981d24 Add possiblilty for segments to dynamically allocate memory 2019-12-31 11:11:05 +01:00
cschwinne
2ef46195d3 Merge branch 'master' of https://github.com/Aircoookie/WLED 2019-12-30 17:34:22 +01:00
cschwinne
6e35b5ba8b Fix analog write range 2019-12-30 17:34:15 +01:00
Aircoookie
b8ea0bd1ff Merge pull request #516 from fishbone-git/framerate
Last of the FrameTime fixes from me
2019-12-30 01:51:52 +01:00
cschwinne
8ca6ca2c88 TriWipe synced 2019-12-30 01:40:38 +01:00
cschwinne
508804d0d5 Few fixes for tricolor wipe 2019-12-30 01:18:19 +01:00
fishbone-git
eb251050a5 fix exploding firworks controls to match the slider direction to the effect 2019-12-30 00:22:28 +01:00
fishbone-git
67758b4980 rework sinelon, bouncing, popcorn to remove some unnecessary statics 2019-12-30 00:20:05 +01:00
fishbone-git
f187d7258b rework for slightly better visuals 2019-12-30 00:08:49 +01:00
fishbone-git
5efd1f3a91 add comment for source and description 2019-12-30 00:04:56 +01:00
fishbone-git
e3def22b07 add multi fireworks starburst effect 2019-12-28 15:43:55 +01:00
fishbone-git
ce5839ce27 remove debug message 2019-12-27 22:20:34 +01:00
fishbone-git
50082043ef add exploding fireworks 2019-12-27 20:58:06 +01:00
fishbone-git
012045878d theatre rainbow too fast with a double-step 2019-12-24 21:05:20 +01:00
fishbone-git
3083ccddcc rework of new effects, sync to FRAMETIME add options for sinelon 2019-12-24 20:41:03 +01:00
fishbone-git
f39b9041a0 remove test 2019-12-24 15:22:40 +01:00
fishbone-git
37827cdd6c another manual merge 2019-12-24 15:20:38 +01:00
fishbone-git
58f41a1f9b manual merge #2 2019-12-24 15:12:54 +01:00
fishbone-git
7712faca0a manual merge 2019-12-24 15:11:04 +01:00
fishbone-git
805fe1d47e Revert "more effects to FRAMETIME"
This reverts commit f3371c443e.
2019-12-24 15:05:12 +01:00
fishbone-git
0d4d1eff94 Revert "Merge branch 'master' into framerate"
This reverts commit 38cc460358, reversing
changes made to 8600360173.
2019-12-24 14:58:22 +01:00
fishbone-git
38cc460358 Merge branch 'master' into framerate 2019-12-24 14:51:33 +01:00
fishbone-git
8600360173 more effects to FRAMETIME 2019-12-24 14:50:35 +01:00
fishbone-git
f3371c443e more effects to FRAMETIME 2019-12-24 14:46:07 +01:00
fishbone-git
a86f750473 Merge remote-tracking branch 'upstream/master' 2019-12-24 01:09:00 +01:00
Aircoookie
92b532ce9a Merge pull request #510 from fishbone-git/framerate
Sizing for scan and dual_scan
2019-12-24 00:53:46 +01:00
cschwinne
924f97cbe8 Improvements to scan and segment fixes 2019-12-24 00:48:51 +01:00
cschwinne
8817dc6d73 Add tertiary color to presets (#509) 2019-12-24 00:06:23 +01:00
fishbone-git
7324d59e08 Merge branch 'master' of https://github.com/Aircoookie/WLED 2019-12-23 23:24:10 +01:00
fishbone-git
dcd8e9250f Merge branch 'master' of https://github.com/Aircoookie/WLED into framerate 2019-12-23 23:08:25 +01:00
fishbone-git
f07578e0cb add sizing to scan mode 2019-12-23 22:49:29 +01:00
Aircoookie
cabcf8b7b2 Merge pull request #344 from ericyanush/tz-sask
Add support for Saskatchewan Timezone
2019-12-23 21:03:04 +01:00
cschwinne
a90a07f46d Put new timezone to end of list 2019-12-23 20:54:00 +01:00
Aircoookie
9839bab8dc Merge pull request #507 from fishbone-git/framerate
More framerate conversions, etc
2019-12-23 20:47:40 +01:00
Aircoookie
b9dd3de63b Merge branch 'master' into framerate 2019-12-23 20:07:32 +01:00
cschwinne
194aa90aee Noise 4 fix 2019-12-23 19:28:37 +01:00
fishbone-git
9bc72df1b5 meteor with framerate 2019-12-23 19:23:57 +01:00
fishbone-git
b2439ca0af Merge branch 'master' of https://github.com/Aircoookie/WLED into framerate 2019-12-23 19:06:49 +01:00
fishbone-git
70d04d807b cleanup 2019-12-23 18:48:01 +01:00
fishbone-git
2372675c79 combine larson scanners 2019-12-23 18:38:54 +01:00
cschwinne
cb66900575 More effects using FRAMETIME 2019-12-23 13:06:14 +01:00
Aircoookie
de4be44728 Merge pull request #502 from gwaland/oled-work
modify /usermods/ssd1306_i2c_oled_u8g2/ to be slightly more robust.
2019-12-22 23:56:03 +01:00
fishbone-git
21dc037848 Merge branch 'master' of https://github.com/Aircoookie/WLED 2019-12-22 17:55:40 +01:00
fishbone-git
9fe5e69503 Merge branch 'master' of https://github.com/Aircoookie/WLED into framerate 2019-12-22 17:47:28 +01:00
fishbone-git
c0ac381f6f rework effects to frametime 2019-12-22 17:41:32 +01:00
Bobby Walker
5f235c121d correction form ifdef to if defined 2019-12-21 18:59:12 -06:00
Bobby Walker
6b8e9a63f3 define to make knownSsid compatible with esp32 2019-12-21 18:53:37 -06:00
Bobby Walker
3dcda08735 Corrected ip and ssid to be knownIp and knownSsid 2019-12-21 18:50:33 -06:00
Bobby Walker
f92ee8e762 Break out SDA and SCL pins into defines. 2019-12-21 18:49:25 -06:00
cschwinne
94200dd3a4 Fixed effects (#466) 2019-12-21 03:17:54 +01:00
Aircoookie
512c4dd6f1 Merge pull request #487 from Aircoookie/pr/481
Add Analog/Solid RGB(W) strip support
2019-12-20 00:07:12 +01:00
cschwinne
6d43854557 Fix PIO 2019-12-19 23:43:18 +01:00
cschwinne
112ba7ac5c Fix compile for analog 2019-12-19 21:31:14 +01:00
cschwinne
4c58929dd4 Fix compile 2019-12-19 21:08:21 +01:00
Aircoookie
2188509d2c Merge branch 'master' into solidRgbwLedStrips 2019-12-19 20:59:36 +01:00
Def3nder
263ef14822 bracket error 2019-12-18 15:41:13 +01:00
Def3nder
ed24f72cf9 Changes for 4CH and 5CH LED stripes
ESP32 fixes for Solid RGBW (...not implemented for ESP32 yet)

Use 5CH solid RGB stripes

adapt the logic to use CW and WW for different CT-values

change from Opt-out to Opt-In for analog LEDs

Added new boards

Alexa color changes to match white values with 4Ch and 5Ch LED stripes
bracket error


Device definitions
2019-12-18 15:35:32 +01:00
Def3nder
c1197d06fe Changes for 4CH and 5CH LED stripes
ESP32 fixes for Solid RGBW (...not implemented for ESP32 yet)

Use 5CH solid RGB stripes

adapt the logic to use CW and WW for different CT-values

change from Opt-out to Opt-In for analog LEDs

Added new boards

Alexa color changes to match white values with 4Ch and 5Ch LED stripes
2019-12-18 13:35:05 +01:00
cschwinne
bd4d1cdd41 Fix preset cycle 2019-12-18 00:47:24 +01:00
cschwinne
2c70d66d4a Fix TypeError (#453) 2019-12-18 00:41:45 +01:00
fishbone-git
97ecace40e Merge remote-tracking branch 'upstream/master' 2019-12-17 12:07:50 +01:00
cschwinne
6ef988549d Fix compile
facepalm
2019-12-13 14:16:42 +01:00
cschwinne
9088d79390 Add tertiary color to sync (#451) 2019-12-13 14:14:36 +01:00
cschwinne
0c9bcb2445 Update readme 2019-12-13 01:31:48 +01:00
cschwinne
c98c54bd6b Release of WLED v0.9.0-b1
Timebase reset when turned off
Added Aurora paletta
2019-12-13 01:23:07 +01:00
fishbone-git
225e66a522 Merge remote-tracking branch 'upstream/master' 2019-12-12 20:59:31 +01:00
Aircoookie
f1810a9784 Merge pull request #449 from ohminy/patch-1
Create wled06_usermod.ino
2019-12-12 18:10:27 +01:00
ohminy
9526051766 Create wled06_usermod.ino
Using rotary encoder, control effect or brightness
2019-12-12 23:01:13 +09:00
Aircoookie
bd435b175b Merge pull request #445 from spitsw/mstr
Closes Aircoookie/WLED#444
2019-12-12 00:19:44 +01:00
Warren Spits
42ab734256 Closes Aircoookie/WLED#444 2019-12-11 22:08:59 +11:00
cschwinne
77d89e7df3 Fix iOS scrolling
Other small adjustments
Allow for passwords with * as 1st char
2019-12-11 00:59:15 +01:00
fishbone-git
c1dec16c50 add popcorn effect 2019-12-10 20:34:59 +01:00
fishbone-git
86ae11f4c4 add sinelon effect 2019-12-10 20:26:02 +01:00
fishbone-git
7ca1970fff add bouncing balls effect 2019-12-10 20:06:00 +01:00
Warren Spits
b1cbbeb935 Segment reverse fix 2019-12-10 11:34:11 +11:00
Warren Spits
2dce4462a0 Saving and loading of grouping and spacing. 2019-12-09 23:16:16 +11:00
Warren Spits
55e2bc27c6 Converted segments to use lengths.Segment stop is now derived.Clears the skipped pixels.Fixed getPixelColor. 2019-12-08 23:17:42 +11:00
Warren Spits
2c3cad6e61 Pixel grouping support, configurable through JSON API. It probably breaks cronixie. 2019-12-07 23:25:38 +11:00
cschwinne
6122a8371a Added Glitter and Candle effects 2019-12-06 01:44:45 +01:00
cschwinne
4ffeb05120 Fix #418 and #420 2019-12-05 11:07:54 +01:00
cschwinne
310f55abb6 Merge branch 'master' of https://github.com/Aircoookie/WLED 2019-12-05 01:58:12 +01:00
cschwinne
d6c0642a02 Add new UI! 2019-12-05 01:58:03 +01:00
Aircoookie
541556874f Merge pull request #413 from dkneisz/master
Added Arduino Core 2.6.1 and 2.6.2 and made 2.6.2 default
2019-12-05 01:56:06 +01:00
Dave
477d7080b8 Added Arduino Core 2.6.1 and 2.6.2 and made 2.6.2 as default
2.4.2 was default and caused a boot loops on NodeMCU for me. Even erasing and re-flashing didn't solve the problem. With core 2.6.2 it seems to be fine.
2019-12-04 19:12:16 +01:00
cschwinne
173c752d62 Added spots and two dots effects 2019-12-04 12:15:12 +01:00
cschwinne
3b70488828 NTP server settable
Added segment commands to HTTP api
Removed HA autodiscovery
2019-12-04 02:01:47 +01:00
cschwinne
334783f89a Preset 16 working 2019-12-03 14:15:12 +01:00
cschwinne
89a54e31f1 Cleanup and segment improvements 2019-12-02 12:41:35 +01:00
cschwinne
354d18f78e Main segment changes 2019-12-01 01:42:52 +01:00
cschwinne
0e8806eb2b Integrated liveview 2019-11-30 19:17:25 +01:00
cschwinne
731550acb3 Fixed reverse 2019-11-30 11:46:31 +01:00
Aircoookie
be4019b4d3 Merge pull request #400 from ironosity/disable_n_leds_for_all_fx
Adding new setting to disable fixed number of LED
2019-11-30 11:20:53 +01:00
cschwinne
70ffcd9adf Merge branch 'master' of https://github.com/Aircoookie/WLED 2019-11-30 11:17:43 +01:00
cschwinne
bbe511dd15 Attempting to fix disconnect on Adalight (ESP32, #194) 2019-11-30 11:17:37 +01:00
Aircoookie
82d5ac91d7 Merge pull request #402 from 400killer/patch-3
Create wled00.txt
2019-11-30 00:33:18 +01:00
Aircoookie
54de0eab6a Merge pull request #401 from 400killer/patch-2
wled06_usermod.ino
2019-11-30 00:32:46 +01:00
400killer
4d5bb274d1 Create wled00.txt
Definitions needed for reading the Dallas temp sensor used on the QuinLED boards.
2019-11-29 11:58:40 -08:00
400killer
131fae57e5 wled06_usermod.ino
This section is used to read the temperature from the sensor and prints it using the MQTT service started by Aircoookie.
2019-11-29 11:55:26 -08:00
emerrill
37da53c20e fixing some spacing 2019-11-29 12:25:30 -07:00
Aircoookie
6ad57a15cf Merge pull request #399 from 400killer/patch-1
Create readme.txt
2019-11-29 19:02:02 +01:00
emerrill
4729bce16c Merge branch 'master' of github.com:Aircoookie/WLED into disable_n_leds_for_all_fx
 Conflicts:
	wled00/data/settings_leds.htm
2019-11-29 10:56:59 -07:00
emerrill
0b5ac7a139 Adding ability to turn off specified number of LEDs. Added to LED settings.
Also added FX for Tri Color Static, defaults tri to white.
2019-11-29 10:53:01 -07:00
400killer
677e23ad14 Create readme.txt 2019-11-29 08:52:51 -08:00
Aircoookie
6d838e3043 Merge pull request #397 from mrVanboy/ib/usermod-oled
usermods: Add SSD1306 display with u8g2
2019-11-28 22:53:56 +01:00
Ivan Boyarkin
f322abceb8 usermods: Add SSD1306 display with u8g2
This commit adds example of usermod file for displaying basic
infromation SSD1306 I2C OLED displya utilizing u8g2 library.

Related to:
https://github.com/Aircoookie/WLED/issues/389
2019-11-28 22:43:46 +01:00
cschwinne
e754d21598 Raise max universes to 9 2019-11-28 20:13:52 +01:00
Aircoookie
0fdd861ef1 Merge pull request #391 from badbadc0ffee/adalight
rewrite adalight parser
2019-11-28 19:50:40 +01:00
cschwinne
2e5f6a3507 Improved adalight show() handling 2019-11-28 19:25:04 +01:00
Aircoookie
4e57cab0fa Merge pull request #395 from spitsw/gamma
Converted UTF-16 files with UTF-8 and CR/LF to LF.
2019-11-28 09:32:22 +01:00
Warren Spits
9930c8f94d Converted UTF-16 files with UTF-8 and CR/LF to LF. 2019-11-28 08:28:13 +11:00
Florian Moesch
f8e262b87e rewrite adalight parser 2019-11-26 21:47:55 +01:00
cschwinne
896bdaf124 Create usermods folder (#389) 2019-11-26 21:21:54 +01:00
cschwinne
2e4f2639a3 Fix #388 2019-11-26 20:41:15 +01:00
Aircoookie
ce89a92d0d Merge pull request #368 from stockklauser/master
Fix Visual Studio Project Structure and add 3 new Effects
2019-11-25 01:34:34 +01:00
cschwinne
1d9d1f6bbd Simplified police code 2019-11-25 01:20:03 +01:00
cschwinne
767b57fc01 Add "psave" field to state JSON 2019-11-25 00:20:00 +01:00
thomas.stockklauser
9e00177d76 - Fix the Visual Studio Project Structure with the e131 lib change to async
- Add 3 New Effects: Police, Police All, Multi Dynamic
2019-11-22 19:19:48 +01:00
Aircoookie
095429a7df Merge pull request #364 from debsahu/patch-1
fix #361
2019-11-21 15:26:29 +01:00
cschwinne
983efd61fb Only connect with static IP if GW is configured (#362) 2019-11-21 15:20:15 +01:00
Debashish Sahu
e028316308 fix #361 2019-11-21 09:02:12 -05:00
Aircoookie
e1354accb8 Merge pull request #363 from TheZoker/fix-espasyncudp-version
Pin ESPAsyncUDP version to avoid unexpected behavior
2019-11-21 14:47:47 +01:00
Florian Gareis
ea726f928d Pin ESPAsyncUDP version to avoid unexpected behavior 2019-11-21 14:01:45 +01:00
cschwinne
6b419dbfc0 Fix PIO (#92) 2019-11-20 00:47:43 +01:00
Aircoookie
006a9eaf44 Merge pull request #356 from nwestwind/patch-1
Update readme.txt
2019-11-19 12:35:40 +01:00
Noah
76117854c6 Update readme.txt 2019-11-18 20:27:45 -08:00
cschwinne
6eae6db46b Migrate to ESPAsyncE131 2019-11-18 20:43:27 +01:00
cschwinne
3aacb7150d Added live preview json 2019-11-18 12:29:36 +01:00
cschwinne
81298a1034 Fix string overflow 2019-11-13 01:20:14 +01:00
cschwinne
b3d728df91 Add 12V brightness limiter and configurable per-led current (#295) 2019-11-12 19:33:34 +01:00
Eric Yanush
9a091ff11a Add support for Saskatchewan Time (CST no DST) GMT-6 2019-11-11 18:22:58 -06:00
cschwinne
6989b1730e Added mqtt status topic 2019-11-10 22:13:07 +01:00
cschwinne
1595542d59 Replaced literal URLs in readme 2019-11-10 01:12:38 +01:00
cschwinne
fba9992a10 Updated Espalexa (#274) and readme 2019-11-10 00:54:35 +01:00
Aircoookie
867dce2294 Merge pull request #337 from brentbrooks70/master
Fixed wled00.vcxproj, was broken as of 0.86 WS2812FX filename changes
2019-11-09 22:11:27 +01:00
BrentBrooks70
692554a899 Add files via upload
Updated WS2812FX file names to FX
As of 0.86 this was broken for Visual Micro
2019-11-09 14:28:46 -05:00
cschwinne
f3cc616e07 Fix reverse on segments with start > 0 2019-11-08 16:58:23 +01:00
Def3nder
d1c289b709 Add Solid (analog) RGBW strip support
add 4 ESP pins for driving analog/non-addressable RGBW LED strips
2019-11-05 15:52:18 +01:00
cschwinne
e7a0874a57 Improved theater effect 2019-11-03 01:18:02 +01:00
cschwinne
1beb9c4bb8 Added WiFi section to JSON info (#288)
Add tt command to JSON API (#291)
2019-10-29 02:21:23 +01:00
cschwinne
6eef3a9037 Add mac address to mDNS announcement (#305) 2019-10-29 01:30:07 +01:00
cschwinne
ddaaae46a6 Amending missing files in previous commit 2019-10-29 01:19:56 +01:00
cschwinne
4e4773a370 Fix JSON API FX change not sending sync (#283)
Rename duplicate effects (#294)
Add India Standard Time
Fix flash on startup
Fix NTP with lwip2
2019-10-29 01:19:04 +01:00
cschwinne
f4a2ffc5d2 Update platformio.ini 2019-10-26 01:01:16 +02:00
cschwinne
ba1117e10e Release v0.8.6 2019-10-26 00:00:44 +02:00
cschwinne
0cd46f932a Fix 2.4.0 2019-10-25 15:32:09 +02:00
cschwinne
937f404583 Fix ESP32 2019-10-25 11:54:47 +02:00
cschwinne
d13d60d752 New WiFi logic 2019-10-25 00:14:58 +02:00
cschwinne
31e4e7c709 HA discovery wdt reset 2019-10-20 17:38:25 +02:00
cschwinne
0d3a8ce31b Update MQTT library 2019-10-20 12:48:29 +02:00
cschwinne
be185b46a7 Reworked WiFi logic
Remaining issues:
MQTT reconnects too often
WiFI AP doesn't work if searching for STA
2019-10-18 23:47:11 +02:00
cschwinne
90fa5b3b93 Removed onlyAP 2019-10-18 14:06:07 +02:00
cschwinne
733996772b WLED_CONNECTED macro 2019-10-18 13:26:39 +02:00
cschwinne
d4c921ea2e Timebase sync 2019-10-18 12:19:52 +02:00
cschwinne
2852061699 Refactor WS812FX file names 2019-10-07 23:38:21 +02:00
cschwinne
d8859b9f0a Improved running effects 2019-10-07 23:22:56 +02:00
cschwinne
ae1bc96006 More effects use FRAMETIME 2019-10-07 20:17:52 +02:00
cschwinne
f30ffb4413 Improved rainbow effects 2019-10-05 01:56:55 +02:00
cschwinne
273c6467c8 Fix travis (ESP01 too little flash) 2019-10-04 01:38:42 +02:00
cschwinne
846a1d007c Improved fade modes 2019-10-04 01:21:18 +02:00
cschwinne
1dccc8dc78 Improved Color Wipe 2019-10-03 20:57:22 +02:00
cschwinne
e0d67bd057 Improved effects 2019-10-03 16:33:37 +02:00
cschwinne
4b4b93ac04 Added Halloween Eyes effect
Added Twinklecat
2019-10-02 01:17:26 +02:00
Aircoookie
4390aee1e0 Merge pull request #234 from pille/master
fix verison number of current release
2019-09-29 11:20:30 +02:00
pille
4cddb16788 fix verison number of current release 2019-09-28 13:43:57 +02:00
cschwinne
e1179fd8c8 Delete accidentallly included bin 2019-09-26 14:06:50 +02:00
cschwinne
cb77285277 Support APA102 on ESP32 2019-09-26 14:02:58 +02:00
cschwinne
6c9d161950 Fixed transitions and gamma 2019-09-19 21:15:20 +02:00
Aircoookie
40aaac5868 Merge pull request #218 from Aircoookie/captiveportal
Release v0.8.5
2019-09-12 15:30:34 +02:00
cschwinne
e16b69594e Fix PIO 2019-09-12 13:08:07 +02:00
cschwinne
4837bf007a Update welcome page 2019-09-12 12:41:51 +02:00
cschwinne
705fd4dafd Release v0.8.5 2019-09-12 12:40:06 +02:00
cschwinne
a3e28d3c66 First version of captive portal 2019-09-05 22:45:59 +02:00
cschwinne
4a6755c28a Added C9 and Sakura palettes 2019-08-31 01:41:25 +02:00
cschwinne
188fe5dc52 Added TwinkleFOX effect
Added Orangery palette
2019-08-30 15:39:34 +02:00
cschwinne
44a8ae457d Fixed JSON API POST requests
Speed set COOLING for Fire2012 (#208)
2019-08-25 23:52:40 +02:00
cschwinne
92eafcfe1a Fixed crash on opening settings in core 2.5.2 (#168) 2019-08-21 01:18:25 +02:00
Aircoookie
b12b031fdd Merge pull request #202 from timothybrown/mqttauth
MQTT Authentication Support
2019-08-19 23:20:35 +02:00
cschwinne
492ec489a1 Small changes to MQTT auth
Changed mqttPort to uint16 type
Password no longer transmitted to settings page
Chnaged topics and identifiers to last 6 bytes of mac format
Added security warning
2019-08-18 18:14:17 +02:00
Timothy Brown
c57124e876 Added MQTT port field, bumped user, pass and CID to 40 characters 2019-08-17 21:34:47 -04:00
Timothy Brown
95b33c9c34 Tidied up code 2019-08-17 07:26:40 -04:00
Timothy Brown
c6d8b63e54 Added MQTT authentication support 2019-08-17 06:27:06 -04:00
Aircoookie
f0f02c4ea6 Merge pull request #193 from stockklauser/0.8.4_master_extend_VS
Fix Compile Issues with Visual Studio 2017 / Visual Assist Arduino  and Add Visual Studio Project Files
2019-07-24 23:22:01 +02:00
thomas.stockklauser
eb2cb6810a Modify Structure to fix path issues 2019-07-23 18:51:26 +02:00
thomas.stockklauser
b3c090e9ed Add Visual Studio Support and fix a Compile Issue with Visual Assist / Studio 2017 2019-07-23 18:04:26 +02:00
thomas.stockklauser
13366fc9f8 Add Visual Studio Project Structure 2019-07-23 17:59:55 +02:00
thomas.stockklauser
929af7830a Add Visual Studio Project Structure
Fix a compile Issue in wled19_json.ino with Visual Studio / Visual Assist
2019-07-23 17:35:40 +02:00
cschwinne
13062cf0e4 Merge branch 'master' of https://github.com/Aircoookie/WLED.git 2019-06-21 23:14:36 +02:00
cschwinne
b897a8a35f Updated to ArduinoJson v6
Fixed JSON crash on core v2.5.2
2019-06-21 23:12:58 +02:00
cschwinne
117dc5288d Added basic segment support
Updated Espalexa
2019-06-20 14:40:12 +02:00
Aircoookie
4b5a3bd3d5 Revert LEDPIN to 2 2019-05-23 00:33:15 +02:00
cschwinne
b224a67ea7 Refactored WS2812FX variable names 2019-05-22 00:23:09 +02:00
cschwinne
793f919d59 Added MQTT auto reconnect 2019-05-21 18:50:56 +02:00
Aircoookie
315987b2f6 Merge pull request #160 from T-Arens/master
Added support for APA102 LEDs.
2019-05-04 15:54:33 +02:00
Thomas Arens
9b7db548a2 Only disable the button pin if it conflicts with one of the APA102 pins. 2019-05-01 16:52:22 +02:00
Thomas Arens
126b70f781 Added support for APA102 LEDs. Uncomment "#define USE_APA102" in NbpWrapper.h. Connect clock to GPIO 0 and data to GPIO 2. 2019-05-01 03:09:08 +02:00
Aircoookie
0bbff627e2 Merge pull request #152 from YeonV/patch-1
Fixed MQTT color response
2019-04-15 22:37:41 +02:00
Yeon Vinzenz Varapragasam
961d23e2a1 Fixed MQTT color response
Leading zeros are not trimmed on /c topic anymore :)
Before blue: #FF
After blue: #0000FF
2019-04-15 20:43:32 +02:00
cschwinne
b03ff9a48a Updated Espalexa to 2.4.2
Added UDP realtime 255 as keep state until changed
Added "true" and "false" MQTT payloads
2019-04-14 19:31:25 +02:00
cschwinne
3ffb40fafa Fixed HA autodiscovery and MQTT ON 2019-03-27 21:31:59 +01:00
cschwinne
1a3b4ac2ac Fixed meteor FX crashing 2019-03-27 21:06:07 +01:00
cschwinne
794e17442f Release of v0.8.4
Default to LwiP 2 in PIO
Fixed 12hr format time
2019-03-25 23:27:35 +01:00
cschwinne
238d7119e0 Completed HA autodiscovery
Modified platformio.ini
2019-03-24 18:28:36 +01:00
cschwinne
8a929a8348 Added new Homeassistent broadcast logic 2019-03-24 00:49:26 +01:00
cschwinne
cf77153647 Merge branch 'master' of https://github.com/Aircoookie/WLED.git 2019-03-19 12:21:56 +01:00
cschwinne
a2da0b0641 Fixed HTTP API XML response 2019-03-19 12:19:48 +01:00
Aircoookie
73faa13811 Merge pull request #134
Added Homeassistant autodiscovery
2019-03-18 19:56:53 +01:00
cschwinne
1a71872c7b Added flag to enable Homeassistant autodiscovery 2019-03-18 19:54:06 +01:00
Debashish Sahu
62fe7135bd PIO ESP01 fix
- fix core for ESP01, newer cores are too big
2019-03-18 13:30:47 -04:00
Debashish Sahu
078940d29f PIO & TravisCI fix
- fix errors while compiling for PIO and TravisCI
2019-03-18 13:13:04 -04:00
Debashish Sahu
2fafe42c18 HA Light Auto Discovery
- Send HA MQTT Discovery message ~2.4kB based on input by @YeonV from here: https://github.com/Aircoookie/WLED/issues/131
2019-03-18 12:23:39 -04:00
cschwinne
c8a7537157 Added support for SPIFFS
Fixed ESP32
2019-03-16 02:09:37 +01:00
cschwinne
d4bf1cb23d Added button double press macro option
Added toggle (relay) pin
2019-03-13 11:13:03 +01:00
cschwinne
46e4350013 Improved heap usage by 2k 2019-03-11 19:30:49 +01:00
cschwinne
202eb0d854 Fixed /json with ESP core <2.5.0 2019-03-11 17:57:06 +01:00
cschwinne
898702346e Fixed JSON API on bug
Fixed RN=1 not having an effect if default off
2019-03-11 00:20:17 +01:00
cschwinne
b72e6f16ca Small memory improvements 2019-03-09 21:41:23 +01:00
cschwinne
b9c27ed324 Added RD HTTP api call for realtime udp 2019-03-09 14:48:13 +01:00
cschwinne
0166dfe16e Fixed colorwheel 2019-03-07 23:22:52 +01:00
cschwinne
7274541722 Fixed platformio compilation
Added more debug info in serial on boot
2019-03-07 16:36:26 +01:00
cschwinne
709ff7a701 Finished JSON API
Added RV http api call
Fixed CY,PA,PC,PX api calls
Fixed CORS
2019-03-06 21:31:12 +01:00
cschwinne
66c224c954 Added JSON state API 2019-03-06 01:20:38 +01:00
cschwinne
3f9b37aa7f Added /json/state 2019-03-05 10:59:15 +01:00
cschwinne
0377958d8f Updated hue sync to use ArduinoJSON
Fixed brightness when ABL deactivated
2019-03-03 23:27:52 +01:00
cschwinne
cc1cfd70b8 Added ArduinoJSON 2019-03-03 18:05:56 +01:00
cschwinne
bc125ad76c Updated Espalexa to v2.4.0 2019-03-01 17:10:42 +01:00
cschwinne
62a2246448 Included effect and palette lists in LED settings 2019-02-25 22:23:26 +01:00
cschwinne
587cf751d8 Fixed preset loading 2019-02-25 19:14:13 +01:00
cschwinne
600181ed07 Updated platformio.ini 2019-02-22 22:53:39 +01:00
cschwinne
f0e525d2e2 Added relative API calls 2019-02-22 22:53:33 +01:00
cschwinne
f86cdd8cde Added /json/info page 2019-02-21 16:32:15 +01:00
cschwinne
4a4c537a0d Reverted to default LEDPIN 2019-02-21 00:21:35 +01:00
cschwinne
1caaf04dfa Various performance and reliability improvements 2019-02-20 23:44:34 +01:00
cschwinne
b422a80249 Fixed button-caused asyncserver unresponsiveness
Fixed RGBW power calculation
2019-02-20 15:18:04 +01:00
cschwinne
ba19e20833 Added Macro notification option
Removed realtime UI lock
2019-02-19 12:57:50 +01:00
cschwinne
c34ddb2bc3 Initial async hue client 2019-02-18 22:34:21 +01:00
cschwinne
aa315f8472 Switched from PubSubClient to AsyncMqttClient 2019-02-17 19:21:09 +01:00
cschwinne
2af6af2bf0 Added HTTP OTA update via ESPAsyncWebServer 2019-02-17 17:11:10 +01:00
cschwinne
5694ff7c97 Migrated to AsyncWebServer 2019-02-16 00:21:22 +01:00
cschwinne
76f1c689c1 Interim Async Update 2019-02-14 17:25:41 +01:00
cschwinne
a371239172 Fixed mobile UI effect list not loading 2019-02-12 14:50:19 +01:00
cschwinne
4fd904fbcc Merge branch 'master' of https://github.com/Aircoookie/WLED.git 2019-02-12 11:05:00 +01:00
cschwinne
b73a257389 Fixed broadcast IP compilation issue 2019-02-12 11:03:54 +01:00
Aircoookie
9e70d6b3e1 Merge pull request #105 from Aircoookie/development
Release of v0.8.3
2019-02-11 23:53:53 +01:00
cschwinne
9caca37ab1 Release of v0.8.3
Removed initLedsLast
Improved Fireworks
2019-02-11 23:49:04 +01:00
cschwinne
6e76fc0aa7 Added JSON FX + palette lists 2019-02-10 23:05:06 +01:00
cschwinne
6171883758 Split up WS2812FX.cpp in FX and helper files 2019-02-09 16:37:20 +01:00
cschwinne
942b68c948 Added shields.io to readme 2019-02-09 15:41:55 +01:00
cschwinne
9ca7ffa5a3 Refactored white to col[3]
Added Saw effect
2019-02-05 21:53:39 +01:00
cschwinne
d1ce23c5ac Unique mDNS name
Various optimizations
2019-02-05 19:40:24 +01:00
cschwinne
b7b6d0a6bc Improved ripple effect 2019-02-02 23:59:48 +01:00
cschwinne
10c51eea2c Added Ripple and revamped twinkle effects 2019-01-31 23:42:48 +01:00
cschwinne
48d20c02a1 Added timed macro weekday support 2019-01-31 00:09:44 +01:00
cschwinne
c5cc0b3f2b Updated Mobile UI
Fixed Smooth Meteor stuck pixels
Added CORS response
Added secondary color to http API response
2019-01-18 01:20:36 +01:00
cschwinne
6ebef8846c Merge branch 'development' of https://github.com/Aircoookie/WLED.git into development 2019-01-09 23:03:34 +01:00
cschwinne
5d1993935e Added Alexa Color support 2019-01-09 22:55:18 +01:00
Aircoookie
caab8943cb Merge pull request #90 from cboltz/cboltz-timezone-deps
Use time/time.h from local dependencies
2018-12-20 21:17:42 +01:00
Christian Boltz
f5c05b24fb Use time/time.h from local dependencies
This fixes a compile issue, which can be
a) file not found or
b) (after installing the Time library) redefinition of a variable
2018-12-17 22:07:43 +01:00
Aircoookie
940a0d006d Merge pull request #89 from definitio/master
Fix compiling on a case sensitive filesystems
2018-12-17 15:41:24 +01:00
definitio
8fe67a04d8 Fix compiling on a case sensitive file systems 2018-12-17 18:08:59 +04:00
cschwinne
bec745d095 Improved colortwinkles on longer strips
Added offMode
2018-12-16 20:38:00 +01:00
Aircoookie
223fd35138 Merge pull request #84 from Aircoookie/development
Updated platformio.ini for v0.8.2
2018-12-06 16:32:52 +01:00
cschwinne
d3fc0309c0 Updated platformio.ini for v0.8.2 2018-12-06 16:31:52 +01:00
Aircoookie
830223f6e2 Merge pull request #83 from Aircoookie/development
Fixed incorrect #defines for 0.8.2
2018-12-06 00:43:32 +01:00
cschwinne
eb53c52499 Fixed incorrect #defines for 0.8.2 2018-12-06 00:40:59 +01:00
Aircoookie
96c9e2b4d6 Merge pull request #82 from Aircoookie/development
Updated readme
2018-12-06 00:31:39 +01:00
cschwinne
c34b948bad Updated readme 2018-12-06 00:30:38 +01:00
Aircoookie
9ac609f846 Release of v0.8.2 (merge)
Release of v0.8.2 (PR)
2018-12-06 00:30:05 +01:00
cschwinne
6aa47bfd1b Release of v0.8.2
Improved settings page scaling on mobile devices
Added 2 new effects to web UIs
2018-12-06 00:27:36 +01:00
cschwinne
ff46e6ea86 Added Auto Brightness Limiter and power calculation 2018-12-04 00:58:06 +01:00
cschwinne
5489c74986 Added Smooth meteor and Railway effects 2018-12-02 02:49:05 +01:00
cschwinne
f6f8151150 Added meteor FX to web UI 2018-11-29 21:46:05 +01:00
cschwinne
a20d577f6c WS2812b Color Order changeable in settings
Meteor effect can now use palettes
2018-11-28 12:24:32 +01:00
cschwinne
c4c2494dd1 Improved binary size 2018-11-25 00:00:02 +01:00
cschwinne
c9c294a1d5 Merge branch 'development' of https://github.com/Aircoookie/WLED.git into development 2018-11-24 11:52:44 +01:00
cschwinne
6359a8a8a2 Improved effect updating internals 2018-11-24 11:52:23 +01:00
Aircoookie
f9b44381bd Merge pull request #77 from viknet365/master
add meteor effect
2018-11-23 00:21:07 +01:00
Aircoookie
eb1ccb600b Delete htmls00.h
0.8.2 will use the new gzip system with different files. HTML changes will be manually added
2018-11-23 00:20:26 +01:00
cschwinne
b2db61aa03 Merge branch 'development' of https://github.com/Aircoookie/WLED.git into development 2018-11-23 00:16:25 +01:00
cschwinne
ee55a574de Moved About section to Github wiki
Updated readme
2018-11-23 00:11:47 +01:00
cschwinne
0998fd32cd Moved About section to Github wiki 2018-11-23 00:03:44 +01:00
cschwinne
686f2c4aa6 IR codes will now also be printed without debug enabled 2018-11-22 22:43:44 +01:00
cschwinne
cd234673ea Fixed nightlight issues
Added custom infrared method
2018-11-22 00:09:30 +01:00
cschwinne
54d7a81f16 Incomplete commit for Nightlight Fixes
Interim state (Reason: Local Working Copy Data Corruption)
Affected files: (local changes will be re-implemented in next commit)
settings_sync.html (already recovered)
html_settings.h (already recovered)
wled03_set.ino
wled08_led.ino
wled09_button.ino
wled19_ir.ino
2018-11-21 23:28:20 +01:00
viknet365
9d8d2c0aa1 add meteor effect
This reverts commit f1371d6737.
2018-11-20 21:31:07 +01:00
viknet365
17ce6b9507 Revert "Add files via upload"
This reverts commit f1371d6737.
2018-11-20 21:09:06 +01:00
viknet365
296065a976 Revert "add meteor effect"
This reverts commit 0b0f600f97.
2018-11-20 20:59:13 +01:00
viknet365
0b0f600f97 add meteor effect 2018-11-20 20:42:47 +01:00
viknet365
f1371d6737 Add files via upload
add meteor effect
2018-11-20 20:35:04 +01:00
viknet365
03a33790e1 Update WS2812FX.cpp 2018-11-20 20:32:21 +01:00
cschwinne
c0816c80ae Infrared support added 2018-11-18 00:31:45 +01:00
cschwinne
071ebe6ef2 Gzipped UIs, improving speed and flash usage 2018-11-16 19:59:00 +01:00
Aircoookie
2126e42743 Merge pull request #74 from wiesendaniel/feature/pio-port
Added Plattform IO Support
2018-11-16 19:50:19 +01:00
Daniel Wiesendorf
8a2b34adb4 moved ws2812fx sources back 2018-11-16 15:02:09 +01:00
Daniel Wiesendorf
93eb4d21bf Added PIO recommendation when opening in vscode 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
868cedeed2 pio support for esp01 512k 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
5c794f428a added verbose flag to travisci.yml for debugging 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
612d6f85bd Pio support of esp32 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
e5cef6b877 fixed DEBUG constant for travis build 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
f2a63c04a8 fixed travisci build again... 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
5a5064e070 fixed travisci build 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
478fa3132c Minor fixes for PIO support 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
a84859c211 Changed platformio.ini. A few boards are building now 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
67013bd58f Changed platformio.ini. A few boards are building now 2018-11-14 22:07:04 +01:00
Daniel Wiesendorf
b51be31d8a added initial PlatformIO config. still needs work 2018-11-14 22:07:04 +01:00
Aircoookie
a3bef49124 Refactored code to improve readability (merge dev PR)
Refactored code to improve readability
Fixed non-2-char indentations
2018-11-09 17:02:58 +01:00
cschwinne
a5cf553f17 Refactored code to improve readability
Fixed non-2-char indentations
2018-11-09 17:00:36 +01:00
Aircoookie
640188f4e2 Merge pull request #68 from Aircoookie/development
Release of v0.8.0
2018-11-07 20:23:01 +01:00
cschwinne
48265bbe02 Release of WLED 0.8.1
Added Lake effect
2018-11-07 20:22:05 +01:00
cschwinne
6aaf544079 Auto-select pixel driving method based on LEDPIN 2018-11-05 02:24:13 +01:00
cschwinne
9904c10984 Added Colortwinkle effect 74 2018-11-04 20:14:23 +01:00
cschwinne
81c810eba4 Increased max. UDP leds from 341 to 490
MQTT now publishes state on connect
2018-11-01 16:16:38 +01:00
cschwinne
5e6b1e8175 Added defines for more granular feature disable control 2018-11-01 15:36:13 +01:00
cschwinne
48c165b0b4 Added support for E1.31 with more than 170 LEDs 2018-11-01 01:05:35 +01:00
cschwinne
042605701e Added DNRGB UDP protocol 2018-10-27 11:39:00 +02:00
cschwinne
32cf1495d3 Fixed tricolor chase modes
Added a new palette
2018-10-25 20:55:29 +02:00
cschwinne
9577e49231 Added Palette support for most effects
Fixed Analog Clock bugs
Added Tiamat palette
2018-10-24 02:06:07 +02:00
cschwinne
de19839145 Fixed overlay not unlocking on disable 2018-10-18 18:31:25 +02:00
cschwinne
f970780d6c Fixed Clock overlay not working in reverse mode
Removed need for Macros to start with capital letter
2018-10-18 18:06:46 +02:00
Aircoookie
1e69cc75c7 Merge pull request #57 from Aircoookie/development
Release of v0.8.0
2018-10-15 16:33:20 +02:00
cschwinne
377e4fa0a5 Release of v0.8.0 2018-10-15 16:15:51 +02:00
cschwinne
a5d6dc58d3 Fixed E1.31 multicast 2018-10-11 21:38:00 +02:00
cschwinne
a122c17340 Fixed Blynk power button and settings 2018-10-08 17:36:22 +02:00
cschwinne
34ddf104a9 Optimized EEPROM string read/write code
Changed DNS server to improve AP mode stability
2018-10-07 11:56:29 +02:00
cschwinne
f98b0beee5 Added Mobile UI power indicator 2018-10-06 14:53:15 +02:00
cschwinne
75a61f85db Cleaned up readme 2018-10-04 23:16:25 +02:00
cschwinne
c1cdf27507 Release of v0.8.0 to dev branch
Updating master after more testing
2018-10-04 22:41:35 +02:00
cschwinne
43e9743645 Fixed ESP32 version
Fixed Adalight serial Ambilight
2018-10-04 22:38:39 +02:00
cschwinne
c2972786f5 Attempted to improve AP only stability 2018-10-04 18:17:01 +02:00
cschwinne
eeb17b417c Added MQTT
Updated readme for 0.8.0
Fixed custom theme bug
Bumped version codes to 0.8.0
2018-10-04 16:50:12 +02:00
cschwinne
473991638c Fixed realtime mode not working 2018-10-01 21:31:31 +02:00
cschwinne
92b4b69b3f Split Server init code from wled05_init.ino to improve readability
Added MQTT logic
2018-09-30 20:24:57 +02:00
cschwinne
dbd6f134c1 Added CL= and C2= API calls to set HEX or DEC RGB or WRGB color
Started to add MQTT support
Pre server and init split-up
2018-09-28 23:53:51 +02:00
cschwinne
5f59487a88 Added basic Time Activated Macros function
Fixed Cronixie overlay
512K Flash mode (temporarily) unavailable
2018-09-22 22:49:24 +02:00
cschwinne
bb7f673ff9 Re-added support for 512K flash ESPs 2018-09-17 11:15:08 +02:00
cschwinne
4715180a32 Refactored wled00.ino
Attempted to fix AP mode lags
2018-09-15 17:29:01 +02:00
cschwinne
4b31610169 Updated UI with all new palettes
FastLED effects now have default palettes per effect
Fire2012 can now use Palettes
Option for palette blending added
Added new Palettes
2018-09-11 00:20:29 +02:00
cschwinne
2466c5a204 Merge branch 'development' of https://github.com/Aircoookie/WLED.git into development 2018-09-08 20:35:47 +02:00
Aircoookie
0505baff38 Resolve version code merge conflict 2018-09-08 20:34:59 +02:00
cschwinne
c55e3a37ae Added 33 gradient palette presets
Fixed welcome page not showing on fresh install
Fixed device not turning on on fresh install
2018-09-08 20:26:04 +02:00
cschwinne
ce5fec4d5f Added Pride2012 and Colorwaves effects
Adjusted Noise16 effects
Added palette fade transition option
2018-09-08 16:21:44 +02:00
cschwinne
6d4339b034 Added first palette functions
Attempted to fix welcome page
2018-09-06 02:05:56 +02:00
cschwinne
70d0aae07c First commit of 0.8.0 dev cycle
Updated to newer WS2812FX version which supports segments (not supported in WLED yet)
Added new (FastLED) effects
Adjusted FX speed timings
Removed Sweep transition and Custom Chase (seldomly used - hinder development)
Removed solid overlay (no longer needed once segments are added)
Fixed Blynk effect set
2018-09-04 15:51:38 +02:00
Aircoookie
e3b9b341fd Merge pull request #47 from Aircoookie/development
Fixed Blynk FX updates
2018-08-31 22:36:38 +02:00
Aircoookie
95083cf743 Merge pull request #46 from kayrozen/master
Fixed blynk code
2018-08-31 22:35:50 +02:00
Aircoookie
3842c4ac46 Bump version date code for blynk fix 2018-08-31 22:35:23 +02:00
kayrozen
fe178043ee fix blynk 2018-08-31 14:52:02 -04:00
Aircoookie
82d40f60f1 Release of WLED 0.7.1
Merge dev to master
2018-08-11 23:05:11 +02:00
cschwinne
1d4d885276 Release of WLED 0.7.1 to dev branch
Added E1.31 support
Added more realtime options
Attempted to fix welcome page not showing on fresh install
2018-08-11 22:59:37 +02:00
cschwinne
ed3557ffca Fixed Exception 28 loop on fresh install
Removed legacy binaries folder
2018-08-05 19:22:48 +02:00
cschwinne
1c3878fcb0 Added blynk UI updates 2018-07-29 14:03:02 +02:00
cschwinne
b3dcb9fe6c Fixed ESP32 resetting upon opening wifi settings 2018-07-22 21:21:18 +02:00
cschwinne
0462755922 further optimization 2018-07-22 14:55:10 +02:00
cschwinne
415dfd2750 Continued optimizing strings 2018-07-21 23:21:07 +02:00
cschwinne
72f203e4fa Started optimizing code by converting String to char* 2018-07-20 19:35:31 +02:00
cschwinne
4e3c83af94 Added Blynk support
Fixed AutoRGBW not disabling white slider in UI
Fixed possible UDP buffer out of bounds
2018-07-16 11:50:09 +02:00
404 changed files with 75748 additions and 12036 deletions

22
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.148.1/containers/python-3/.devcontainer/base.Dockerfile
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6
ARG VARIANT="3"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
# [Option] Install Node.js
ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/
# RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
# && rm -rf /tmp/pip-tmp
# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
# [Optional] Uncomment this line to install global node packages.
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

View File

@@ -0,0 +1,47 @@
{
"name": "Python 3",
"build": {
"dockerfile": "Dockerfile",
"context": "..",
"args": {
// Update 'VARIANT' to pick a Python version: 3, 3.6, 3.7, 3.8, 3.9
"VARIANT": "3",
// Options
"INSTALL_NODE": "true",
"NODE_VERSION": "lts/*"
}
},
// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": "/usr/local/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8",
"python.formatting.blackPath": "/usr/local/py-utils/bin/black",
"python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf",
"python.linting.banditPath": "/usr/local/py-utils/bin/bandit",
"python.linting.flake8Path": "/usr/local/py-utils/bin/flake8",
"python.linting.mypyPath": "/usr/local/py-utils/bin/mypy",
"python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle",
"python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle",
"python.linting.pylintPath": "/usr/local/py-utils/bin/pylint"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-python.python",
"platformio.platformio-ide"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm install",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}

1
.envrc Normal file
View File

@@ -0,0 +1 @@
layout python-venv python3

2
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,2 @@
github: [Aircoookie]
custom: ['https://paypal.me/Aircoookie']

83
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@@ -0,0 +1,83 @@
name: Bug Report
description: File a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Please quickly search existing issues first before submitting a bug.
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear and concise description of what the bug is.
placeholder: Tell us what the problem is.
validations:
required: true
- type: textarea
id: how-to-reproduce
attributes:
label: To Reproduce Bug
description: Steps to reproduce the behavior, if consistently possible.
placeholder: Tell us how to make the bug appear.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
placeholder: Tell us what you expected to happen.
validations:
required: true
- type: dropdown
id: install_format
attributes:
label: Install Method
description: How did you install WLED?
options:
- Binary from WLED.me
- Self-Compiled
validations:
required: true
- type: input
id: version
attributes:
label: What version of WLED?
description: You can find this in by going to Config -> Security & Updates -> Scroll to Bottom. Copy and paste the entire line after "Server message"
placeholder: "e.g. WLED 0.13.1 (build 2203150)"
validations:
required: true
- type: dropdown
id: Board
attributes:
label: Which microcontroller/board are you seeing the problem on?
multiple: true
options:
- ESP8266
- ESP32
- Other
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant log/trace output
description: Please copy and paste any relevant log output if you have it. This will be automatically formatted into code, so no need for backticks.
render: shell
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Aircoookie/WLED/blob/master/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true

View File

@@ -0,0 +1,22 @@
---
name: Feature request
about: Suggest an improvement idea for WLED!
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Thank you for your ideas for making WLED better!

19
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@@ -0,0 +1,19 @@
---
name: Question
about: Have a question about using WLED?
title: ''
labels: question
assignees: ''
---
**Take a look at the wiki and FAQ, perhaps your question is already answered!**
[FAQ](https://github.com/Aircoookie/WLED/wiki/FAQ)
**Please consider asking your question on the WLED forum or Discord**
[Forum](https://wled.discourse.group/)
[Discord](https://discord.gg/KuqP7NE)
[What to post where?](https://github.com/Aircoookie/WLED/issues/658)
**If you do not like to use these platforms, delete this template and ask away!**
Please keep in mind though that the issue section is generally not the preferred place for general questions.

20
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 120
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- keep
- enhancement
- confirmed
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
Hey! This issue has been open for quite some time without any new comments now.
It will be closed automatically in a week if no further activity occurs.
Thank you for using WLED!
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

86
.github/workflows/wled-ci.yml vendored Normal file
View File

@@ -0,0 +1,86 @@
name: PlatformIO CI
on: [push, pull_request]
jobs:
get_default_envs:
name: Gather Environments
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/setup-python@v2
- name: Install PlatformIO
run: pip install -r requirements.txt
- name: Get default environments
id: envs
run: |
echo "::set-output name=environments::$(pio project config --json-output | jq -cr '.[0][1][0][1]')"
outputs:
environments: ${{ steps.envs.outputs.environments }}
build:
name: Build Enviornments
runs-on: ubuntu-latest
needs: get_default_envs
strategy:
matrix:
environment: ${{ fromJSON(needs.get_default_envs.outputs.environments) }}
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: pip install -r requirements.txt
- name: Build firmware
env:
WLED_RELEASE: True
run: pio run -e ${{ matrix.environment }}
- uses: actions/upload-artifact@v2
with:
name: firmware-${{ matrix.environment }}
path: |
build_output/firmware/*.bin
build_output/firmware/*.gz
- uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: firmware-release
path: build_output/release/*.bin
release:
name: Create Release
runs-on: ubuntu-latest
needs: [get_default_envs, build]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
with:
name: firmware-release
- name: Create draft release
uses: softprops/action-gh-release@v1
with:
draft: True
files: |
*.bin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

17
.gitignore vendored Normal file
View File

@@ -0,0 +1,17 @@
.pio
.cache
.pioenvs
.piolibdeps
.vscode
!.vscode/extensions.json
/wled00/Release
/wled00/extLibs
/platformio_override.ini
/wled00/my_config.h
/build_output
.DS_Store
.gitignore
.clang-format
node_modules
.idea
.direnv

5
.gitpod.Dockerfile vendored Normal file
View File

@@ -0,0 +1,5 @@
FROM gitpod/workspace-full
USER gitpod
RUN pip3 install -U platformio

12
.gitpod.yml Normal file
View File

@@ -0,0 +1,12 @@
tasks:
- command: platformio run
image:
file: .gitpod.Dockerfile
vscode:
extensions:
- ms-vscode.cpptools@0.26.3:u3GsZ5PK12Ddr79vh4TWgQ==
- eamodio.gitlens@10.2.1:e0IYyp0efFqVsrZwsIe8CA==
- Atishay-Jain.All-Autocomplete@0.0.23:fbZNfSpnd8XkAHGfAPS2rA==
- 2gua.rainbow-brackets@0.0.6:Tbu8dTz0i+/bgcKQTQ5b8g==

10
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}

42
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,42 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Build: HTML and binary",
"dependsOn": [
"Build: HTML only",
"Build: binary only"
],
"dependsOrder": "sequence",
"problemMatcher": [
"$platformio",
],
},
{
"type": "PlatformIO",
"label": "Build: binary only",
"task": "Build",
"group": {
"kind": "build",
"isDefault": true,
},
"problemMatcher": [
"$platformio"
],
"presentation": {
"panel": "shared"
}
},
{
"type": "npm",
"script": "build",
"group": "build",
"problemMatcher": [],
"label": "Build: HTML only",
"detail": "npm run build",
"presentation": {
"panel": "shared"
}
}
]
}

1051
CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

76
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at dev.aircoookie@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

78
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,78 @@
## Thank you for making WLED better!
Here are a few suggestions to make it easier for you to contribute!
### Code style
When in doubt, it is easiest to replicate the code style you find in the files you want to edit :)
Below are the guidelines we use in the WLED repository.
#### Indentation
We use tabs for Indentation in Web files (.html/.css/.js) and spaces (2 per indentation level) for all other files.
You are all set if you have enabled `Editor: Detect Indentation` in VS Code.
#### Blocks
Whether the opening bracket of e.g. an `if` block is in the same line as the condition or in a separate line is up to your discretion. If there is only one statement, leaving out block braches is acceptable.
Good:
```cpp
if (a == b) {
doStuff(a);
}
```
```cpp
if (a == b)
{
doStuff(a);
}
```
```cpp
if (a == b) doStuff(a);
```
There should always be a space between a keyword and its condition and between the condition and brace.
Within the condition, no space should be between the paranthesis and variables.
Spaces between variables and operators are up to the authors discretion.
There should be no space between function names and their argument parenthesis.
Good:
```cpp
if (a == b) {
doStuff(a);
}
```
Not good:
```cpp
if( a==b ){
doStuff ( a);
}
```
#### Comments
Comments should have a space between the delimiting characters (e.g. `//`) and the comment text.
Note: This is a recent change, the majority of the codebase still has comments without spaces.
Good:
```
// This is a comment.
/* This is a CSS inline comment */
/*
* This is a comment
* wrapping over multiple lines,
* used in WLED for file headers and function explanations
*/
<!-- This is an HTML comment -->
```
There is no set character limit for a comment within a line,
though as a rule of thumb you should wrap your comment if it exceeds the width of your editor window.
Inline comments are OK if they describe that line only and are not exceedingly wide.

View File

@@ -1,7 +0,0 @@
## Where are the new binaries?
From v0.5.0 on forward, the GitHub [releases](https://github.com/Aircoookie/WLED/releases) system will be used for binaries.
### What binary should I choose?
You should always try to use the binaries from the release page. This directory is for legacy purposes only!

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

5
images/Readme.md Normal file
View File

@@ -0,0 +1,5 @@
### Additional Logos
Additional awesome logos for WLED can be found here [Aircoookie/Akemi](https://github.com/Aircoookie/Akemi).
<img src="https://github.com/Aircoookie/Akemi/blob/master/akemi/001_cheerful.png">

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 KiB

BIN
images/wled_logo_akemi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
images/wled_logo_old.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

39
include/README Normal file
View File

@@ -0,0 +1,39 @@
This directory is intended for project header files.
A header file is a file containing C declarations and macro definitions
to be shared between several project source files. You request the use of a
header file in your project source file (C, C++, etc) located in `src` folder
by including it, with the C preprocessing directive `#include'.
```src/main.c
#include "header.h"
int main (void)
{
...
}
```
Including a header file produces the same results as copying the header file
into each source file that needs it. Such copying would be time-consuming
and error-prone. With a header file, the related declarations appear
in only one place. If they need to be changed, they can be changed in one
place, and programs that include the header file will automatically use the
new version when next recompiled. The header file eliminates the labor of
finding and changing all the copies as well as the risk that a failure to
find one copy will result in inconsistencies within a program.
In C, the usual convention is to give header files names that end with `.h'.
It is most portable to use only letters, digits, dashes, and underscores in
header file names, and at most one dot.
Read more about using header files in official GCC documentation:
* Include Syntax
* Include Operation
* Once-Only Headers
* Computed Includes
https://gcc.gnu.org/onlinedocs/cpp/Header-Files.html

46
lib/README Normal file
View File

@@ -0,0 +1,46 @@
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into executable file.
The source code of each library should be placed in a an own separate directory
("lib/your_library_name/[here are source files]").
For example, see a structure of the following two libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional, custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
and a contents of `src/main.c`:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
PlatformIO Library Dependency Finder will find automatically dependent
libraries scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html

2312
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

31
package.json Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "wled",
"version": "0.13.3",
"description": "Tools for WLED project",
"main": "tools/cdata.js",
"directories": {
"lib": "lib",
"test": "test"
},
"scripts": {
"build": "node tools/cdata.js",
"dev": "nodemon -e js,html,htm,css,png,jpg,gif,ico,js -w tools/ -w wled00/data/ -x node tools/cdata.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Aircoookie/WLED.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Aircoookie/WLED/issues"
},
"homepage": "https://github.com/Aircoookie/WLED#readme",
"dependencies": {
"clean-css": "^4.2.3",
"html-minifier-terser": "^5.1.1",
"inliner": "^1.13.1",
"nodemon": "^2.0.4",
"zlib": "^1.0.5"
}
}

9
pio-scripts/obj-dump.py Normal file
View File

@@ -0,0 +1,9 @@
# Little convenience script to get an object dump
Import('env')
def obj_dump_after_elf(source, target, env):
print("Create firmware.asm")
env.Execute("xtensa-lx106-elf-objdump "+ "-D " + str(target[0]) + " > "+ "${PROGNAME}.asm")
env.AddPostAction("$BUILD_DIR/${PROGNAME}.elf", [obj_dump_after_elf])

View File

@@ -0,0 +1,69 @@
Import('env')
import os
import shutil
import gzip
OUTPUT_DIR = "build_output{}".format(os.path.sep)
def _get_cpp_define_value(env, define):
define_list = [item[-1] for item in env["CPPDEFINES"] if item[0] == define]
if define_list:
return define_list[0]
return None
def _create_dirs(dirs=["firmware", "map"]):
# check if output directories exist and create if necessary
if not os.path.isdir(OUTPUT_DIR):
os.mkdir(OUTPUT_DIR)
for d in dirs:
if not os.path.isdir("{}{}".format(OUTPUT_DIR, d)):
os.mkdir("{}{}".format(OUTPUT_DIR, d))
def bin_rename_copy(source, target, env):
_create_dirs()
variant = env["PIOENV"]
# create string with location and file names based on variant
map_file = "{}map{}{}.map".format(OUTPUT_DIR, os.path.sep, variant)
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
release_name = _get_cpp_define_value(env, "WLED_RELEASE_NAME")
if release_name:
_create_dirs(["release"])
version = _get_cpp_define_value(env, "WLED_VERSION")
release_file = "{}release{}WLED_{}_{}.bin".format(OUTPUT_DIR, os.path.sep, version, release_name)
shutil.copy(str(target[0]), release_file)
# check if new target files exist and remove if necessary
for f in [map_file, bin_file]:
if os.path.isfile(f):
os.remove(f)
# copy firmware.bin to firmware/<variant>.bin
shutil.copy(str(target[0]), bin_file)
# copy firmware.map to map/<variant>.map
if os.path.isfile("firmware.map"):
shutil.move("firmware.map", map_file)
def bin_gzip(source, target, env):
_create_dirs()
variant = env["PIOENV"]
# create string with location and file names based on variant
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
gzip_file = "{}firmware{}{}.bin.gz".format(OUTPUT_DIR, os.path.sep, variant)
# check if new target files exist and remove if necessary
if os.path.isfile(gzip_file): os.remove(gzip_file)
# write gzip firmware file
with open(bin_file,"rb") as fp:
with gzip.open(gzip_file, "wb", compresslevel = 9) as f:
shutil.copyfileobj(fp, f)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_rename_copy, bin_gzip])

View File

@@ -0,0 +1,8 @@
Import('env')
import json
PACKAGE_FILE = "package.json"
with open(PACKAGE_FILE, "r") as package:
version = json.load(package)["version"]
env.Append(BUILD_FLAGS=[f"-DWLED_VERSION={version}"])

View File

@@ -0,0 +1,15 @@
Import('env')
#
# Dump build environment (for debug)
#print env.Dump()
#
flags = " ".join(env['LINKFLAGS'])
flags = flags.replace("-u _printf_float", "")
flags = flags.replace("-u _scanf_float", "")
newflags = flags.split()
env.Replace(
LINKFLAGS=newflags
)

View File

@@ -0,0 +1,9 @@
Import('env')
import os
import shutil
# copy WLED00/my_config_sample.h to WLED00/my_config.h
if os.path.isfile("wled00/my_config.h"):
print ("*** use existing my_config.h ***")
else:
shutil.copy("wled00/my_config_sample.h", "wled00/my_config.h")

576
platformio.ini Normal file
View File

@@ -0,0 +1,576 @@
; PlatformIO Project Configuration File
; Please visit documentation: https://docs.platformio.org/page/projectconf.html
[platformio]
# ------------------------------------------------------------------------------
# ENVIRONMENTS
#
# Please uncomment one of the lines below to select your board(s)
# ------------------------------------------------------------------------------
# Travis CI binaries (use `platformio_override.ini` when building for your own board; see `platformio_override.ini.sample` for an example)
; default_envs = travis_esp8266, travis_esp32
# Release binaries
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, esp32s2_saola, esp32c3
# Build everything
; default_envs = esp32dev, esp8285_4CH_MagicHome, codm-controller-0.6-rev2, codm-controller-0.6, esp32s2_saola, d1_mini_5CH_Shojo_PCB, d1_mini, sp501e, travis_esp8266, travis_esp32, nodemcuv2, esp32_eth, anavi_miracle_controller, esp07, esp01_1m_full, m5atom, h803wf, d1_mini_ota, heltec_wifi_kit_8, esp8285_H801, d1_mini_debug, wemos_shield_esp32, elekstube_ips
# Single binaries (uncomment your board)
; default_envs = elekstube_ips
; default_envs = nodemcuv2
; default_envs = esp8266_2m
; default_envs = esp01_1m_full
; default_envs = esp07
; default_envs = d1_mini
; default_envs = heltec_wifi_kit_8
; default_envs = h803wf
; default_envs = d1_mini_debug
; default_envs = d1_mini_ota
; default_envs = esp32dev
; default_envs = esp8285_4CH_MagicHome
; default_envs = esp8285_H801
; default_envs = d1_mini_5CH_Shojo_PCB
; default_envs = wemos_shield_esp32
; default_envs = m5atom
; default_envs = esp32_eth
; default_envs = esp32dev_qio80
; default_envs = esp32_eth_ota1mapp
; default_envs = esp32s2_saola
src_dir = ./wled00
data_dir = ./wled00/data
build_cache_dir = ~/.buildcache
extra_configs =
platformio_override.ini
[common]
# ------------------------------------------------------------------------------
# PLATFORM:
# !! DO NOT confuse platformio's ESP8266 development platform with Arduino core for ESP8266
#
# arduino core 2.6.3 = platformIO 2.3.2
# arduino core 2.7.0 = platformIO 2.5.0
# ------------------------------------------------------------------------------
arduino_core_2_6_3 = espressif8266@2.3.3
arduino_core_2_7_4 = espressif8266@2.6.2
arduino_core_3_0_0 = espressif8266@3.0.0
arduino_core_3_0_2 = espressif8266@3.2.0
# Development platforms
arduino_core_develop = https://github.com/platformio/platform-espressif8266#develop
arduino_core_git = https://github.com/platformio/platform-espressif8266#feature/stage
# Platform to use for ESP8266
platform_wled_default = ${common.arduino_core_2_7_4}
# We use 2.7.4.7 for all, includes PWM flicker fix and Wstring optimization
platform_packages = tasmota/framework-arduinoespressif8266 @ 3.20704.7
platformio/toolchain-xtensa @ ~2.40802.200502
platformio/tool-esptool @ ~1.413.0
platformio/tool-esptoolpy @ ~1.30000.0
# ------------------------------------------------------------------------------
# FLAGS: DEBUG
#
# ------------------------------------------------------------------------------
debug_flags = -D DEBUG=1 -D WLED_DEBUG -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_TLS_MEM
#if needed (for memleaks etc) also add; -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h"
#-DDEBUG_ESP_CORE is not working right now
# ------------------------------------------------------------------------------
# FLAGS: ldscript (available ldscripts at https://github.com/esp8266/Arduino/tree/master/tools/sdk/ld)
# ldscript_2m1m (2048 KB) = 1019 KB sketch, 4 KB eeprom, 1004 KB spiffs, 16 KB reserved
# ldscript_4m1m (4096 KB) = 1019 KB sketch, 4 KB eeprom, 1002 KB spiffs, 16 KB reserved, 2048 KB empty/ota?
#
# Available lwIP variants (macros):
# -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH = v1.4 Higher Bandwidth (default)
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY = v2 Lower Memory
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH = v2 Higher Bandwidth
# -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
#
# BearSSL performance:
# When building with -DSECURE_CLIENT=SECURE_CLIENT_BEARSSL, please add `board_build.f_cpu = 160000000` to the environment configuration
#
# BearSSL ciphers:
# When building on core >= 2.5, you can add the build flag -DBEARSSL_SSL_BASIC in order to build BearSSL with a limited set of ciphers:
# TLS_RSA_WITH_AES_128_CBC_SHA256 / AES128-SHA256
# TLS_RSA_WITH_AES_256_CBC_SHA256 / AES256-SHA256
# TLS_RSA_WITH_AES_128_CBC_SHA / AES128-SHA
# TLS_RSA_WITH_AES_256_CBC_SHA / AES256-SHA
# This reduces the OTA size with ~45KB, so it's especially useful on low memory boards (512k/1m).
# ------------------------------------------------------------------------------
build_flags =
-DMQTT_MAX_PACKET_SIZE=1024
-DSECURE_CLIENT=SECURE_CLIENT_BEARSSL
-DBEARSSL_SSL_BASIC
-D CORE_DEBUG_LEVEL=0
-D NDEBUG
#build_flags for the IRremoteESP8266 library (enabled decoders have to appear here)
-D _IR_ENABLE_DEFAULT_=false
-D DECODE_HASH=true
-D DECODE_NEC=true
-D DECODE_SONY=true
-D DECODE_SAMSUNG=true
-D DECODE_LG=true
-DWLED_USE_MY_CONFIG
; -D USERMOD_SENSORSTOMQTT
build_unflags =
# enables all features for travis CI
build_flags_all_features =
-D WLED_ENABLE_ADALIGHT
-D WLED_ENABLE_DMX
-D WLED_ENABLE_MQTT
-D WLED_ENABLE_WEBSOCKETS
build_flags_esp8266 = ${common.build_flags} ${esp8266.build_flags}
build_flags_esp32 = ${common.build_flags} ${esp32.build_flags}
ldscript_1m128k = eagle.flash.1m128.ld
ldscript_2m512k = eagle.flash.2m512.ld
ldscript_2m1m = eagle.flash.2m1m.ld
ldscript_4m1m = eagle.flash.4m1m.ld
[scripts_defaults]
extra_scripts =
pre:pio-scripts/set_version.py
post:pio-scripts/output_bins.py
post:pio-scripts/strip-floats.py
pre:pio-scripts/user_config_copy.py
# ------------------------------------------------------------------------------
# COMMON SETTINGS:
# ------------------------------------------------------------------------------
[env]
framework = arduino
board_build.flash_mode = dout
monitor_speed = 115200
# slow upload speed (comment this out with a ';' when building for development use)
upload_speed = 115200
# fast upload speed (remove ';' when building for development use)
; upload_speed = 921600
# ------------------------------------------------------------------------------
# LIBRARIES: required dependencies
# Please note that we don't always use the latest version of a library.
#
# The following libraries have been included (and some of them changd) in the source:
# ArduinoJson@5.13.5, Blynk@0.5.4(changed), E131@1.0.0(changed), Time@1.5, Timezone@1.2.1
# ------------------------------------------------------------------------------
lib_compat_mode = strict
lib_deps =
fastled/FastLED @ 3.5.0
IRremoteESP8266 @ 2.8.2
https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.4
#For use of the TTGO T-Display ESP32 Module with integrated TFT display uncomment the following line
#TFT_eSPI
#For use SSD1306 OLED display uncomment following
#U8g2@~2.27.2
#For Dallas sensor uncomment following 2 lines
#OneWire@~2.3.5
#milesburton/DallasTemperature@^3.9.0
#For BME280 sensor uncomment following
#BME280@~3.0.0
; adafruit/Adafruit BMP280 Library @ 2.1.0
; adafruit/Adafruit CCS811 Library @ 1.0.4
; adafruit/Adafruit Si7021 Library @ 1.4.0
extra_scripts = ${scripts_defaults.extra_scripts}
[esp8266]
build_flags =
-DESP8266
-DFP_IN_IROM
;-Wno-deprecated-declarations
-Wno-register
-Wno-misleading-indentation
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; lwIP 2 - Higher Bandwidth no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 1.4 - Higher Bandwidth (Aircoookie has)
-DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; VTABLES in Flash
-DVTABLES_IN_FLASH
; restrict to minimal mime-types
-DMIMETYPE_MINIMAL
lib_deps =
${env.lib_deps}
#https://github.com/lorol/LITTLEFS.git
ESPAsyncTCP @ 1.2.2
ESPAsyncUDP
makuna/NeoPixelBus @ 2.6.9
[esp32]
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip
platform = espressif32@3.5.0
platform_packages = framework-arduinoespressif32 @ https://github.com/Aircoookie/arduino-esp32.git#1.0.6.4
build_flags = -g
-DARDUINO_ARCH_ESP32
#-DCONFIG_LITTLEFS_FOR_IDF_3_2
-D CONFIG_ASYNC_TCP_USE_WDT=0
#use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x
-D LOROL_LITTLEFS
default_partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
lib_deps =
${env.lib_deps}
https://github.com/lorol/LITTLEFS.git
makuna/NeoPixelBus @ 2.6.9
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
[esp32s2]
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32S2
-DCONFIG_IDF_TARGET_ESP32S2
-D CONFIG_ASYNC_TCP_USE_WDT=0
-DCO
lib_deps =
${env.lib_deps}
makuna/NeoPixelBus @ 2.6.9
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
[esp32c3]
build_flags = -g
-DARDUINO_ARCH_ESP32
-DARDUINO_ARCH_ESP32C3
-DCONFIG_IDF_TARGET_ESP32C3
-D CONFIG_ASYNC_TCP_USE_WDT=0
-DCO
lib_deps =
${env.lib_deps}
makuna/NeoPixelBus @ 2.6.9
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
# ------------------------------------------------------------------------------
# WLED BUILDS
# ------------------------------------------------------------------------------
[env:nodemcuv2]
board = nodemcuv2
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP8266
lib_deps = ${esp8266.lib_deps}
[env:esp8266_2m]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP02
lib_deps = ${esp8266.lib_deps}
[env:esp01_1m_full]
board = esp01_1m
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP01 -D WLED_DISABLE_OTA
lib_deps = ${esp8266.lib_deps}
[env:esp07]
board = esp07
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps = ${esp8266.lib_deps}
[env:d1_mini]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
upload_speed = 921600
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps = ${esp8266.lib_deps}
monitor_filters = esp8266_exception_decoder
[env:heltec_wifi_kit_8]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps = ${esp8266.lib_deps}
[env:h803wf]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:esp32dev]
board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
[env:esp32dev_qio80]
board = esp32dev
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_qio80 #-D WLED_DISABLE_BLYNK #-D WLED_DISABLE_BROWNOUT_DET
lib_deps = ${esp32.lib_deps}
monitor_filters = esp32_exception_decoder
board_build.partitions = ${esp32.default_partitions}
board_build.f_flash = 80000000L
board_build.flash_mode = qio
[env:esp32_eth]
board = esp32-poe
platform = ${esp32.platform}
platform_packages = ${esp32.platform_packages}
upload_speed = 921600
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D WLED_RELEASE_NAME=ESP32_Ethernet -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1 -D WLED_DISABLE_BLYNK
lib_deps = ${esp32.lib_deps}
board_build.partitions = ${esp32.default_partitions}
[env:esp32s2_saola]
board = esp32-s2-saola-1
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.2/platform-tasmota-espressif32-2.0.2.zip
platform_packages =
framework = arduino
board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
board_build.flash_mode = qio
upload_speed = 460800
build_unflags = ${common.build_unflags}
lib_deps = ${esp32s2.lib_deps}
[env:esp32c3]
board = esp32-c3-devkitm-1
platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.2/platform-tasmota-espressif32-2.0.2.zip
platform_packages =
framework = arduino
board_build.partitions = tools/WLED_ESP32_4MB_1MB_FS.csv
upload_speed = 460800
build_unflags = ${common.build_unflags}
lib_deps = ${esp32c3.lib_deps}
[env:esp8285_4CH_MagicHome]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA
lib_deps = ${esp8266.lib_deps}
[env:esp8285_H801]
board = esp8285
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_DISABLE_OTA
lib_deps = ${esp8266.lib_deps}
[env:d1_mini_5CH_Shojo_PCB]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_USE_SHOJO_PCB
lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# DEVELOPMENT BOARDS
# ------------------------------------------------------------------------------
[env:d1_mini_debug]
board = d1_mini
build_type = debug
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} ${common.debug_flags}
lib_deps = ${esp8266.lib_deps}
[env:d1_mini_ota]
board = d1_mini
upload_protocol = espota
# exchange for your WLED IP
upload_port = "10.10.1.27"
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps = ${esp8266.lib_deps}
[env:anavi_miracle_controller]
board = d1_mini
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=12 -D IRPIN=-1 -D RLYPIN=2
lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# custom board configurations
# ------------------------------------------------------------------------------
[env:wemos_shield_esp32]
board = esp32dev
platform = espressif32@3.2
upload_speed = 460800
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32}
-D LEDPIN=16
-D RLYPIN=19
-D BTNPIN=17
-D IRPIN=18
-D UWLED_USE_MY_CONFIG
-D USERMOD_DALLASTEMPERATURE
-D USERMOD_FOUR_LINE_DISPLAY
-D TEMPERATURE_PIN=23
lib_deps = ${esp32.lib_deps}
OneWire@~2.3.5
olikraus/U8g2 @ ^2.28.8
board_build.partitions = ${esp32.default_partitions}
[env:m5atom]
board = esp32dev
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} -D LEDPIN=27 -D BTNPIN=39
lib_deps = ${esp32.lib_deps}
platform = espressif32@3.2
board_build.partitions = ${esp32.default_partitions}
[env:sp501e]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=1
lib_deps = ${esp8266.lib_deps}
[env:sp511e]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D LEDPIN=3 -D BTNPIN=2 -D IRPIN=5 -D WLED_MAX_BUTTONS=3
lib_deps = ${esp8266.lib_deps}
[env:athom7w]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D WLED_MAX_CCT_BLEND=0 -D BTNPIN=-1 -D IRPIN=-1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:athom15w]
board = esp_wroom_02
platform = ${common.platform_wled_default}
board_build.ldscript = ${common.ldscript_2m512k}
build_flags = ${common.build_flags_esp8266} -D WLED_USE_IC_CCT -D BTNPIN=-1 -D IRPIN=-1 -D WLED_DISABLE_INFRARED
lib_deps = ${esp8266.lib_deps}
[env:MY9291]
board = esp01_1m
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} -D WLED_RELEASE_NAME=ESP01 -D WLED_DISABLE_OTA -D USERMOD_MY9291
lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# travis test board configurations
# ------------------------------------------------------------------------------
[env:travis_esp8266]
extends = env:d1_mini
build_type = debug
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266} ${common.debug_flags} ${common.build_flags_all_features}
[env:travis_esp32]
extends = env:esp32dev
; build_type = debug
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp32} ${common.debug_flags} ${common.build_flags_all_features}
# ------------------------------------------------------------------------------
# codm pixel controller board configurations
# codm-controller-0.6 can also be used for the TYWE3S controller
# ------------------------------------------------------------------------------
[env:codm-controller-0.6]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_2m512k}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps = ${esp8266.lib_deps}
[env:codm-controller-0.6-rev2]
board = esp_wroom_02
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_4m1m}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
lib_deps = ${esp8266.lib_deps}
# ------------------------------------------------------------------------------
# EleksTube-IPS
# ------------------------------------------------------------------------------
[env:elekstube_ips]
board = esp32dev
platform = espressif32@3.2
upload_speed = 921600
build_flags = ${common.build_flags_esp32} -D WLED_DISABLE_BROWNOUT_DET -D WLED_DISABLE_INFRARED
-D USERMOD_RTC
-D USERMOD_ELEKSTUBE_IPS
-D LEDPIN=12
-D RLYPIN=27
-D BTNPIN=34
-D WLED_DISABLE_BLYNK
-D DEFAULT_LED_COUNT=6
# Display config
-D ST7789_DRIVER
-D TFT_WIDTH=135
-D TFT_HEIGHT=240
-D CGRAM_OFFSET
-D TFT_SDA_READ
-D TFT_MOSI=23
-D TFT_SCLK=18
-D TFT_DC=25
-D TFT_RST=26
-D SPI_FREQUENCY=40000000
-D USER_SETUP_LOADED
monitor_filters = esp32_exception_decoder
lib_deps =
${esp32.lib_deps}
TFT_eSPI @ ^2.3.70
board_build.partitions = ${esp32.default_partitions}

View File

@@ -0,0 +1,66 @@
# Example PlatformIO Project Configuration Override
# ------------------------------------------------------------------------------
# Copy to platformio_override.ini to activate overrides
# ------------------------------------------------------------------------------
# Please visit documentation: https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = WLED_tasmota_1M
[env:WLED_tasmota_1M]
board = esp01_1m
platform = ${common.platform_wled_default}
platform_packages = ${common.platform_packages}
board_build.ldscript = ${common.ldscript_1m128k}
lib_deps = ${esp8266.lib_deps}
build_unflags = ${common.build_unflags}
build_flags = ${common.build_flags_esp8266}
; *********************************************************************
; *** Use custom settings from file my_config.h
-DWLED_USE_MY_CONFIG
; *********************************************************************
;
;
; *** To use the below defines/overrides, copy and paste each onto it's own line just below build_flags in the section above.
;
; disable specific features
; -D WLED_DISABLE_OTA
; -D WLED_DISABLE_ALEXA
; -D WLED_DISABLE_BLYNK
; -D WLED_DISABLE_HUESYNC
; -D WLED_DISABLE_INFRARED
; -D WLED_DISABLE_WEBSOCKETS
; PIN defines - uncomment and change, if needed:
; -D LEDPIN=2
; -D BTNPIN=0
; -D TOUCHPIN=T0
; -D IRPIN=4
; -D RLYPIN=12
; -D RLYMDE=1
; digital LED strip types - uncomment only one ! - this will disable WS281x / SK681x support
; -D USE_APA102
; -D USE_WS2801
; -D USE_LPD8806
; PIN defines for 2 wire LEDs
-D CLKPIN=0
-D DATAPIN=2
; to drive analog LED strips (aka 5050) hardware configuration is no longer necessary
; configure the settings in the UI as follows (hard):
; for the Magic Home LED Controller use PWM pins 5,12,13,15
; for the H801 controller use PINs 15,13,12,14 (W2 = 04)
; for the BW-LT11 controller use PINs 12,4,14,5
;
; set the name of the module - make sure there is a quote-backslash-quote before the name and a backslash-quote-quote after the name
; -D SERVERNAME="\"WLED\""
;
; set the number of LEDs
; -D DEFAULT_LED_COUNT=30
;
; set milliampere limit when using ESP pin to power leds
; -D ABL_MILLIAMPS_DEFAULT=850
;
; enable IR by setting remote type
; -D IRTYPE=0 ;0 Remote disabled | 1 24-key RGB | 2 24-key with CT | 3 40-key blue | 4 40-key RGB | 5 21-key RGB | 6 6-key black | 7 9-key red | 8 JSON remote
;
; set default color order of your led strip
; -D DEFAULT_LED_COLOR_ORDER=COL_ORDER_GRB

110
readme.md
View File

@@ -1,49 +1,81 @@
## Welcome to my project WLED!
<p align="center">
<img src="/images/wled_logo_akemi.png">
<a href="https://github.com/Aircoookie/WLED/releases"><img src="https://img.shields.io/github/release/Aircoookie/WLED.svg?style=flat-square"></a>
<a href="https://raw.githubusercontent.com/Aircoookie/WLED/master/LICENSE"><img src="https://img.shields.io/github/license/Aircoookie/wled?color=blue&style=flat-square"></a>
<a href="https://wled.discourse.group"><img src="https://img.shields.io/discourse/topics?colorB=blue&label=forum&server=https%3A%2F%2Fwled.discourse.group%2F&style=flat-square"></a>
<a href="https://discord.gg/KuqP7NE"><img src="https://img.shields.io/discord/473448917040758787.svg?colorB=blue&label=discord&style=flat-square"></a>
<a href="https://kno.wled.ge"><img src="https://img.shields.io/badge/quick_start-wiki-blue.svg?style=flat-square"></a>
<a href="https://github.com/Aircoookie/WLED-App"><img src="https://img.shields.io/badge/app-wled-blue.svg?style=flat-square"></a>
<a href="https://gitpod.io/#https://github.com/Aircoookie/WLED"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?style=flat-square&logo=gitpod"></a>
WLED is a fast and (relatively) secure implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B) LEDs!
</p>
### Features: (V0.7.0)
- RGB, HSB, and brightness sliders
- All new, mobile-friendly web UI!
- Settings page - configuration over network
- Access Point and station mode - automatic failsafe AP
- WS2812FX library integrated for over 50 special effects (+Custom Theater Chase)!
- Secondary color support lets you use even more effect combinations
- Alexa smart home device server (including dimming)
- Beta syncronization to Philips hue lights
- Support for RGBW strips
- 25 user presets! Save colors and effects and apply them easily! Supports cycling through them.
- HTTP request API for simple integration
- Macro functions to automatically execute API calls
- Nightlight function (gradually dims down)
- Notifier function (multiple ESPs sync color via UDP broadcast)
- Support for power pushbutton
- Support for the Adalight serial ambilight protocol!
- Full OTA software update capability (HTTP and ArduinoOTA)
- Password protected OTA page for added security (OTA lock)
- NTP and configurable analog clock function
- Support for the Cronixie Clock kit by Diamex
- Realtime UDP Packet Control (Hyperion, WARLS, DRGB, DRGBW)
# Welcome to my project WLED! ✨
### Quick start guide and documentation:
A fast and feature-rich implementation of an ESP8266/ESP32 webserver to control NeoPixel (WS2812B, WS2811, SK6812) LEDs or also SPI based chipsets like the WS2801 and APA102!
See the [wiki](https://github.com/Aircoookie/WLED/wiki)!
### Other
Licensed under the MIT license
Uses libraries:
ESP8266/ESP32 Arduino Core
NeoPixelBus by Makuna
[WS2812FX](https://github.com/kitesurfer1404/WS2812FX) by kitesurfer1404 (Aircoookie fork)
Time library
Timezone library by JChristensen
Alexa code based on arduino-esp8266-alexa-multiple-wemo-switch by kakopappa
Uses Linearicons by Perxis! (link in settings page)
## ⚙️ Features
- WS2812FX library integrated for over 100 special effects
- FastLED noise effects and 50 palettes
- Modern UI with color, effect and segment controls
- Segments to set different effects and colors to parts of the LEDs
- Settings page - configuration over network
- Access Point and station mode - automatic failsafe AP
- Up to 10 LED outputs per instance
- Support for RGBW strips
- Up to 250 user presets to save and load colors/effects easily, supports cycling through them.
- Presets can be used to automatically execute API calls
- Nightlight function (gradually dims down)
- Full OTA software updatability (HTTP + ArduinoOTA), password protectable
- Configurable analog clock (Cronixie, 7-segment and EleksTube IPS clock support via usermods)
- Configurable Auto Brightness limit for safer operation
- Filesystem-based config for easier backup of presets and settings
## 💡 Supported light control interfaces
- WLED app for [Android](https://play.google.com/store/apps/details?id=com.aircoookie.WLED) and [iOS](https://apps.apple.com/us/app/wled/id1475695033)
- JSON and HTTP request APIs
- MQTT
- Blynk IoT
- E1.31, Art-Net, DDP and TPM2.net
- [diyHue](https://github.com/diyhue/diyHue) (Wled is supported by diyHue, including Hue Sync Entertainment under udp. Thanks to [Gregory Mallios](https://github.com/gmallios))
- [Hyperion](https://github.com/hyperion-project/hyperion.ng)
- UDP realtime
- Alexa voice control (including dimming and color)
- Sync to Philips hue lights
- Adalight (PC ambilight via serial) and TPM2
- Sync color of multiple WLED devices (UDP notifier)
- Infrared remotes (24-key RGB, receiver required)
- Simple timers/schedules (time from NTP, timezones/DST supported)
## 📲 Quick start guide and documentation
See the [documentation on our official site](https://kno.wled.ge)!
[On this page](https://kno.wled.ge/basics/tutorials/) you can find excellent tutorials made by the community and helpful tools to help you get your new lamp up and running!
## 🖼️ User interface
<img src="/images/macbook-pro-space-gray-on-the-wooden-table.jpg" width="50%"><img src="/images/walking-with-iphone-x.jpg" width="50%">
## 💾 Compatible hardware
See [here](https://kno.wled.ge/basics/compatible-hardware)!
## ✌️ Other
Licensed under the MIT license
Credits [here](https://kno.wled.ge/about/contributors/)!
Join the Discord server to discuss everything about WLED!
<a href="https://discord.gg/KuqP7NE"><img src="https://discordapp.com/api/guilds/473448917040758787/widget.png?style=banner2" width="25%"></a>
Check out the WLED [Discourse forum](https://wled.discourse.group)!
You can also send me mails to [dev.aircoookie@gmail.com](mailto:dev.aircoookie@gmail.com), but please only do so if you want to talk to me privately.
If WLED really brightens up your every day, you can [![](https://img.shields.io/badge/send%20me%20a%20small%20gift-paypal-blue.svg?style=flat-square)](https://paypal.me/aircoookie)
*Disclaimer:*
If you are sensitive to photosensitive epilepsy it is not recommended that you use this software.
In case you still want to try, don't use strobe, lighting or noise modes or high effect speed settings.
As per the MIT license, I assume no liability for any damage to you or any other person or equipment.

1
requirements.in Normal file
View File

@@ -0,0 +1 @@
platformio

70
requirements.txt Normal file
View File

@@ -0,0 +1,70 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
# pip-compile
#
aiofiles==0.8.0
# via platformio
ajsonrpc==1.2.0
# via platformio
anyio==3.6.1
# via starlette
async-timeout==4.0.2
# via zeroconf
bottle==0.12.23
# via platformio
certifi==2022.6.15
# via requests
charset-normalizer==2.1.1
# via requests
click==8.1.3
# via
# platformio
# uvicorn
colorama==0.4.5
# via
# click
# platformio
h11==0.13.0
# via
# uvicorn
# wsproto
idna==3.3
# via
# anyio
# requests
ifaddr==0.2.0
# via zeroconf
marshmallow==3.17.0
# via platformio
packaging==21.3
# via marshmallow
platformio==6.1.4
# via -r requirements.in
pyelftools==0.29
# via platformio
pyparsing==3.0.9
# via packaging
pyserial==3.5
# via platformio
requests==2.28.1
# via platformio
semantic-version==2.10.0
# via platformio
sniffio==1.2.0
# via anyio
starlette==0.20.4
# via platformio
tabulate==0.8.10
# via platformio
typing-extensions==4.3.0
# via starlette
urllib3==1.26.11
# via requests
uvicorn==0.18.2
# via platformio
wsproto==1.1.0
# via platformio
zeroconf==0.39.0
# via platformio

11
test/README Normal file
View File

@@ -0,0 +1,11 @@
This directory is intended for PIO Unit Testing and project tests.
Unit Testing is a software testing method by which individual units of
source code, sets of one or more MCU program modules together with associated
control data, usage procedures, and operating procedures, are tested to
determine whether they are fit for use. Unit testing finds problems early
in the development cycle.
More information about PIO Unit Testing:
- https://docs.platformio.org/page/plus/unit-testing.html

View File

@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
spiffs, data, spiffs, 0x410000,0xBE0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x200000
5 app1 app ota_1 0x210000 0x200000
6 spiffs data spiffs 0x410000 0xBE0000

View File

@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x180000,
app1, app, ota_1, 0x190000,0x180000,
spiffs, data, spiffs, 0x310000,0xF0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x180000
5 app1 app ota_1 0x190000 0x180000
6 spiffs data spiffs 0x310000 0xF0000

6
tools/WLED_ESP32_8MB.csv Normal file
View File

@@ -0,0 +1,6 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x200000,
app1, app, ota_1, 0x210000,0x200000,
spiffs, data, spiffs, 0x410000,0x3F0000,
1 # Name Type SubType Offset Size Flags
2 nvs data nvs 0x9000 0x5000
3 otadata data ota 0xe000 0x2000
4 app0 app ota_0 0x10000 0x200000
5 app1 app ota_1 0x210000 0x200000
6 spiffs data spiffs 0x410000 0x3F0000

440
tools/cdata.js Normal file
View File

@@ -0,0 +1,440 @@
/**
* Writes compressed C arrays of data files (web interface)
* How to use it?
*
* 1) Install Node 11+ and npm
* 2) npm install
* 3) npm run build
*
* If you change data folder often, you can run it in monitoring mode (it will recompile and update *.h on every file change)
*
* > npm run dev
*
* How it works?
*
* It uses NodeJS packages to inline, minify and GZIP files. See writeHtmlGzipped and writeChunks invocations at the bottom of the page.
*/
const fs = require("fs");
const packageJson = require("../package.json");
/**
*
*/
function hexdump(buffer) {
let lines = [];
for (let i = 0; i < buffer.length; i += 16) {
let block = buffer.slice(i, i + 16); // cut buffer into blocks of 16
let hexArray = [];
for (let value of block) {
hexArray.push("0x" + value.toString(16).padStart(2, "0"));
}
let hexString = hexArray.join(", ");
let line = ` ${hexString}`;
lines.push(line);
}
return lines.join(",\n");
}
const inliner = require("inliner");
const zlib = require("zlib");
function strReplace(str, search, replacement) {
return str.split(search).join(replacement);
}
function adoptVersionAndRepo(html) {
let repoUrl = packageJson.repository ? packageJson.repository.url : undefined;
if (repoUrl) {
repoUrl = repoUrl.replace(/^git\+/, "");
repoUrl = repoUrl.replace(/\.git$/, "");
// Replace we
html = strReplace(html, "https://github.com/atuline/WLED", repoUrl);
html = strReplace(html, "https://github.com/Aircoookie/WLED", repoUrl);
}
let version = packageJson.version;
if (version) {
html = strReplace(html, "##VERSION##", version);
}
return html;
}
function writeHtmlGzipped(sourceFile, resultFile) {
console.info("Reading " + sourceFile);
new inliner(sourceFile, function (error, html) {
console.info("Inlined " + html.length + " characters");
html = filter(html, "html-minify-ui");
console.info("Minified to " + html.length + " characters");
if (error) {
console.warn(error);
throw error;
}
html = adoptVersionAndRepo(html);
zlib.gzip(html, { level: zlib.constants.Z_BEST_COMPRESSION }, function (error, result) {
if (error) {
console.warn(error);
throw error;
}
console.info("Compressed " + result.length + " bytes");
const array = hexdump(result);
const src = `/*
* Binary array for the Web UI.
* gzip is used for smaller size and improved speeds.
*
* Please see https://kno.wled.ge/advanced/custom-features/#changing-web-ui
* to find out how to easily modify the web UI source!
*/
// Autogenerated from ${sourceFile}, do not edit!!
const uint16_t PAGE_index_L = ${result.length};
const uint8_t PAGE_index[] PROGMEM = {
${array}
};
`;
console.info("Writing " + resultFile);
fs.writeFileSync(resultFile, src);
});
});
}
const CleanCSS = require("clean-css");
const MinifyHTML = require("html-minifier-terser").minify;
function filter(str, type) {
str = adoptVersionAndRepo(str);
if (type === undefined) {
return str;
} else if (type == "css-minify") {
return new CleanCSS({}).minify(str).styles;
} else if (type == "html-minify") {
return MinifyHTML(str, {
collapseWhitespace: true,
maxLineLength: 80,
minifyCSS: true,
minifyJS: true,
continueOnParseError: false,
removeComments: true,
});
} else if (type == "html-minify-ui") {
return MinifyHTML(str, {
collapseWhitespace: true,
conservativeCollapse: true,
maxLineLength: 80,
minifyCSS: true,
minifyJS: true,
continueOnParseError: false,
removeComments: true,
});
} else {
console.warn("Unknown filter: " + type);
return str;
}
}
function specToChunk(srcDir, s) {
if (s.method == "plaintext") {
const buf = fs.readFileSync(srcDir + "/" + s.file);
const str = buf.toString("utf-8");
const chunk = `
// Autogenerated from ${srcDir}/${s.file}, do not edit!!
const char ${s.name}[] PROGMEM = R"${s.prepend || ""}${filter(str, s.filter)}${
s.append || ""
}";
`;
return s.mangle ? s.mangle(chunk) : chunk;
} else if (s.method == "binary") {
const buf = fs.readFileSync(srcDir + "/" + s.file);
const result = hexdump(buf);
const chunk = `
// Autogenerated from ${srcDir}/${s.file}, do not edit!!
const uint16_t ${s.name}_length = ${result.length};
const uint8_t ${s.name}[] PROGMEM = {
${result}
};
`;
return s.mangle ? s.mangle(chunk) : chunk;
} else {
console.warn("Unknown method: " + s.method);
return undefined;
}
}
function writeChunks(srcDir, specs, resultFile) {
let src = `/*
* More web UI HTML source arrays.
* This file is auto generated, please don't make any changes manually.
* Instead, see https://kno.wled.ge/advanced/custom-features/#changing-web-ui
* to find out how to easily modify the web UI source!
*/
`;
specs.forEach((s) => {
try {
console.info("Reading " + srcDir + "/" + s.file + " as " + s.name);
src += specToChunk(srcDir, s);
} catch (e) {
console.warn(
"Failed " + s.name + " from " + srcDir + "/" + s.file,
e.message.length > 60 ? e.message.substring(0, 60) : e.message
);
}
});
console.info("Writing " + src.length + " characters into " + resultFile);
fs.writeFileSync(resultFile, src);
}
writeHtmlGzipped("wled00/data/index.htm", "wled00/html_ui.h");
writeChunks(
"wled00/data",
[
{
file: "style.css",
name: "PAGE_settingsCss",
prepend: "=====(<style>",
append: "</style>)=====",
method: "plaintext",
filter: "css-minify",
},
{
file: "settings.htm",
name: "PAGE_settings",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace("%", "%%")
.replace(/Usermods\<\/button\>\<\/form\>/gms, "Usermods\<\/button\>\<\/form\>%DMXMENU%"),
},
{
file: "settings_wifi.htm",
name: "PAGE_settings_wifi",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_leds.htm",
name: "PAGE_settings_leds",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_dmx.htm",
name: "PAGE_settings_dmx",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) => {
const nocss = str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
);
return `
#ifdef WLED_ENABLE_DMX
${nocss}
#else
const char PAGE_settings_dmx[] PROGMEM = R"=====()=====";
#endif
`;
},
},
{
file: "settings_ui.htm",
name: "PAGE_settings_ui",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_sync.htm",
name: "PAGE_settings_sync",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(/function GetV().*\<\/script\>/gms, "function GetV() {\n"),
},
{
file: "settings_time.htm",
name: "PAGE_settings_time",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(/function GetV().*\<\/script\>/gms, "function GetV() {\n"),
},
{
file: "settings_sec.htm",
name: "PAGE_settings_sec",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
},
{
file: "settings_um.htm",
name: "PAGE_settings_um",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str
.replace(/\<link rel="stylesheet".*\>/gms, "")
.replace(/\<style\>.*\<\/style\>/gms, "%CSS%%SCSS%")
.replace(
/function GetV().*\<\/script\>/gms,
"function GetV() {var d=document;\n"
),
}
],
"wled00/html_settings.h"
);
writeChunks(
"wled00/data",
[
{
file: "usermod.htm",
name: "PAGE_usermod",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) =>
str.replace(/fetch\("http\:\/\/.*\/win/gms, 'fetch("/win'),
},
{
file: "msg.htm",
name: "PAGE_msg",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) => str.replace(/\<h2\>.*\<\/body\>/gms, "<h2>%MSG%</body>"),
},
{
file: "dmxmap.htm",
name: "PAGE_dmxmap",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
mangle: (str) => `
#ifdef WLED_ENABLE_DMX
${str.replace(/function FM\(\)[ ]?\{/gms, "function FM() {%DMXVARS%\n")}
#else
const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
#endif
`,
},
{
file: "update.htm",
name: "PAGE_update",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
},
{
file: "welcome.htm",
name: "PAGE_welcome",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
},
{
file: "liveview.htm",
name: "PAGE_liveview",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
},
{
file: "liveviewws.htm",
name: "PAGE_liveviewws",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
},
{
file: "404.htm",
name: "PAGE_404",
prepend: "=====(",
append: ")=====",
method: "plaintext",
filter: "html-minify",
},
{
file: "favicon.ico",
name: "favicon",
method: "binary",
},
],
"wled00/html_other.h"
);

232
tools/fps_test.htm Normal file
View File

@@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>WLED frame rate test tool</title>
<style>
body {
background-color: #222;
color: #fff;
font-family: Helvetica, Verdana, sans-serif;
}
input {
background-color: #333;
color: #fff;
}
#ip {
width: 100px;
}
#secs {
width: 36px;
}
#csva {
position: absolute;
top: -100px; /*gtfo*/
}
button {
background-color: #333;
color: #fff;
}
table, th, td {
border: 1px solid #aaa;
border-collapse: collapse;
text-align: center;
}
.red {
color: #d20;
}
</style>
<script>
var gotfx = false, running = false;
var pos = 0, prev = 0, min = 999, max = 0, fpslist = [], names = [], names_checked = [];
var to;
function S() {
document.getElementById('ip').value = localStorage.getItem('locIpFps');
if (document.getElementById('ip').value) req(false);
}
function loadC() {
hide(false);
var list = localStorage.getItem('fpsFxSelection');
if (!list) return;
list = JSON.parse(list);
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < chks.length; i++) {
if (i < list.length) chks[i].checked = list[i];
}
}
function saveC() {
var list = [];
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < chks.length; i++) {
list.push(chks[i].checked);
}
localStorage.setItem('fpsFxSelection', JSON.stringify(list));
}
function setC(c) {
hide(false);
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < chks.length; i++) {
chks[i].checked = (c == 255);
}
if (c == 1 && chks.length > 100) {
chks[1].checked = true; //Blink
chks[15].checked = true; //Running
chks[16].checked = true; //Saw
chks[37].checked = true; //Running 2
chks[44].checked = true; //Tetrix
chks[63].checked = true; //Pride 2015
chks[74].checked = true; //Colortwinkles
chks[101].checked = true;//Pacifica
}
}
function hide(h) {
var trs = document.querySelectorAll('.trs');
var chks = document.querySelectorAll('.fxcheck');
for (let i = 0; i < trs.length; i++) {
trs[i].style.display = (h && !chks[i].checked) ? "none":"table-row";
}
}
function run(init) {
if (init) {
running = !running;
document.getElementById('runbtn').innerText = running ? 'Stop':'Run';
if (running) {pos = 0; prev = -1; min = 999; max = 0; fpslist = []; names_checked = []; hide(true);}
clearTimeout(to);
if (!running) {req({seg:{fx:0},v:true,stop:true}); return;}
}
if (!gotfx) {req(false); return;}
var chks = document.querySelectorAll('.fxcheck');
var fpsb = document.querySelectorAll('.fps');
if (prev >= 0) {pos++};
if (pos >= chks.length) {run(true); return;} //end
while (!chks[pos].checked) {
fpsb[pos].innerText = "-";
pos++;
if (pos >= chks.length) {run(true); return;} //end
}
names_checked.push(names[pos]);
var extra = {};
try {
extra = JSON.parse(document.getElementById('ej').value);
} catch (e) {
}
var cmd = {seg:{fx:pos},v:true};
Object.assign(cmd, extra);
req(cmd);
}
function req(command) {
var ip = document.getElementById('ip').value;
if (!ip) {alert("Please enter WLED IP"); return;}
if (ip != localStorage.getItem('locIpFps')) localStorage.setItem('locIpFps', document.getElementById('ip').value);
var url = command ? `http://${ip}/json/si` : `http://${ip}/json/effects`;
var type = command ? 'post':'get';
var req = undefined;
if (command)
{
req = JSON.stringify(command);
}
fetch
(url, {
method: type,
headers: {
"Content-type": "application/json; charset=UTF-8"
},
body: req
})
.then(res => {
if (!res.ok) {
alert('Data malfunction');
}
return res.json();
})
.then(json => {
if (!json) {
alert('Empty response'); return;
}
if (!command) {
names = json;
var tblc = '';
for (let i = 0; i < json.length; i++) {
tblc += `<tr class="trs"><td><input type="checkbox" class="fxcheck" /></td><td>${i}</td><td>${json[i]}</td><td class="fps"></td></tr>`
}
var tbl = `<table>
<tr>
<th>Test?</th><th>ID</th><th>Effect Name</th><th>FPS</th>
</tr>
${tblc}
</table>`;
document.getElementById('tablecon').innerHTML = tbl;
setC(1);
loadC();
gotfx = true;
document.getElementById('runbtn').innerText = "Run";
} else {
if (!json.info) return;
document.getElementById('leds').innerText = json.info.leds.count;
document.getElementById('seg').innerText = json.state.seg[0].len;
document.getElementById('bri').innerText = json.state.bri;
if (prev >= 0) {
var lastfps = parseInt(json.info.leds.fps); //previous FX
if (lastfps < min) min = lastfps;
if (lastfps > max) max = lastfps;
fpslist.push(lastfps);
var sum = 0;
for (let i = 0; i < fpslist.length; i++) {
sum += fpslist[i];
}
sum /= fpslist.length;
document.getElementById('fps_min').innerText = min;
document.getElementById('fps_max').innerText = max;
document.getElementById('fps_avg').innerText = Math.round(sum*10)/10;
var fpsb = document.querySelectorAll('.fps');
fpsb[prev].innerHTML = lastfps;
}
prev = pos;
var delay = parseInt(document.getElementById('secs').value)*1000;
delay = Math.min(Math.max(delay, 2000), 15000)
if (!command.stop) to = setTimeout(run,delay);
}
})
.catch(function (error) {
alert('Comms malfunction');
console.log(error);
});
}
function csv(n) {
var txt = "";
for (let i = 0; i < fpslist.length; i++) {
if (!n) txt += names_checked[i] + ',';
txt += fpslist[i]; txt += "\n";
}
document.getElementById('csva').value = txt;
var copyText = document.getElementById('csva');
copyText.select();
copyText.setSelectionRange(0, 999999);
document.execCommand("copy");
}
</script>
</head>
<body onload="S()">
<h2>Starship monitoring dashboard</h2>
(or rather just a WLED frame rate tester lol)<br><br>
IP: <input id="ip" /><br>
Time per effect: <input type=number id=secs value=5 max=15 min=2 />s<br>
Effects to test:
<button type="button" onclick="setC(255)">All</button>
<button type="button" onclick="setC(1)">Selection 1</button>
<button type="button" onclick="setC(0)">None</button>
<button type="button" onclick="loadC()">Get LS</button>
<button type="button" class="red" onclick="saveC()">Save to LS</button><br>
Extra JSON: <input id="ej" /><br>
<button type="button" onclick="run(true)" id="runbtn">Fetch FX list</button><br>
LEDs: <span id="leds">-</span>, Seg: <span id="seg">-</span>, Bri: <span id="bri">-</span><br>
FPS min: <span id="fps_min">-</span>, max: <span id="fps_max">-</span>, avg: <span id="fps_avg">-</span><br><br>
<div id="tablecon">
</div><br>
<button type="button" onclick="csv(false)">Copy csv to clipboard</button>
<button type="button" onclick="csv(true)">Copy csv (FPS only)</button>
<textarea id=csva></textarea>
</body>
</html>

100
tools/json_test.htm Normal file
View File

@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<title>JSON client</title>
<style>
:root {
--bCol:#333;--cCol:#222;--dCol:#666;--tCol:#fff;
}
body {
font-family: Verdana, sans-serif;
text-align: center;
background: var(--cCol);
color: var(--tCol);
margin: 20px;
background-attachment: fixed;
}
button {
background: var(--cCol);
color: var(--tCol);
border: 0.3ch solid var(--cCol);
display: inline-block;
font-size: 20px;
margin: 8px;
margin-top: 12px;
}
input {
background: var(--cCol);
color: var(--tCol);
border: 0.5ch solid var(--cCol);
width: 100%;
}
h1{
margin: 0px;
font-size: 20px;
}
h2{
font-size: 16px;
margin-top: 20px;
}
form{
background: var(--bCol);
width: 500px;
padding: 20px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
display: inline-block;
}
textarea{
background: var(--cCol);
color: var(--tCol);
padding-top: 10px;
width: 100%;
font-family: monaco,monospace;
font-size: 12px;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
}
</style>
</head>
<body>
<form name="cf">
<h1>JSON API test tool</h1>
<h2>URL:</h2>
<input name="cu" type="text" size="60" value="http://192.168.4.1/json">
<div id="buttons">
<button type="button" onclick="rq('GET')">GET</button>
<button type="button" onclick="rq('POST')">POST</button>
</div>
<h2>Body:</h2>
<textarea name="bd" rows="8" cols="100"></textarea>
<h2>Response:</h2>
<textarea name="rsp" rows="25" cols="100"></textarea>
</form>
</body>
</html>
<script>
function rq(cm)
{
var h = new XMLHttpRequest();
h.open(cm, document.cf.cu.value, true);
h.onreadystatechange = function()
{
if(h.readyState == 4)
{
if(h.status==200)
{
document.cf.rsp.value="Bad JSON: "+h.responseText
document.cf.rsp.value=JSON.stringify(JSON.parse(h.responseText), null, '\t');
}
else
{
document.cf.rsp.value="Error "+h.status+"\r\n\n"+h.responseText;
}
}
}
h.send(document.cf.bd.value);
}
</script>

16
tools/multi-update.cmd Normal file
View File

@@ -0,0 +1,16 @@
@echo off
SETLOCAL
SET FWPATH=c:\path\to\your\WLED\build_output\firmware
GOTO ESPS
:UPDATEONE
IF NOT EXIST %FWPATH%\%2 GOTO SKIP
ping -w 1000 -n 1 %1 | find "TTL=" || GOTO SKIP
ECHO Updating %1
curl -s -F "update=@%FWPATH%/%2" %1/update >nul
:SKIP
GOTO:EOF
:ESPS
call :UPDATEONE 192.168.x.x firmware.bin
call :UPDATEONE ....

19
tools/multi-update.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
FWPATH=/path/to/your/WLED/build_output/firmware
update_one() {
if [ -f $FWPATH/$2 ]; then
ping -c 1 $1 >/dev/null
PINGRESULT=$?
if [ $PINGRESULT -eq 0 ]; then
echo Updating $1
curl -s -F "update=@${FWPATH}/$2" $1/update >/dev/null
return 0
fi
return 1
fi
}
update_one 192.168.x.x firmware.bin
update_one 192.168.x.x firmware.bin
# ...

View File

@@ -0,0 +1,534 @@
/*
* Usermod for detecting people entering/leaving a staircase and switching the
* staircase on/off.
*
* Edit the Animated_Staircase_config.h file to compile this usermod for your
* specific configuration.
*
* See the accompanying README.md file for more info.
*/
#pragma once
#include "wled.h"
class Animated_Staircase : public Usermod {
private:
/* configuration (available in API and stored in flash) */
bool enabled = false; // Enable this usermod
unsigned long segment_delay_ms = 150; // Time between switching each segment
unsigned long on_time_ms = 30000; // The time for the light to stay on
int8_t topPIRorTriggerPin = -1; // disabled
int8_t bottomPIRorTriggerPin = -1; // disabled
int8_t topEchoPin = -1; // disabled
int8_t bottomEchoPin = -1; // disabled
bool useUSSensorTop = false; // using PIR or UltraSound sensor?
bool useUSSensorBottom = false; // using PIR or UltraSound sensor?
unsigned int topMaxDist = 50; // default maximum measured distance in cm, top
unsigned int bottomMaxDist = 50; // default maximum measured distance in cm, bottom
/* runtime variables */
bool initDone = false;
// Time between checking of the sensors
const unsigned int scanDelay = 100;
// Lights on or off.
// Flipping this will start a transition.
bool on = false;
// Swipe direction for current transition
#define SWIPE_UP true
#define SWIPE_DOWN false
bool swipe = SWIPE_UP;
// Indicates which Sensor was seen last (to determine
// the direction when swiping off)
#define LOWER false
#define UPPER true
bool lastSensor = LOWER;
// Time of the last transition action
unsigned long lastTime = 0;
// Time of the last sensor check
unsigned long lastScanTime = 0;
// Last time the lights were switched on or off
unsigned long lastSwitchTime = 0;
// segment id between onIndex and offIndex are on.
// controll the swipe by setting/moving these indices around.
// onIndex must be less than or equal to offIndex
byte onIndex = 0;
byte offIndex = 0;
// The maximum number of configured segments.
// Dynamically updated based on user configuration.
byte maxSegmentId = 1;
byte mainSegmentId = 0;
// These values are used by the API to read the
// last sensor state, or trigger a sensor
// through the API
bool topSensorRead = false;
bool topSensorWrite = false;
bool bottomSensorRead = false;
bool bottomSensorWrite = false;
bool topSensorState = false;
bool bottomSensorState = false;
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _enabled[];
static const char _segmentDelay[];
static const char _onTime[];
static const char _useTopUltrasoundSensor[];
static const char _topPIRorTrigger_pin[];
static const char _topEcho_pin[];
static const char _useBottomUltrasoundSensor[];
static const char _bottomPIRorTrigger_pin[];
static const char _bottomEcho_pin[];
static const char _topEchoCm[];
static const char _bottomEchoCm[];
void publishMqtt(bool bottom, const char* state)
{
//Check if MQTT Connected, otherwise it will crash the 8266
if (WLED_MQTT_CONNECTED){
char subuf[64];
sprintf_P(subuf, PSTR("%s/motion/%d"), mqttDeviceTopic, (int)bottom);
mqtt->publish(subuf, 0, false, state);
}
}
void updateSegments() {
mainSegmentId = strip.getMainSegmentId();
WS2812FX::Segment* segments = strip.getSegments();
for (int i = 0; i < MAX_NUM_SEGMENTS; i++, segments++) {
if (!segments->isActive()) {
maxSegmentId = i - 1;
break;
}
if (i >= onIndex && i < offIndex) {
segments->setOption(SEG_OPTION_ON, 1, i);
// We may need to copy mode and colors from segment 0 to make sure
// changes are propagated even when the config is changed during a wipe
// segments->mode = mainsegment.mode;
// segments->colors[0] = mainsegment.colors[0];
} else {
segments->setOption(SEG_OPTION_ON, 0, i);
}
// Always mark segments as "transitional", we are animating the staircase
segments->setOption(SEG_OPTION_TRANSITIONAL, 1, i);
}
colorUpdated(CALL_MODE_DIRECT_CHANGE);
}
/*
* Detects if an object is within ultrasound range.
* signalPin: The pin where the pulse is sent
* echoPin: The pin where the echo is received
* maxTimeUs: Detection timeout in microseconds. If an echo is
* received within this time, an object is detected
* and the function will return true.
*
* The speed of sound is 343 meters per second at 20 degress Celcius.
* Since the sound has to travel back and forth, the detection
* distance for the sensor in cm is (0.0343 * maxTimeUs) / 2.
*
* For practical reasons, here are some useful distances:
*
* Distance = maxtime
* 5 cm = 292 uS
* 10 cm = 583 uS
* 20 cm = 1166 uS
* 30 cm = 1749 uS
* 50 cm = 2915 uS
* 100 cm = 5831 uS
*/
bool ultrasoundRead(int8_t signalPin, int8_t echoPin, unsigned int maxTimeUs) {
if (signalPin<0 || echoPin<0) return false;
digitalWrite(signalPin, LOW);
delayMicroseconds(2);
digitalWrite(signalPin, HIGH);
delayMicroseconds(10);
digitalWrite(signalPin, LOW);
return pulseIn(echoPin, HIGH, maxTimeUs) > 0;
}
bool checkSensors() {
bool sensorChanged = false;
if ((millis() - lastScanTime) > scanDelay) {
lastScanTime = millis();
bottomSensorRead = bottomSensorWrite ||
(!useUSSensorBottom ?
(bottomPIRorTriggerPin<0 ? false : digitalRead(bottomPIRorTriggerPin)) :
ultrasoundRead(bottomPIRorTriggerPin, bottomEchoPin, bottomMaxDist*59) // cm to us
);
topSensorRead = topSensorWrite ||
(!useUSSensorTop ?
(topPIRorTriggerPin<0 ? false : digitalRead(topPIRorTriggerPin)) :
ultrasoundRead(topPIRorTriggerPin, topEchoPin, topMaxDist*59) // cm to us
);
if (bottomSensorRead != bottomSensorState) {
bottomSensorState = bottomSensorRead; // change previous state
sensorChanged = true;
publishMqtt(true, bottomSensorState ? "on" : "off");
DEBUG_PRINTLN(F("Bottom sensor changed."));
}
if (topSensorRead != topSensorState) {
topSensorState = topSensorRead; // change previous state
sensorChanged = true;
publishMqtt(false, topSensorState ? "on" : "off");
DEBUG_PRINTLN(F("Top sensor changed."));
}
// Values read, reset the flags for next API call
topSensorWrite = false;
bottomSensorWrite = false;
if (topSensorRead != bottomSensorRead) {
lastSwitchTime = millis();
if (on) {
lastSensor = topSensorRead;
} else {
// If the bottom sensor triggered, we need to swipe up, ON
swipe = bottomSensorRead;
DEBUG_PRINT(F("ON -> Swipe "));
DEBUG_PRINTLN(swipe ? F("up.") : F("down."));
if (onIndex == offIndex) {
// Position the indices for a correct on-swipe
if (swipe == SWIPE_UP) {
onIndex = mainSegmentId;
} else {
onIndex = maxSegmentId+1;
}
offIndex = onIndex;
}
on = true;
}
}
}
return sensorChanged;
}
void autoPowerOff() {
if (on && ((millis() - lastSwitchTime) > on_time_ms)) {
// if sensors are still on, do nothing
if (bottomSensorState || topSensorState) return;
// Swipe OFF in the direction of the last sensor detection
swipe = lastSensor;
on = false;
DEBUG_PRINT(F("OFF -> Swipe "));
DEBUG_PRINTLN(swipe ? F("up.") : F("down."));
}
}
void updateSwipe() {
if ((millis() - lastTime) > segment_delay_ms) {
lastTime = millis();
if (on) {
// Turn on all segments
onIndex = MAX(mainSegmentId, onIndex - 1);
offIndex = MIN(maxSegmentId + 1, offIndex + 1);
} else {
if (swipe == SWIPE_UP) {
onIndex = MIN(offIndex, onIndex + 1);
} else {
offIndex = MAX(onIndex, offIndex - 1);
}
}
updateSegments();
}
}
// send sesnor values to JSON API
void writeSensorsToJson(JsonObject& staircase) {
staircase[F("top-sensor")] = topSensorRead;
staircase[F("bottom-sensor")] = bottomSensorRead;
}
// allow overrides from JSON API
void readSensorsFromJson(JsonObject& staircase) {
bottomSensorWrite = bottomSensorState || (staircase[F("bottom-sensor")].as<bool>());
topSensorWrite = topSensorState || (staircase[F("top-sensor")].as<bool>());
}
void enable(bool enable) {
if (enable) {
DEBUG_PRINTLN(F("Animated Staircase enabled."));
DEBUG_PRINT(F("Delay between steps: "));
DEBUG_PRINT(segment_delay_ms);
DEBUG_PRINT(F(" milliseconds.\nStairs switch off after: "));
DEBUG_PRINT(on_time_ms / 1000);
DEBUG_PRINTLN(F(" seconds."));
if (!useUSSensorBottom)
pinMode(bottomPIRorTriggerPin, INPUT_PULLUP);
else {
pinMode(bottomPIRorTriggerPin, OUTPUT);
pinMode(bottomEchoPin, INPUT);
}
if (!useUSSensorTop)
pinMode(topPIRorTriggerPin, INPUT_PULLUP);
else {
pinMode(topPIRorTriggerPin, OUTPUT);
pinMode(topEchoPin, INPUT);
}
} else {
// Restore segment options
WS2812FX::Segment* segments = strip.getSegments();
for (int i = 0; i < MAX_NUM_SEGMENTS; i++, segments++) {
if (!segments->isActive()) {
maxSegmentId = i - 1;
break;
}
segments->setOption(SEG_OPTION_ON, 1, i);
}
colorUpdated(CALL_MODE_DIRECT_CHANGE);
DEBUG_PRINTLN(F("Animated Staircase disabled."));
}
enabled = enable;
}
public:
void setup() {
// standardize invalid pin numbers to -1
if (topPIRorTriggerPin < 0) topPIRorTriggerPin = -1;
if (topEchoPin < 0) topEchoPin = -1;
if (bottomPIRorTriggerPin < 0) bottomPIRorTriggerPin = -1;
if (bottomEchoPin < 0) bottomEchoPin = -1;
// allocate pins
PinManagerPinType pins[4] = {
{ topPIRorTriggerPin, useUSSensorTop },
{ topEchoPin, false },
{ bottomPIRorTriggerPin, useUSSensorBottom },
{ bottomEchoPin, false },
};
// NOTE: this *WILL* return TRUE if all the pins are set to -1.
// this is *BY DESIGN*.
if (!pinManager.allocateMultiplePins(pins, 4, PinOwner::UM_AnimatedStaircase)) {
topPIRorTriggerPin = -1;
topEchoPin = -1;
bottomPIRorTriggerPin = -1;
bottomEchoPin = -1;
enabled = false;
}
enable(enabled);
initDone = true;
}
void loop() {
if (!enabled || strip.isUpdating()) return;
checkSensors();
autoPowerOff();
updateSwipe();
}
uint16_t getId() { return USERMOD_ID_ANIMATED_STAIRCASE; }
/**
* handling of MQTT message
* topic only contains stripped topic (part after /wled/MAC)
* topic should look like: /swipe with amessage of [up|down]
*/
bool onMqttMessage(char* topic, char* payload) {
if (strlen(topic) == 6 && strncmp_P(topic, PSTR("/swipe"), 6) == 0) {
String action = payload;
if (action == "up") {
bottomSensorWrite = true;
return true;
} else if (action == "down") {
topSensorWrite = true;
return true;
} else if (action == "on") {
enable(true);
return true;
} else if (action == "off") {
enable(false);
return true;
}
}
return false;
}
/**
* subscribe to MQTT topic for controlling usermod
*/
void onMqttConnect(bool sessionPresent) {
//(re)subscribe to required topics
char subuf[64];
if (mqttDeviceTopic[0] != 0) {
strcpy(subuf, mqttDeviceTopic);
strcat_P(subuf, PSTR("/swipe"));
mqtt->subscribe(subuf, 0);
}
}
void addToJsonState(JsonObject& root) {
JsonObject staircase = root[FPSTR(_name)];
if (staircase.isNull()) {
staircase = root.createNestedObject(FPSTR(_name));
}
writeSensorsToJson(staircase);
DEBUG_PRINTLN(F("Staircase sensor state exposed in API."));
}
/*
* Reads configuration settings from the json API.
* See void addToJsonState(JsonObject& root)
*/
void readFromJsonState(JsonObject& root) {
if (!initDone) return; // prevent crash on boot applyPreset()
JsonObject staircase = root[FPSTR(_name)];
if (!staircase.isNull()) {
if (staircase[FPSTR(_enabled)].is<bool>()) {
enabled = staircase[FPSTR(_enabled)].as<bool>();
} else {
String str = staircase[FPSTR(_enabled)]; // checkbox -> off or on
enabled = (bool)(str!="off"); // off is guaranteed to be present
}
readSensorsFromJson(staircase);
DEBUG_PRINTLN(F("Staircase sensor state read from API."));
}
}
/*
* Writes the configuration to internal flash memory.
*/
void addToConfig(JsonObject& root) {
JsonObject staircase = root[FPSTR(_name)];
if (staircase.isNull()) {
staircase = root.createNestedObject(FPSTR(_name));
}
staircase[FPSTR(_enabled)] = enabled;
staircase[FPSTR(_segmentDelay)] = segment_delay_ms;
staircase[FPSTR(_onTime)] = on_time_ms / 1000;
staircase[FPSTR(_useTopUltrasoundSensor)] = useUSSensorTop;
staircase[FPSTR(_topPIRorTrigger_pin)] = topPIRorTriggerPin;
staircase[FPSTR(_topEcho_pin)] = useUSSensorTop ? topEchoPin : -1;
staircase[FPSTR(_useBottomUltrasoundSensor)] = useUSSensorBottom;
staircase[FPSTR(_bottomPIRorTrigger_pin)] = bottomPIRorTriggerPin;
staircase[FPSTR(_bottomEcho_pin)] = useUSSensorBottom ? bottomEchoPin : -1;
staircase[FPSTR(_topEchoCm)] = topMaxDist;
staircase[FPSTR(_bottomEchoCm)] = bottomMaxDist;
DEBUG_PRINTLN(F("Staircase config saved."));
}
/*
* Reads the configuration to internal flash memory before setup() is called.
*
* The function should return true if configuration was successfully loaded or false if there was no configuration.
*/
bool readFromConfig(JsonObject& root) {
bool oldUseUSSensorTop = useUSSensorTop;
bool oldUseUSSensorBottom = useUSSensorBottom;
int8_t oldTopAPin = topPIRorTriggerPin;
int8_t oldTopBPin = topEchoPin;
int8_t oldBottomAPin = bottomPIRorTriggerPin;
int8_t oldBottomBPin = bottomEchoPin;
JsonObject top = root[FPSTR(_name)];
if (top.isNull()) {
DEBUG_PRINT(FPSTR(_name));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
enabled = top[FPSTR(_enabled)] | enabled;
segment_delay_ms = top[FPSTR(_segmentDelay)] | segment_delay_ms;
segment_delay_ms = (unsigned long) min((unsigned long)10000,max((unsigned long)10,(unsigned long)segment_delay_ms)); // max delay 10s
on_time_ms = top[FPSTR(_onTime)] | on_time_ms/1000;
on_time_ms = min(900,max(10,(int)on_time_ms)) * 1000; // min 10s, max 15min
useUSSensorTop = top[FPSTR(_useTopUltrasoundSensor)] | useUSSensorTop;
topPIRorTriggerPin = top[FPSTR(_topPIRorTrigger_pin)] | topPIRorTriggerPin;
topEchoPin = top[FPSTR(_topEcho_pin)] | topEchoPin;
useUSSensorBottom = top[FPSTR(_useBottomUltrasoundSensor)] | useUSSensorBottom;
bottomPIRorTriggerPin = top[FPSTR(_bottomPIRorTrigger_pin)] | bottomPIRorTriggerPin;
bottomEchoPin = top[FPSTR(_bottomEcho_pin)] | bottomEchoPin;
topMaxDist = top[FPSTR(_topEchoCm)] | topMaxDist;
topMaxDist = min(150,max(30,(int)topMaxDist)); // max distnace ~1.5m (a lag of 9ms may be expected)
bottomMaxDist = top[FPSTR(_bottomEchoCm)] | bottomMaxDist;
bottomMaxDist = min(150,max(30,(int)bottomMaxDist)); // max distance ~1.5m (a lag of 9ms may be expected)
DEBUG_PRINT(FPSTR(_name));
if (!initDone) {
// first run: reading from cfg.json
DEBUG_PRINTLN(F(" config loaded."));
} else {
// changing parameters from settings page
DEBUG_PRINTLN(F(" config (re)loaded."));
bool changed = false;
if ((oldUseUSSensorTop != useUSSensorTop) ||
(oldUseUSSensorBottom != useUSSensorBottom) ||
(oldTopAPin != topPIRorTriggerPin) ||
(oldTopBPin != topEchoPin) ||
(oldBottomAPin != bottomPIRorTriggerPin) ||
(oldBottomBPin != bottomEchoPin)) {
changed = true;
pinManager.deallocatePin(oldTopAPin, PinOwner::UM_AnimatedStaircase);
pinManager.deallocatePin(oldTopBPin, PinOwner::UM_AnimatedStaircase);
pinManager.deallocatePin(oldBottomAPin, PinOwner::UM_AnimatedStaircase);
pinManager.deallocatePin(oldBottomBPin, PinOwner::UM_AnimatedStaircase);
}
if (changed) setup();
}
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
return true;
}
/*
* Shows the delay between steps and power-off time in the "info"
* tab of the web-UI.
*/
void addToJsonInfo(JsonObject& root) {
JsonObject staircase = root["u"];
if (staircase.isNull()) {
staircase = root.createNestedObject("u");
}
JsonArray usermodEnabled = staircase.createNestedArray(F("Staircase")); // name
String btn = F("<button class=\"btn infobtn\" onclick=\"requestJson({staircase:{enabled:");
if (enabled) {
btn += F("false}});\">");
btn += F("enabled");
} else {
btn += F("true}});\">");
btn += F("disabled");
}
btn += F("</button>");
usermodEnabled.add(btn); // value
}
};
// strings to reduce flash memory usage (used more than twice)
const char Animated_Staircase::_name[] PROGMEM = "staircase";
const char Animated_Staircase::_enabled[] PROGMEM = "enabled";
const char Animated_Staircase::_segmentDelay[] PROGMEM = "segment-delay-ms";
const char Animated_Staircase::_onTime[] PROGMEM = "on-time-s";
const char Animated_Staircase::_useTopUltrasoundSensor[] PROGMEM = "useTopUltrasoundSensor";
const char Animated_Staircase::_topPIRorTrigger_pin[] PROGMEM = "topPIRorTrigger_pin";
const char Animated_Staircase::_topEcho_pin[] PROGMEM = "topEcho_pin";
const char Animated_Staircase::_useBottomUltrasoundSensor[] PROGMEM = "useBottomUltrasoundSensor";
const char Animated_Staircase::_bottomPIRorTrigger_pin[] PROGMEM = "bottomPIRorTrigger_pin";
const char Animated_Staircase::_bottomEcho_pin[] PROGMEM = "bottomEcho_pin";
const char Animated_Staircase::_topEchoCm[] PROGMEM = "top-dist-cm";
const char Animated_Staircase::_bottomEchoCm[] PROGMEM = "bottom-dist-cm";

View File

@@ -0,0 +1,131 @@
# Usermod Animated Staircase
This usermod makes your staircase look cool by switching it on with an animation. It uses
PIR or ultrasonic sensors at the top and bottom of your stairs to:
- Light up the steps in your walking direction, leading the way.
- Switch off the steps after you, in the direction of the last detected movement.
- Always switch on when one of the sensors detects movement, even if an effect
is still running. It can therewith handle multiple people on the stairs gracefully.
The Animated Staircase can be controlled by the WLED API. Change settings such as
speed, on/off time and distance settings by sending an HTTP request, see below.
## WLED integration
To include this usermod in your WLED setup, you have to be able to [compile WLED from source](https://github.com/Aircoookie/WLED/wiki/Compiling-WLED).
Before compiling, you have to make the following modifications:
Edit `usermods_list.cpp`:
1. Open `wled00/usermods_list.cpp`
2. add `#include "../usermods/Animated_Staircase/Animated_Staircase.h"` to the top of the file
3. add `usermods.add(new Animated_Staircase());` to the end of the `void registerUsermods()` function.
You can configure usermod using Usermods settings page.
Please enter GPIO pins for PIR sensors or ultrasonic sensor (trigger and echo).
If you use PIR sensor enter -1 for echo pin.
Maximum distance for ultrasonic sensor can be configured as a time needed for echo (see below).
## Hardware installation
1. Stick the LED strip under each step of the stairs.
2. Connect the ESP8266 pin D4 or ESP32 pin D2 to the first LED data pin at the bottom step
of your stairs.
3. Connect the data-out pin at the end of each strip per step to the data-in pin on the
other end of the next step, creating one large virtual LED strip.
4. Mount sensors of choice at the bottom and top of the stairs and connect them to the ESP.
5. To make sure all LEDs get enough power and have your staircase lighted evenly, power each
step from one side, using at least AWG14 or 2.5mm^2 cable. Don't connect them serial as you
do for the datacable!
You _may_ need to use 10k pull-down resistors on the selected PIR pins, depending on the sensor.
## WLED configuration
1. In the WLED UI, confgure a segment for each step. The lowest step of the stairs is the
lowest segment id.
2. Save your segments into a preset.
3. Ideally, add the preset in the config > LED setup menu to the "apply
preset **n** at boot" setting.
## Changing behavior through API
The Staircase settings can be changed through the WLED JSON api.
**NOTE:** We are using [curl](https://curl.se/) to send HTTP POSTs to the WLED API.
If you're using Windows and want to use the curl commands, replace the `\` with a `^`
or remove them and put everything on one line.
| Setting | Description | Default |
|------------------|---------------------------------------------------------------|---------|
| enabled | Enable or disable the usermod | true |
| bottom-sensor | Manually trigger a down to up animation via API | false |
| top-sensor | Manually trigger an up to down animation via API | false |
To read the current settings, open a browser to `http://xxx.xxx.xxx.xxx/json/state` (use your WLED
device IP address). The device will respond with a json object containing all WLED settings.
The staircase settings and sensor states are inside the WLED status element:
```json
{
"state": {
"staircase": {
"enabled": true,
"bottom-sensor": false,
"tops-ensor": false
},
}
```
### Enable/disable the usermod
By disabling the usermod you will be able to keep the LED's on, independent from the sensor
activity. This enables to play with the lights without the usermod switching them on or off.
To disable the usermod:
```bash
curl -X POST -H "Content-Type: application/json" \
-d {"staircase":{"enabled":false}} \
xxx.xxx.xxx.xxx/json/state
```
To enable the usermod again, use `"enabled":true`.
Alternatively you can use _Usermod_ Settings page where you can change other parameters as well.
### Changing animation parameters and detection range of the ultrasonic HC-SR04 sensor
Using _Usermod_ Settings page you can define different usermod parameters, includng sensor pins, delay between segment activation and so on.
When an ultrasonic sensor is enabled you can enter maximum detection distance in centimeters separately for top and bottom sensors.
**Please note:** that using an HC-SR04 sensor, particularly when detecting echos at longer
distances creates delays in the WLED software, and _might_ introduce timing hickups in your animations or
a less responsive web interface. It is therefore advised to keep the detection distance as short as possible.
### Animation triggering through the API
Instead of stairs activation by one of the sensors, you can also trigger the animation through
the API. To simulate triggering the bottom sensor, use:
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"staircase":{"bottom-sensor":true}}' \
xxx.xxx.xxx.xxx/json/state
```
Likewise, to trigger the top sensor, use:
```bash
curl -X POST -H "Content-Type: application/json" \
-d '{"staircase":{"top-sensor":true}}' \
xxx.xxx.xxx.xxx/json/state
```
**MQTT**
You can publish a message with either `up` or `down` on topic `/swipe` to trigger animation.
You can also use `on` or `off` for enabling or disabling usermod.
Have fun with this usermod.<br/>
www.rolfje.com
Modifications @blazoncek
## Change log
2021-04
* Adaptation for runtime configuration.

View File

@@ -0,0 +1,5 @@
Usermod to allow WLED to receive via UDP port from RGB.NET (and therefore add as a device to be controlled within artemis on PC)
This is only a very simple code to support a single led strip, it does not support the full function of the RGB.NET sketch for esp8266 only what is needed to be used with Artemis. It will show as a ws281x device in artemis when you provide the correct hostname or ip. Artemis queries the number of LEDs via the web interface (/config) but communication to set the LEDs is all done via the UDP interface.
To install, copy the usermod.cpp file to wled00 folder and recompile

View File

@@ -0,0 +1,93 @@
/*
* RGB.NET (artemis) receiver
*
* This works via the UDP, http is not supported apart from reporting LED count
*
*
*/
#include "wled.h"
#include <WiFiUdp.h>
WiFiUDP UDP;
const unsigned int RGBNET_localUdpPort = 1872; // local port to listen on
unsigned char RGBNET_packet[770];
long lastTime = 0;
int delayMs = 10;
bool isRGBNETUDPEnabled;
void RGBNET_readValues() {
int RGBNET_packetSize = UDP.parsePacket();
if (RGBNET_packetSize) {
// receive incoming UDP packets
int sequenceNumber = UDP.read();
int channel = UDP.read();
//channel data is not used we only supports one channel
int len = UDP.read(RGBNET_packet, strip.getLengthTotal()*3);
if(len==0){
return;
}
for (int i = 0; i < len; i=i+3) {
strip.setPixelColor(i/3, RGBNET_packet[i], RGBNET_packet[i+1], RGBNET_packet[i+2], 0);
}
//strip.show();
}
}
//update LED strip
void RGBNET_show() {
strip.show();
lastTime = millis();
}
//This function provides a json with info on the number of LEDs connected
// it is needed by artemis to know how many LEDs to display on the surface
void handleConfig(AsyncWebServerRequest *request)
{
String config = (String)"{\
\"channels\": [\
{\
\"channel\": 1,\
\"leds\": " + strip.getLengthTotal() + "\
},\
{\
\"channel\": 2,\
\"leds\": " + "0" + "\
},\
{\
\"channel\": 3,\
\"leds\": " + "0" + "\
},\
{\
\"channel\": 4,\
\"leds\": " + "0" + "\
}\
]\
}";
request->send(200, "application/json", config);
}
void userSetup()
{
server.on("/config", HTTP_GET, [](AsyncWebServerRequest *request){
handleConfig(request);
});
}
void userConnected()
{
// new wifi, who dis?
UDP.begin(RGBNET_localUdpPort);
isRGBNETUDPEnabled = true;
}
void userLoop()
{
RGBNET_readValues();
if (millis()-lastTime > delayMs) {
RGBNET_show();
}
}

View File

@@ -0,0 +1,16 @@
; Options
; -------
; USERMOD_BH1750 - define this to have this user mod included wled00\usermods_list.cpp
; USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL - the max number of milliseconds between measurements, defaults to 10000ms
; USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL - the min number of milliseconds between measurements, defaults to 500ms
; USERMOD_BH1750_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 10 seconds
; USERMOD_BH1750_OFFSET_VALUE - the offset value to report on, defaults to 1
;
[env:usermod_BH1750_d1_mini]
extends = env:d1_mini
build_flags =
${common.build_flags_esp8266}
-D USERMOD_BH1750
lib_deps =
${env.lib_deps}
claws/BH1750 @ ^1.2.0

View File

@@ -0,0 +1,24 @@
# BH1750 usermod
This usermod will read from an ambient light sensor like the BH1750 sensor.
The luminance is displayed both in the Info section of the web UI as well as published to the `/luminance` MQTT topic if enabled.
## Installation
Copy the example `platformio_override.ini` to the root directory. This file should be placed in the same directory as `platformio.ini`.
### Define Your Options
* `USERMOD_BH1750` - define this to have this user mod included wled00\usermods_list.cpp
* `USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL` - the max number of milliseconds between measurements, defaults to 10000ms
* `USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL` - the min number of milliseconds between measurements, defaults to 500ms
* `USERMOD_BH1750_FIRST_MEASUREMENT_AT` - the number of milliseconds after boot to take first measurement, defaults to 10 seconds
* `USERMOD_BH1750_OFFSET_VALUE` - the offset value to report on, defaults to 1
All parameters can be configured at runtime using Usermods settings page.
### PlatformIO requirements
If you are using `platformio_override.ini`, you should be able to refresh the task list and see your custom task, for example `env:usermod_BH1750_d1_mini`.
## Change Log

View File

@@ -0,0 +1,177 @@
#pragma once
#include "wled.h"
#include <Wire.h>
#include <BH1750.h>
// the max frequency to check photoresistor, 10 seconds
#ifndef USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL
#define USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL 10000
#endif
// the min frequency to check photoresistor, 500 ms
#ifndef USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL
#define USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL 500
#endif
// how many seconds after boot to take first measurement, 10 seconds
#ifndef USERMOD_BH1750_FIRST_MEASUREMENT_AT
#define USERMOD_BH1750_FIRST_MEASUREMENT_AT 10000
#endif
// only report if differance grater than offset value
#ifndef USERMOD_BH1750_OFFSET_VALUE
#define USERMOD_BH1750_OFFSET_VALUE 1
#endif
class Usermod_BH1750 : public Usermod
{
private:
int8_t offset = USERMOD_BH1750_OFFSET_VALUE;
unsigned long maxReadingInterval = USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL;
unsigned long minReadingInterval = USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL;
unsigned long lastMeasurement = UINT32_MAX - (USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL - USERMOD_BH1750_FIRST_MEASUREMENT_AT);
unsigned long lastSend = UINT32_MAX - (USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL - USERMOD_BH1750_FIRST_MEASUREMENT_AT);
// flag to indicate we have finished the first readLightLevel call
// allows this library to report to the user how long until the first
// measurement
bool getLuminanceComplete = false;
// flag set at startup
bool disabled = false;
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _enabled[];
static const char _maxReadInterval[];
static const char _minReadInterval[];
static const char _offset[];
BH1750 lightMeter;
float lastLux = -1000;
bool checkBoundSensor(float newValue, float prevValue, float maxDiff)
{
return isnan(prevValue) || newValue <= prevValue - maxDiff || newValue >= prevValue + maxDiff || (newValue == 0.0 && prevValue > 0.0);
}
public:
void setup()
{
Wire.begin();
lightMeter.begin();
}
void loop()
{
if (disabled || strip.isUpdating())
return;
unsigned long now = millis();
// check to see if we are due for taking a measurement
// lastMeasurement will not be updated until the conversion
// is complete the the reading is finished
if (now - lastMeasurement < minReadingInterval)
{
return;
}
bool shouldUpdate = now - lastSend > maxReadingInterval;
float lux = lightMeter.readLightLevel();
lastMeasurement = millis();
getLuminanceComplete = true;
if (shouldUpdate || checkBoundSensor(lux, lastLux, offset))
{
lastLux = lux;
lastSend = millis();
if (WLED_MQTT_CONNECTED)
{
char subuf[45];
strcpy(subuf, mqttDeviceTopic);
strcat_P(subuf, PSTR("/luminance"));
mqtt->publish(subuf, 0, true, String(lux).c_str());
}
else
{
DEBUG_PRINTLN("Missing MQTT connection. Not publishing data");
}
}
}
void addToJsonInfo(JsonObject &root)
{
JsonObject user = root[F("u")];
if (user.isNull())
user = root.createNestedObject(F("u"));
JsonArray lux_json = user.createNestedArray(F("Luminance"));
if (!getLuminanceComplete)
{
// if we haven't read the sensor yet, let the user know
// that we are still waiting for the first measurement
lux_json.add((USERMOD_BH1750_FIRST_MEASUREMENT_AT - millis()) / 1000);
lux_json.add(F(" sec until read"));
return;
}
lux_json.add(lastLux);
lux_json.add(F(" lx"));
}
uint16_t getId()
{
return USERMOD_ID_BH1750;
}
/**
* addToConfig() (called from set.cpp) stores persistent properties to cfg.json
*/
void addToConfig(JsonObject &root)
{
// we add JSON object.
JsonObject top = root.createNestedObject(FPSTR(_name)); // usermodname
top[FPSTR(_enabled)] = !disabled;
top[FPSTR(_maxReadInterval)] = maxReadingInterval;
top[FPSTR(_minReadInterval)] = minReadingInterval;
top[FPSTR(_offset)] = offset;
DEBUG_PRINTLN(F("Photoresistor config saved."));
}
/**
* readFromConfig() is called before setup() to populate properties from values stored in cfg.json
*/
bool readFromConfig(JsonObject &root)
{
// we look for JSON object.
JsonObject top = root[FPSTR(_name)];
if (top.isNull())
{
DEBUG_PRINT(FPSTR(_name));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
disabled = !(top[FPSTR(_enabled)] | !disabled);
maxReadingInterval = (top[FPSTR(_maxReadInterval)] | maxReadingInterval); // ms
minReadingInterval = (top[FPSTR(_minReadInterval)] | minReadingInterval); // ms
offset = top[FPSTR(_offset)] | offset;
DEBUG_PRINT(FPSTR(_name));
DEBUG_PRINTLN(F(" config (re)loaded."));
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
return true;
}
};
// strings to reduce flash memory usage (used more than twice)
const char Usermod_BH1750::_name[] PROGMEM = "BH1750";
const char Usermod_BH1750::_enabled[] PROGMEM = "enabled";
const char Usermod_BH1750::_maxReadInterval[] PROGMEM = "max-read-interval-ms";
const char Usermod_BH1750::_minReadInterval[] PROGMEM = "min-read-interval-ms";
const char Usermod_BH1750::_offset[] PROGMEM = "offset-lx";

View File

@@ -0,0 +1,14 @@
#include "wled.h"
/*
* Register your v2 usermods here!
*/
#ifdef USERMOD_BH1750
#include "../usermods/BH1750_v2/usermod_BH1750.h"
#endif
void registerUsermods()
{
#ifdef USERMOD_BH1750
usermods.add(new Usermod_BH1750());
#endif
}

View File

@@ -0,0 +1,90 @@
# Usermod BME280
This Usermod is designed to read a `BME280` or `BMP280` sensor and output the following:
- Temperature
- Humidity (`BME280` only)
- Pressure
- Heat Index (`BME280` only)
- Dew Point (`BME280` only)
Configuration is all completed via the Usermod menu. There are no settings to set in code! The following settings can be configured in the Usermod Menu:
- Temperature Decimals (number of decimal places to output)
- Humidity Decimals
- Pressure Decimals
- Temperature Interval (how many seconds between reads of temperature and humidity)
- Pressure Interval
- Publish Always (turn off to only publish changes, on to publish whether or not value changed)
- Use Celsius (turn off to use Farenheit)
- Home Assistant Discovery (turn on to sent MQTT Discovery entries for Home Assistant)
- SCL/SDA GPIO Pins
Dependencies
- Libraries
- `BME280@~3.0.0` (by [finitespace](https://github.com/finitespace/BME280))
- `Wire`
- These must be added under `lib_deps` in your `platform.ini` (or `platform_override.ini`).
- Data is published over MQTT - make sure you've enabled the MQTT sync interface.
- This usermod also writes to serial (GPIO1 on ESP8266). Please make sure nothing else listening on the serial TX pin of your board will get confused by log messages!
In addition to outputting via MQTT, you can read the values from the Info Screen on the dashboard page of the device's web interface.
Methods also exist to read the read/calculated values from other WLED modules through code.
- `getTemperatureC()`
- `getTemperatureF()`
- `getHumidity()`
- `getPressure()`
- `getDewPointC()`
- `getDewPointF()`
- `getHeatIndexC()`
- `getHeatIndexF()`
# Complilation
To enable, compile with `USERMOD_BME280` defined (e.g. in `platformio_override.ini`)
```ini
[env:usermod_bme280_d1_mini]
extends = env:d1_mini
build_flags =
${common.build_flags_esp8266}
-D USERMOD_BME280
lib_deps =
${esp8266.lib_deps}
BME280@~3.0.0
Wire
```
# MQTT
MQTT topics are as follows (`<deviceTopic>` is set in MQTT section of Sync Setup menu):
Measurement type | MQTT topic
--- | ---
Temperature | `<deviceTopic>/temperature`
Humidity | `<deviceTopic>/humidity`
Pressure | `<deviceTopic>/pressure`
Heat index | `<deviceTopic>/heat_index`
Dew point | `<deviceTopic>/dew_point`
If you are using Home Assistant, and `Home Assistant Discovery` is turned on, Home Assistant should automatically detect a new device, provided you have the MQTT integration installed. The device is seperate from the main WLED device and will contain sensors for Pressure, Humidity, Temperature, Dew Point and Heat Index.
# Revision History
Jul 2022
- Added Home Assistant Discovery
- Added API interface to output data
- Removed compile-time variables
- Added usermod menu interface
- Added value outputs to info screen
- Updated `readme.md`
- Registered usermod
- Implemented PinManager for usermod
- Implemented reallocation of pins without reboot
Apr 2021
- Added `Publish Always` option
Dec 2020
- Ported to V2 Usermod format
- Customisable `measure intervals`
- Customisable number of `decimal places` in published sensor values
- Pressure measured in units of hPa instead of Pa
- Calculation of heat index (apparent temperature) and dew point
- `16x oversampling` of sensor during measurement
- Values only published if they are different from the previous value

View File

@@ -0,0 +1,462 @@
// force the compiler to show a warning to confirm that this file is included
#warning **** Included USERMOD_BME280 version 2.0 ****
#pragma once
#include "wled.h"
#include <Arduino.h>
#include <Wire.h>
#include <BME280I2C.h> // BME280 sensor
#include <EnvironmentCalculations.h> // BME280 extended measurements
class UsermodBME280 : public Usermod
{
private:
// NOTE: Do not implement any compile-time variables, anything the user needs to configure
// should be configurable from the Usermod menu using the methods below
// key settings set via usermod menu
unsigned long TemperatureDecimals = 0; // Number of decimal places in published temperaure values
unsigned long HumidityDecimals = 0; // Number of decimal places in published humidity values
unsigned long PressureDecimals = 0; // Number of decimal places in published pressure values
unsigned long TemperatureInterval = 5; // Interval to measure temperature (and humidity, dew point if available) in seconds
unsigned long PressureInterval = 300; // Interval to measure pressure in seconds
bool PublishAlways = false; // Publish values even when they have not changed
bool UseCelsius = true; // Use Celsius for Reporting
bool HomeAssistantDiscovery = false; // Publish Home Assistant Device Information
// set the default pins based on the architecture, these get overridden by Usermod menu settings
#ifdef ARDUINO_ARCH_ESP32 // ESP32 boards
#define HW_PIN_SCL 22
#define HW_PIN_SDA 21
#else // ESP8266 boards
#define HW_PIN_SCL 5
#define HW_PIN_SDA 4
//uint8_t RST_PIN = 16; // Uncoment for Heltec WiFi-Kit-8
#endif
int8_t ioPin[2] = {HW_PIN_SCL, HW_PIN_SDA}; // I2C pins: SCL, SDA...defaults to Arch hardware pins but overridden at setup()
bool initDone = false;
// BME280 sensor settings
BME280I2C::Settings settings{
BME280::OSR_X16, // Temperature oversampling x16
BME280::OSR_X16, // Humidity oversampling x16
BME280::OSR_X16, // Pressure oversampling x16
// Defaults
BME280::Mode_Forced,
BME280::StandbyTime_1000ms,
BME280::Filter_Off,
BME280::SpiEnable_False,
BME280I2C::I2CAddr_0x76 // I2C address. I2C specific. Default 0x76
};
BME280I2C bme{settings};
uint8_t sensorType;
// Measurement timers
long timer;
long lastTemperatureMeasure = 0;
long lastPressureMeasure = 0;
// Current sensor values
float sensorTemperature;
float sensorHumidity;
float sensorHeatIndex;
float sensorDewPoint;
float sensorPressure;
String tempScale;
// Track previous sensor values
float lastTemperature;
float lastHumidity;
float lastHeatIndex;
float lastDewPoint;
float lastPressure;
// MQTT topic strings for publishing Home Assistant discovery topics
bool mqttInitialized = false;
String mqttTemperatureTopic = "";
String mqttHumidityTopic = "";
String mqttPressureTopic = "";
String mqttHeatIndexTopic = "";
String mqttDewPointTopic = "";
// Store packet IDs of MQTT publications
uint16_t mqttTemperaturePub = 0;
uint16_t mqttPressurePub = 0;
// Read the BME280/BMP280 Sensor (which one runs depends on whether Celsius or Farenheit being set in Usermod Menu)
void UpdateBME280Data(int SensorType)
{
float _temperature, _humidity, _pressure;
if (UseCelsius) {
BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
EnvironmentCalculations::TempUnit envTempUnit(EnvironmentCalculations::TempUnit_Celsius);
BME280::PresUnit presUnit(BME280::PresUnit_hPa);
bme.read(_pressure, _temperature, _humidity, tempUnit, presUnit);
sensorTemperature = _temperature;
sensorHumidity = _humidity;
sensorPressure = _pressure;
tempScale = "°C";
if (sensorType == 1)
{
sensorHeatIndex = EnvironmentCalculations::HeatIndex(_temperature, _humidity, envTempUnit);
sensorDewPoint = EnvironmentCalculations::DewPoint(_temperature, _humidity, envTempUnit);
}
} else {
BME280::TempUnit tempUnit(BME280::TempUnit_Fahrenheit);
EnvironmentCalculations::TempUnit envTempUnit(EnvironmentCalculations::TempUnit_Fahrenheit);
BME280::PresUnit presUnit(BME280::PresUnit_hPa);
bme.read(_pressure, _temperature, _humidity, tempUnit, presUnit);
sensorTemperature = _temperature;
sensorHumidity = _humidity;
sensorPressure = _pressure;
tempScale = "°F";
if (sensorType == 1)
{
sensorHeatIndex = EnvironmentCalculations::HeatIndex(_temperature, _humidity, envTempUnit);
sensorDewPoint = EnvironmentCalculations::DewPoint(_temperature, _humidity, envTempUnit);
}
}
}
// Procedure to define all MQTT discovery Topics
void _mqttInitialize()
{
mqttTemperatureTopic = String(mqttDeviceTopic) + F("/temperature");
mqttPressureTopic = String(mqttDeviceTopic) + F("/pressure");
mqttHumidityTopic = String(mqttDeviceTopic) + F("/humidity");
mqttHeatIndexTopic = String(mqttDeviceTopic) + F("/heat_index");
mqttDewPointTopic = String(mqttDeviceTopic) + F("/dew_point");
if (HomeAssistantDiscovery) {
_createMqttSensor(F("Temperature"), mqttTemperatureTopic, F("temperature"), tempScale);
_createMqttSensor(F("Pressure"), mqttPressureTopic, F("pressure"), F("hPa"));
_createMqttSensor(F("Humidity"), mqttHumidityTopic, F("humidity"), F("%"));
_createMqttSensor(F("HeatIndex"), mqttHeatIndexTopic, F("temperature"), tempScale);
_createMqttSensor(F("DewPoint"), mqttDewPointTopic, F("temperature"), tempScale);
}
}
// Create an MQTT Sensor for Home Assistant Discovery purposes, this includes a pointer to the topic that is published to in the Loop.
void _createMqttSensor(const String &name, const String &topic, const String &deviceClass, const String &unitOfMeasurement)
{
String t = String(F("homeassistant/sensor/")) + mqttClientID + F("/") + name + F("/config");
StaticJsonDocument<600> doc;
doc[F("name")] = String(serverDescription) + " " + name;
doc[F("state_topic")] = topic;
doc[F("unique_id")] = String(mqttClientID) + name;
if (unitOfMeasurement != "")
doc[F("unit_of_measurement")] = unitOfMeasurement;
if (deviceClass != "")
doc[F("device_class")] = deviceClass;
doc[F("expire_after")] = 1800;
JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device
device[F("name")] = serverDescription;
device[F("identifiers")] = "wled-sensor-" + String(mqttClientID);
device[F("manufacturer")] = F("WLED");
device[F("model")] = F("FOSS");
device[F("sw_version")] = versionString;
String temp;
serializeJson(doc, temp);
DEBUG_PRINTLN(t);
DEBUG_PRINTLN(temp);
mqtt->publish(t.c_str(), 0, true, temp.c_str());
}
public:
void setup()
{
bool HW_Pins_Used = (ioPin[0]==HW_PIN_SCL && ioPin[1]==HW_PIN_SDA); // note whether architecture-based hardware SCL/SDA pins used
PinOwner po = PinOwner::UM_BME280; // defaults to being pinowner for SCL/SDA pins
PinManagerPinType pins[2] = { { ioPin[0], true }, { ioPin[1], true } }; // allocate pins
if (HW_Pins_Used) po = PinOwner::HW_I2C; // allow multiple allocations of HW I2C bus pins
if (!pinManager.allocateMultiplePins(pins, 2, po)) { sensorType=0; return; }
Wire.begin(ioPin[1], ioPin[0]);
if (!bme.begin())
{
sensorType = 0;
DEBUG_PRINTLN(F("Could not find BME280I2C sensor!"));
}
else
{
switch (bme.chipModel())
{
case BME280::ChipModel_BME280:
sensorType = 1;
DEBUG_PRINTLN(F("Found BME280 sensor! Success."));
break;
case BME280::ChipModel_BMP280:
sensorType = 2;
DEBUG_PRINTLN(F("Found BMP280 sensor! No Humidity available."));
break;
default:
sensorType = 0;
DEBUG_PRINTLN(F("Found UNKNOWN sensor! Error!"));
}
}
initDone=true;
}
void loop()
{
// BME280 sensor MQTT publishing
// Check if sensor present and MQTT Connected, otherwise it will crash the MCU
if (sensorType != 0 && WLED_MQTT_CONNECTED)
{
// Timer to fetch new temperature, humidity and pressure data at intervals
timer = millis();
if (timer - lastTemperatureMeasure >= TemperatureInterval * 1000 || mqttTemperaturePub == 0)
{
lastTemperatureMeasure = timer;
UpdateBME280Data(sensorType);
float temperature = roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
float humidity, heatIndex, dewPoint;
if (WLED_MQTT_CONNECTED && !mqttInitialized)
{
_mqttInitialize();
mqttInitialized = true;
}
// If temperature has changed since last measure, create string populated with device topic
// from the UI and values read from sensor, then publish to broker
if (temperature != lastTemperature || PublishAlways)
{
String topic = String(mqttDeviceTopic) + "/temperature";
mqttTemperaturePub = mqtt->publish(topic.c_str(), 0, false, String(temperature, TemperatureDecimals).c_str());
}
lastTemperature = temperature; // Update last sensor temperature for next loop
if (sensorType == 1) // Only if sensor is a BME280
{
humidity = roundf(sensorHumidity * powf(10, HumidityDecimals)) / powf(10, HumidityDecimals);
heatIndex = roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
dewPoint = roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
if (humidity != lastHumidity || PublishAlways)
{
String topic = String(mqttDeviceTopic) + F("/humidity");
mqtt->publish(topic.c_str(), 0, false, String(humidity, HumidityDecimals).c_str());
}
if (heatIndex != lastHeatIndex || PublishAlways)
{
String topic = String(mqttDeviceTopic) + F("/heat_index");
mqtt->publish(topic.c_str(), 0, false, String(heatIndex, TemperatureDecimals).c_str());
}
if (dewPoint != lastDewPoint || PublishAlways)
{
String topic = String(mqttDeviceTopic) + F("/dew_point");
mqtt->publish(topic.c_str(), 0, false, String(dewPoint, TemperatureDecimals).c_str());
}
lastHumidity = humidity;
lastHeatIndex = heatIndex;
lastDewPoint = dewPoint;
}
}
if (timer - lastPressureMeasure >= PressureInterval * 1000 || mqttPressurePub == 0)
{
lastPressureMeasure = timer;
float pressure = roundf(sensorPressure * powf(10, PressureDecimals)) / powf(10, PressureDecimals);
if (pressure != lastPressure || PublishAlways)
{
String topic = String(mqttDeviceTopic) + F("/pressure");
mqttPressurePub = mqtt->publish(topic.c_str(), 0, true, String(pressure, PressureDecimals).c_str());
}
lastPressure = pressure;
}
}
}
/*
* API calls te enable data exchange between WLED modules
*/
inline float getTemperatureC() {
if (UseCelsius) {
return (float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
} else {
return (float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) * 1.8f + 32;
}
}
inline float getTemperatureF() {
if (UseCelsius) {
return ((float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) -32) * 0.56f;
} else {
return (float)roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
}
}
inline float getHumidity() {
return (float)roundf(sensorHumidity * powf(10, HumidityDecimals));
}
inline float getPressure() {
return (float)roundf(sensorPressure * powf(10, PressureDecimals));
}
inline float getDewPointC() {
if (UseCelsius) {
return (float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
} else {
return (float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) * 1.8f + 32;
}
}
inline float getDewPointF() {
if (UseCelsius) {
return ((float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) -32) * 0.56f;
} else {
return (float)roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
}
}
inline float getHeatIndexC() {
if (UseCelsius) {
return (float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
} else {
return (float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) * 1.8f + 32;
}
}inline float getHeatIndexF() {
if (UseCelsius) {
return ((float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals) -32) * 0.56f;
} else {
return (float)roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals);
}
}
// Publish Sensor Information to Info Page
void addToJsonInfo(JsonObject &root)
{
JsonObject user = root[F("u")];
if (user.isNull()) user = root.createNestedObject(F("u"));
if (sensorType==0) //No Sensor
{
// if we sensor not detected, let the user know
JsonArray temperature_json = user.createNestedArray(F("BME/BMP280 Sensor"));
temperature_json.add(F("Not Found"));
}
else if (sensorType==2) //BMP280
{
JsonArray temperature_json = user.createNestedArray(F("Temperature"));
JsonArray pressure_json = user.createNestedArray(F("Pressure"));
temperature_json.add(roundf(sensorTemperature * powf(10, TemperatureDecimals)));
temperature_json.add(tempScale);
pressure_json.add(roundf(sensorPressure * powf(10, PressureDecimals)));
pressure_json.add(F("hPa"));
}
else if (sensorType==1) //BME280
{
JsonArray temperature_json = user.createNestedArray(F("Temperature"));
JsonArray humidity_json = user.createNestedArray(F("Humidity"));
JsonArray pressure_json = user.createNestedArray(F("Pressure"));
JsonArray heatindex_json = user.createNestedArray(F("Heat Index"));
JsonArray dewpoint_json = user.createNestedArray(F("Dew Point"));
temperature_json.add(roundf(sensorTemperature * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
temperature_json.add(tempScale);
humidity_json.add(roundf(sensorHumidity * powf(10, HumidityDecimals)));
humidity_json.add(F("%"));
pressure_json.add(roundf(sensorPressure * powf(10, PressureDecimals)));
pressure_json.add(F("hPa"));
heatindex_json.add(roundf(sensorHeatIndex * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
heatindex_json.add(tempScale);
dewpoint_json.add(roundf(sensorDewPoint * powf(10, TemperatureDecimals)) / powf(10, TemperatureDecimals));
dewpoint_json.add(tempScale);
}
return;
}
// Save Usermod Config Settings
void addToConfig(JsonObject& root)
{
JsonObject top = root.createNestedObject(F("BME280/BMP280"));
top[F("TemperatureDecimals")] = TemperatureDecimals;
top[F("HumidityDecimals")] = HumidityDecimals;
top[F("PressureDecimals")] = PressureDecimals;
top[F("TemperatureInterval")] = TemperatureInterval;
top[F("PressureInterval")] = PressureInterval;
top[F("PublishAlways")] = PublishAlways;
top[F("UseCelsius")] = UseCelsius;
top[F("HomeAssistantDiscovery")] = HomeAssistantDiscovery;
JsonArray io_pin = top.createNestedArray(F("pin"));
for (byte i=0; i<2; i++) io_pin.add(ioPin[i]);
top[F("help4Pins")] = F("SCL,SDA"); // help for Settings page
DEBUG_PRINTLN(F("BME280 config saved."));
}
// Read Usermod Config Settings
bool readFromConfig(JsonObject& root)
{
// default settings values could be set here (or below using the 3-argument getJsonValue()) instead of in the class definition or constructor
// setting them inside readFromConfig() is slightly more robust, handling the rare but plausible use case of single value being missing after boot (e.g. if the cfg.json was manually edited and a value was removed)
int8_t newPin[2]; for (byte i=0; i<2; i++) newPin[i] = ioPin[i]; // prepare to note changed pins
JsonObject top = root[F("BME280/BMP280")];
if (top.isNull()) {
DEBUG_PRINT(F("BME280/BMP280"));
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
bool configComplete = !top.isNull();
// A 3-argument getJsonValue() assigns the 3rd argument as a default value if the Json value is missing
configComplete &= getJsonValue(top[F("TemperatureDecimals")], TemperatureDecimals, 1);
configComplete &= getJsonValue(top[F("HumidityDecimals")], HumidityDecimals, 0);
configComplete &= getJsonValue(top[F("PressureDecimals")], PressureDecimals, 0);
configComplete &= getJsonValue(top[F("TemperatureInterval")], TemperatureInterval, 30);
configComplete &= getJsonValue(top[F("PressureInterval")], PressureInterval, 30);
configComplete &= getJsonValue(top[F("PublishAlways")], PublishAlways, false);
configComplete &= getJsonValue(top[F("UseCelsius")], UseCelsius, true);
configComplete &= getJsonValue(top[F("HomeAssistantDiscovery")], HomeAssistantDiscovery, false);
for (byte i=0; i<2; i++) configComplete &= getJsonValue(top[F("pin")][i], newPin[i], ioPin[i]);
DEBUG_PRINT(FPSTR(F("BME280/BMP280")));
if (!initDone) {
// first run: reading from cfg.json
for (byte i=0; i<2; i++) ioPin[i] = newPin[i];
DEBUG_PRINTLN(F(" config loaded."));
} else {
DEBUG_PRINTLN(F(" config (re)loaded."));
// changing parameters from settings page
bool pinsChanged = false;
for (byte i=0; i<2; i++) if (ioPin[i] != newPin[i]) { pinsChanged = true; break; } // check if any pins changed
if (pinsChanged) { //if pins changed, deallocate old pins and allocate new ones
PinOwner po = PinOwner::UM_BME280;
if (ioPin[0]==HW_PIN_SCL && ioPin[1]==HW_PIN_SDA) po = PinOwner::HW_I2C; // allow multiple allocations of HW I2C bus pins
pinManager.deallocateMultiplePins((const uint8_t *)ioPin, 2, po); // deallocate pins
for (byte i=0; i<2; i++) ioPin[i] = newPin[i];
setup();
}
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
return !top[F("pin")].isNull();
}
return configComplete;
}
uint16_t getId() {
return USERMOD_ID_BME280;
}
};

View File

@@ -0,0 +1,8 @@
# Cronixie clock usermod
This usermod supports driving the Cronixie M and L clock kits by Diamex.
## Installation
Compile and upload after adding `-D USERMOD_CRONIXIE` to `build_flags` of your PlatformIO environment.
Make sure the Auto Brightness Limiter is enabled at 420mA (!) and configure 60 WS281x LEDs.

View File

@@ -0,0 +1,301 @@
#pragma once
#include "wled.h"
class UsermodCronixie : public Usermod {
private:
unsigned long lastTime = 0;
char cronixieDisplay[7] = "HHMMSS";
byte _digitOut[6] = {10,10,10,10,10,10};
byte dP[6] = {255, 255, 255, 255, 255, 255};
// set your config variables to their boot default value (this can also be done in readFromConfig() or a constructor if you prefer)
bool backlight = true;
public:
void initCronixie()
{
if (dP[0] == 255) // if dP[0] is 255, cronixie is not yet init'ed
{
setCronixie();
strip.getSegment(0).grouping = 10; // 10 LEDs per digit
}
}
void setup() {
}
void loop() {
if (!toki.isTick()) return;
initCronixie();
_overlayCronixie();
strip.trigger();
}
byte getSameCodeLength(char code, int index, char const cronixieDisplay[])
{
byte counter = 0;
for (int i = index+1; i < 6; i++)
{
if (cronixieDisplay[i] == code)
{
counter++;
} else {
return counter;
}
}
return counter;
}
void setCronixie()
{
/*
* digit purpose index
* 0-9 | 0-9 (incl. random)
* 10 | blank
* 11 | blank, bg off
* 12 | test upw.
* 13 | test dnw.
* 14 | binary AM/PM
* 15 | BB upper +50 for no trailing 0
* 16 | BBB
* 17 | BBBB
* 18 | BBBBB
* 19 | BBBBBB
* 20 | H
* 21 | HH
* 22 | HHH
* 23 | HHHH
* 24 | M
* 25 | MM
* 26 | MMM
* 27 | MMMM
* 28 | MMMMM
* 29 | MMMMMM
* 30 | S
* 31 | SS
* 32 | SSS
* 33 | SSSS
* 34 | SSSSS
* 35 | SSSSSS
* 36 | Y
* 37 | YY
* 38 | YYYY
* 39 | I
* 40 | II
* 41 | W
* 42 | WW
* 43 | D
* 44 | DD
* 45 | DDD
* 46 | V
* 47 | VV
* 48 | VVV
* 49 | VVVV
* 50 | VVVVV
* 51 | VVVVVV
* 52 | v
* 53 | vv
* 54 | vvv
* 55 | vvvv
* 56 | vvvvv
* 57 | vvvvvv
*/
//H HourLower | HH - Hour 24. | AH - Hour 12. | HHH Hour of Month | HHHH Hour of Year
//M MinuteUpper | MM Minute of Hour | MMM Minute of 12h | MMMM Minute of Day | MMMMM Minute of Month | MMMMMM Minute of Year
//S SecondUpper | SS Second of Minute | SSS Second of 10 Minute | SSSS Second of Hour | SSSSS Second of Day | SSSSSS Second of Week
//B AM/PM | BB 0-6/6-12/12-18/18-24 | BBB 0-3... | BBBB 0-1.5... | BBBBB 0-1 | BBBBBB 0-0.5
//Y YearLower | YY - Year LU | YYYY - Std.
//I MonthLower | II - Month of Year
//W Week of Month | WW Week of Year
//D Day of Week | DD Day Of Month | DDD Day Of Year
DEBUG_PRINT("cset ");
DEBUG_PRINTLN(cronixieDisplay);
for (int i = 0; i < 6; i++)
{
dP[i] = 10;
switch (cronixieDisplay[i])
{
case '_': dP[i] = 10; break;
case '-': dP[i] = 11; break;
case 'r': dP[i] = random(1,7); break; //random btw. 1-6
case 'R': dP[i] = random(0,10); break; //random btw. 0-9
//case 't': break; //Test upw.
//case 'T': break; //Test dnw.
case 'b': dP[i] = 14 + getSameCodeLength('b',i,cronixieDisplay); i = i+dP[i]-14; break;
case 'B': dP[i] = 14 + getSameCodeLength('B',i,cronixieDisplay); i = i+dP[i]-14; break;
case 'h': dP[i] = 70 + getSameCodeLength('h',i,cronixieDisplay); i = i+dP[i]-70; break;
case 'H': dP[i] = 20 + getSameCodeLength('H',i,cronixieDisplay); i = i+dP[i]-20; break;
case 'A': dP[i] = 108; i++; break;
case 'a': dP[i] = 58; i++; break;
case 'm': dP[i] = 74 + getSameCodeLength('m',i,cronixieDisplay); i = i+dP[i]-74; break;
case 'M': dP[i] = 24 + getSameCodeLength('M',i,cronixieDisplay); i = i+dP[i]-24; break;
case 's': dP[i] = 80 + getSameCodeLength('s',i,cronixieDisplay); i = i+dP[i]-80; break; //refresh more often bc. of secs
case 'S': dP[i] = 30 + getSameCodeLength('S',i,cronixieDisplay); i = i+dP[i]-30; break;
case 'Y': dP[i] = 36 + getSameCodeLength('Y',i,cronixieDisplay); i = i+dP[i]-36; break;
case 'y': dP[i] = 86 + getSameCodeLength('y',i,cronixieDisplay); i = i+dP[i]-86; break;
case 'I': dP[i] = 39 + getSameCodeLength('I',i,cronixieDisplay); i = i+dP[i]-39; break; //Month. Don't ask me why month and minute both start with M.
case 'i': dP[i] = 89 + getSameCodeLength('i',i,cronixieDisplay); i = i+dP[i]-89; break;
//case 'W': break;
//case 'w': break;
case 'D': dP[i] = 43 + getSameCodeLength('D',i,cronixieDisplay); i = i+dP[i]-43; break;
case 'd': dP[i] = 93 + getSameCodeLength('d',i,cronixieDisplay); i = i+dP[i]-93; break;
case '0': dP[i] = 0; break;
case '1': dP[i] = 1; break;
case '2': dP[i] = 2; break;
case '3': dP[i] = 3; break;
case '4': dP[i] = 4; break;
case '5': dP[i] = 5; break;
case '6': dP[i] = 6; break;
case '7': dP[i] = 7; break;
case '8': dP[i] = 8; break;
case '9': dP[i] = 9; break;
//case 'V': break; //user var0
//case 'v': break; //user var1
}
}
DEBUG_PRINT("result ");
for (int i = 0; i < 5; i++)
{
DEBUG_PRINT((int)dP[i]);
DEBUG_PRINT(" ");
}
DEBUG_PRINTLN((int)dP[5]);
_overlayCronixie(); // refresh
}
void _overlayCronixie()
{
byte h = hour(localTime);
byte h0 = h;
byte m = minute(localTime);
byte s = second(localTime);
byte d = day(localTime);
byte mi = month(localTime);
int y = year(localTime);
//this has to be changed in time for 22nd century
y -= 2000; if (y<0) y += 30; //makes countdown work
if (useAMPM && !countdownMode)
{
if (h>12) h-=12;
else if (h==0) h+=12;
}
for (int i = 0; i < 6; i++)
{
if (dP[i] < 12) _digitOut[i] = dP[i];
else {
if (dP[i] < 65)
{
switch(dP[i])
{
case 21: _digitOut[i] = h/10; _digitOut[i+1] = h- _digitOut[i]*10; i++; break; //HH
case 25: _digitOut[i] = m/10; _digitOut[i+1] = m- _digitOut[i]*10; i++; break; //MM
case 31: _digitOut[i] = s/10; _digitOut[i+1] = s- _digitOut[i]*10; i++; break; //SS
case 20: _digitOut[i] = h- (h/10)*10; break; //H
case 24: _digitOut[i] = m/10; break; //M
case 30: _digitOut[i] = s/10; break; //S
case 43: _digitOut[i] = weekday(localTime); _digitOut[i]--; if (_digitOut[i]<1) _digitOut[i]= 7; break; //D
case 44: _digitOut[i] = d/10; _digitOut[i+1] = d- _digitOut[i]*10; i++; break; //DD
case 40: _digitOut[i] = mi/10; _digitOut[i+1] = mi- _digitOut[i]*10; i++; break; //II
case 37: _digitOut[i] = y/10; _digitOut[i+1] = y- _digitOut[i]*10; i++; break; //YY
case 39: _digitOut[i] = 2; _digitOut[i+1] = 0; _digitOut[i+2] = y/10; _digitOut[i+3] = y- _digitOut[i+2]*10; i+=3; break; //YYYY
//case 16: _digitOut[i+2] = ((h0/3)&1)?1:0; i++; //BBB (BBBB NI)
//case 15: _digitOut[i+1] = (h0>17 || (h0>5 && h0<12))?1:0; i++; //BB
case 14: _digitOut[i] = (h0>11)?1:0; break; //B
}
} else
{
switch(dP[i])
{
case 71: _digitOut[i] = h/10; _digitOut[i+1] = h- _digitOut[i]*10; if(_digitOut[i] == 0) _digitOut[i]=10; i++; break; //hh
case 75: _digitOut[i] = m/10; _digitOut[i+1] = m- _digitOut[i]*10; if(_digitOut[i] == 0) _digitOut[i]=10; i++; break; //mm
case 81: _digitOut[i] = s/10; _digitOut[i+1] = s- _digitOut[i]*10; if(_digitOut[i] == 0) _digitOut[i]=10; i++; break; //ss
//case 66: _digitOut[i+2] = ((h0/3)&1)?1:10; i++; //bbb (bbbb NI)
//case 65: _digitOut[i+1] = (h0>17 || (h0>5 && h0<12))?1:10; i++; //bb
case 64: _digitOut[i] = (h0>11)?1:10; break; //b
case 93: _digitOut[i] = weekday(localTime); _digitOut[i]--; if (_digitOut[i]<1) _digitOut[i]= 7; break; //d
case 94: _digitOut[i] = d/10; _digitOut[i+1] = d- _digitOut[i]*10; if(_digitOut[i] == 0) _digitOut[i]=10; i++; break; //dd
case 90: _digitOut[i] = mi/10; _digitOut[i+1] = mi- _digitOut[i]*10; if(_digitOut[i] == 0) _digitOut[i]=10; i++; break; //ii
case 87: _digitOut[i] = y/10; _digitOut[i+1] = y- _digitOut[i]*10; i++; break; //yy
case 89: _digitOut[i] = 2; _digitOut[i+1] = 0; _digitOut[i+2] = y/10; _digitOut[i+3] = y- _digitOut[i+2]*10; i+=3; break; //yyyy
}
}
}
}
}
void handleOverlayDraw()
{
byte offsets[] = {5, 0, 6, 1, 7, 2, 8, 3, 9, 4};
for (uint16_t i = 0; i < 6; i++)
{
byte o = 10*i;
byte excl = 10;
if(_digitOut[i] < 10) excl = offsets[_digitOut[i]];
excl += o;
if (backlight && _digitOut[i] <11)
{
uint32_t col = strip.gamma32(strip.getSegment(0).colors[1]);
for (uint16_t j=o; j< o+10; j++) {
if (j != excl) strip.setPixelColor(j, col);
}
} else
{
for (uint16_t j=o; j< o+10; j++) {
if (j != excl) strip.setPixelColor(j, 0);
}
}
}
}
void addToJsonState(JsonObject& root)
{
root["nx"] = cronixieDisplay;
}
void readFromJsonState(JsonObject& root)
{
if (root["nx"].is<const char*>()) {
strncpy(cronixieDisplay, root["nx"], 6);
}
}
void addToConfig(JsonObject& root)
{
JsonObject top = root.createNestedObject(F("Cronixie"));
top["backlight"] = backlight;
}
bool readFromConfig(JsonObject& root)
{
// default settings values could be set here (or below using the 3-argument getJsonValue()) instead of in the class definition or constructor
// setting them inside readFromConfig() is slightly more robust, handling the rare but plausible use case of single value being missing after boot (e.g. if the cfg.json was manually edited and a value was removed)
JsonObject top = root[F("Cronixie")];
bool configComplete = !top.isNull();
configComplete &= getJsonValue(top["backlight"], backlight);
return configComplete;
}
uint16_t getId()
{
return USERMOD_ID_CRONIXIE;
}
};

View File

@@ -0,0 +1,22 @@
; Options
; -------
; USERMOD_DHT - define this to have this user mod included wled00\usermods_list.cpp
; USERMOD_DHT_DHTTYPE - DHT model: 11, 21, 22 for DHT11, DHT21, or DHT22, defaults to 22/DHT22
; USERMOD_DHT_PIN - pin to which DTH is connected, defaults to Q2 pin on QuinLed Dig-Uno's board
; USERMOD_DHT_CELSIUS - define this to report temperatures in degrees celsious, otherwise fahrenheit will be reported
; USERMOD_DHT_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds
; USERMOD_DHT_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 90 seconds
; USERMOD_DHT_STATS - For debug, report delay stats
[env:d1_mini_usermod_dht_C]
extends = env:d1_mini
build_flags = ${env:d1_mini.build_flags} -D USERMOD_DHT -D USERMOD_DHT_CELSIUS
lib_deps = ${env.lib_deps}
https://github.com/alwynallan/DHT_nonblocking
[env:custom32_LEDPIN_16_usermod_dht_C]
extends = env:custom32_LEDPIN_16
build_flags = ${env:custom32_LEDPIN_16.build_flags} -D USERMOD_DHT -D USERMOD_DHT_CELSIUS -D USERMOD_DHT_STATS
lib_deps = ${env.lib_deps}
https://github.com/alwynallan/DHT_nonblocking

41
usermods/DHT/readme.md Normal file
View File

@@ -0,0 +1,41 @@
# DHT Temperature/Humidity sensor usermod
This usermod will read from an attached DHT22 or DHT11 humidity and temperature sensor.
The sensor readings are displayed in the Info section of the web UI.
If sensor is not detected after a while (10 update intervals), this usermod will be disabled.
## Installation
Copy the example `platformio_override.ini` to the root directory. This file should be placed in the same directory as `platformio.ini`.
### Define Your Options
* `USERMOD_DHT` - define this to have this user mod included wled00\usermods_list.cpp
* `USERMOD_DHT_DHTTYPE` - DHT model: 11, 21, 22 for DHT11, DHT21, or DHT22, defaults to 22/DHT22
* `USERMOD_DHT_PIN` - pin to which DTH is connected, defaults to Q2 pin on QuinLed Dig-Uno's board
* `USERMOD_DHT_CELSIUS` - define this to report temperatures in degrees celsious, otherwise fahrenheit will be reported
* `USERMOD_DHT_MEASUREMENT_INTERVAL` - the number of milliseconds between measurements, defaults to 60 seconds
* `USERMOD_DHT_FIRST_MEASUREMENT_AT` - the number of milliseconds after boot to take first measurement, defaults to 90 seconds
* `USERMOD_DHT_STATS` - For debug, report delay stats
## Project link
* [QuinLED-Dig-Uno](https://quinled.info/2018/09/15/quinled-dig-uno/) - Project link
### PlatformIO requirements
If you are using `platformio_override.ini`, you should be able to refresh the task list and see your custom task, for example `env:d1_mini_usermod_dht_C`. If not, you can add the libraries and dependencies into `platformio.ini` as you see fit.
## Change Log
2020-02-04
* Change default QuinLed pin to Q2
* Instead of trying to keep updates at constant cadence, space readings out by measurement interval; hope this helps to avoid occasional bursts of readings with errors
* Add some more (optional) stats
2020-02-03
* Due to poor readouts on ESP32 with previous DHT library, rewrote to use https://github.com/alwynallan/DHT_nonblocking
* The new library serializes/delays up to 5ms for the sensor readout
2020-02-02
* Created

216
usermods/DHT/usermod_dht.h Normal file
View File

@@ -0,0 +1,216 @@
#pragma once
#include "wled.h"
#include <dht_nonblocking.h>
// USERMOD_DHT_DHTTYPE:
// 11 // DHT 11
// 21 // DHT 21
// 22 // DHT 22 (AM2302), AM2321 *** default
#ifndef USERMOD_DHT_DHTTYPE
#define USERMOD_DHT_DHTTYPE 22
#endif
#if USERMOD_DHT_DHTTYPE == 11
#define DHTTYPE DHT_TYPE_11
#elif USERMOD_DHT_DHTTYPE == 21
#define DHTTYPE DHT_TYPE_21
#elif USERMOD_DHT_DHTTYPE == 22
#define DHTTYPE DHT_TYPE_22
#endif
// Connect pin 1 (on the left) of the sensor to +5V
// NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1
// to 3.3V instead of 5V!
// Connect pin 2 of the sensor to whatever your DHTPIN is
// NOTE: Pin defaults below are for QuinLed Dig-Uno's Q2 on the board
// Connect pin 4 (on the right) of the sensor to GROUND
// NOTE: If using a bare sensor (AM*), Connect a 10K resistor from pin 2
// (data) to pin 1 (power) of the sensor. DHT* boards have the pullup already
#ifdef USERMOD_DHT_PIN
#define DHTPIN USERMOD_DHT_PIN
#else
#ifdef ARDUINO_ARCH_ESP32
#define DHTPIN 21
#else //ESP8266 boards
#define DHTPIN 4
#endif
#endif
// the frequency to check sensor, 1 minute
#ifndef USERMOD_DHT_MEASUREMENT_INTERVAL
#define USERMOD_DHT_MEASUREMENT_INTERVAL 60000
#endif
// how many seconds after boot to take first measurement, 90 seconds
// 90 gives enough time to OTA update firmware if this crashses
#ifndef USERMOD_DHT_FIRST_MEASUREMENT_AT
#define USERMOD_DHT_FIRST_MEASUREMENT_AT 90000
#endif
// from COOLDOWN_TIME in dht_nonblocking.cpp
#define DHT_TIMEOUT_TIME 10000
DHT_nonblocking dht_sensor(DHTPIN, DHTTYPE);
class UsermodDHT : public Usermod {
private:
unsigned long nextReadTime = 0;
unsigned long lastReadTime = 0;
float humidity, temperature = 0;
bool initializing = true;
bool disabled = false;
#ifdef USERMOD_DHT_STATS
unsigned long nextResetStatsTime = 0;
uint16_t updates = 0;
uint16_t clean_updates = 0;
uint16_t errors = 0;
unsigned long maxDelay = 0;
unsigned long currentIteration = 0;
unsigned long maxIteration = 0;
#endif
public:
void setup() {
nextReadTime = millis() + USERMOD_DHT_FIRST_MEASUREMENT_AT;
lastReadTime = millis();
#ifdef USERMOD_DHT_STATS
nextResetStatsTime = millis() + 60*60*1000;
#endif
}
void loop() {
if (disabled) {
return;
}
if (millis() < nextReadTime) {
return;
}
#ifdef USERMOD_DHT_STATS
if (millis() >= nextResetStatsTime) {
nextResetStatsTime += 60*60*1000;
errors = 0;
updates = 0;
clean_updates = 0;
}
unsigned long dcalc = millis();
if (currentIteration == 0) {
currentIteration = millis();
}
#endif
float tempC;
if (dht_sensor.measure(&tempC, &humidity)) {
#ifdef USERMOD_DHT_CELSIUS
temperature = tempC;
#else
temperature = tempC * 9 / 5 + 32;
#endif
nextReadTime = millis() + USERMOD_DHT_MEASUREMENT_INTERVAL;
lastReadTime = millis();
initializing = false;
#ifdef USERMOD_DHT_STATS
unsigned long icalc = millis() - currentIteration;
if (icalc > maxIteration) {
maxIteration = icalc;
}
if (icalc > DHT_TIMEOUT_TIME) {
errors += icalc/DHT_TIMEOUT_TIME;
} else {
clean_updates += 1;
}
updates += 1;
currentIteration = 0;
#endif
}
#ifdef USERMOD_DHT_STATS
dcalc = millis() - dcalc;
if (dcalc > maxDelay) {
maxDelay = dcalc;
}
#endif
if (((millis() - lastReadTime) > 10*USERMOD_DHT_MEASUREMENT_INTERVAL)) {
disabled = true;
}
}
void addToJsonInfo(JsonObject& root) {
if (disabled) {
return;
}
JsonObject user = root["u"];
if (user.isNull()) user = root.createNestedObject("u");
JsonArray temp = user.createNestedArray("Temperature");
JsonArray hum = user.createNestedArray("Humidity");
#ifdef USERMOD_DHT_STATS
JsonArray next = user.createNestedArray("next");
if (nextReadTime >= millis()) {
next.add((nextReadTime - millis()) / 1000);
next.add(" sec until read");
} else {
next.add((millis() - nextReadTime) / 1000);
next.add(" sec active reading");
}
JsonArray last = user.createNestedArray("last");
last.add((millis() - lastReadTime) / 60000);
last.add(" min since read");
JsonArray err = user.createNestedArray("errors");
err.add(errors);
err.add(" Errors");
JsonArray upd = user.createNestedArray("updates");
upd.add(updates);
upd.add(" Updates");
JsonArray cupd = user.createNestedArray("cleanUpdates");
cupd.add(clean_updates);
cupd.add(" Updates");
JsonArray iter = user.createNestedArray("maxIter");
iter.add(maxIteration);
iter.add(" ms");
JsonArray delay = user.createNestedArray("maxDelay");
delay.add(maxDelay);
delay.add(" ms");
#endif
if (initializing) {
// if we haven't read the sensor yet, let the user know
// that we are still waiting for the first measurement
temp.add((nextReadTime - millis()) / 1000);
temp.add(" sec until read");
hum.add((nextReadTime - millis()) / 1000);
hum.add(" sec until read");
return;
}
hum.add(humidity);
hum.add("%");
temp.add(temperature);
#ifdef USERMOD_DHT_CELSIUS
temp.add("°C");
#else
temp.add("°F");
#endif
}
uint16_t getId()
{
return USERMOD_ID_DHT;
}
};

View File

@@ -0,0 +1,10 @@
# Usermods API v2 example usermod
In this usermod file you can find the documentation on how to take advantage of the new version 2 usermods!
## Installation
Copy `usermod_v2_example.h` to the wled00 directory.
Uncomment the corresponding lines in `usermods_list.cpp` and compile!
_(You shouldn't need to actually install this, it does nothing useful)_

View File

@@ -0,0 +1,233 @@
#pragma once
#include "wled.h"
/*
* Usermods allow you to add own functionality to WLED more easily
* See: https://github.com/Aircoookie/WLED/wiki/Add-own-functionality
*
* This is an example for a v2 usermod.
* v2 usermods are class inheritance based and can (but don't have to) implement more functions, each of them is shown in this example.
* Multiple v2 usermods can be added to one compilation easily.
*
* Creating a usermod:
* This file serves as an example. If you want to create a usermod, it is recommended to use usermod_v2_empty.h from the usermods folder as a template.
* Please remember to rename the class and file to a descriptive name.
* You may also use multiple .h and .cpp files.
*
* Using a usermod:
* 1. Copy the usermod into the sketch folder (same folder as wled00.ino)
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp
*/
//class name. Use something descriptive and leave the ": public Usermod" part :)
class MyExampleUsermod : public Usermod {
private:
//Private class members. You can declare variables and functions only accessible to your usermod here
unsigned long lastTime = 0;
// set your config variables to their boot default value (this can also be done in readFromConfig() or a constructor if you prefer)
bool testBool = false;
unsigned long testULong = 42424242;
float testFloat = 42.42;
String testString = "Forty-Two";
// These config variables have defaults set inside readFromConfig()
int testInt;
long testLong;
int8_t testPins[2];
public:
//Functions called by WLED
/*
* setup() is called once at boot. WiFi is not yet connected at this point.
* You can use it to initialize variables, sensors or similar.
*/
void setup() {
//Serial.println("Hello from my usermod!");
}
/*
* connected() is called every time the WiFi is (re)connected
* Use it to initialize network interfaces
*/
void connected() {
//Serial.println("Connected to WiFi!");
}
/*
* loop() is called continuously. Here you can check for events, read sensors, etc.
*
* Tips:
* 1. You can use "if (WLED_CONNECTED)" to check for a successful network connection.
* Additionally, "if (WLED_MQTT_CONNECTED)" is available to check for a connection to an MQTT broker.
*
* 2. Try to avoid using the delay() function. NEVER use delays longer than 10 milliseconds.
* Instead, use a timer check as shown here.
*/
void loop() {
if (millis() - lastTime > 1000) {
//Serial.println("I'm alive!");
lastTime = millis();
}
}
/*
* addToJsonInfo() can be used to add custom entries to the /json/info part of the JSON API.
* Creating an "u" object allows you to add custom key/value pairs to the Info section of the WLED web UI.
* Below it is shown how this could be used for e.g. a light sensor
*/
/*
void addToJsonInfo(JsonObject& root)
{
int reading = 20;
//this code adds "u":{"Light":[20," lux"]} to the info object
JsonObject user = root["u"];
if (user.isNull()) user = root.createNestedObject("u");
JsonArray lightArr = user.createNestedArray("Light"); //name
lightArr.add(reading); //value
lightArr.add(" lux"); //unit
}
*/
/*
* addToJsonState() can be used to add custom entries to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void addToJsonState(JsonObject& root)
{
//root["user0"] = userVar0;
}
/*
* readFromJsonState() can be used to receive data clients send to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void readFromJsonState(JsonObject& root)
{
userVar0 = root["user0"] | userVar0; //if "user0" key exists in JSON, update, else keep old value
//if (root["bri"] == 255) Serial.println(F("Don't burn down your garage!"));
}
/*
* addToConfig() can be used to add custom persistent settings to the cfg.json file in the "um" (usermod) object.
* It will be called by WLED when settings are actually saved (for example, LED settings are saved)
* If you want to force saving the current state, use serializeConfig() in your loop().
*
* CAUTION: serializeConfig() will initiate a filesystem write operation.
* It might cause the LEDs to stutter and will cause flash wear if called too often.
* Use it sparingly and always in the loop, never in network callbacks!
*
* addToConfig() will make your settings editable through the Usermod Settings page automatically.
*
* Usermod Settings Overview:
* - Numeric values are treated as floats in the browser.
* - If the numeric value entered into the browser contains a decimal point, it will be parsed as a C float
* before being returned to the Usermod. The float data type has only 6-7 decimal digits of precision, and
* doubles are not supported, numbers will be rounded to the nearest float value when being parsed.
* The range accepted by the input field is +/- 1.175494351e-38 to +/- 3.402823466e+38.
* - If the numeric value entered into the browser doesn't contain a decimal point, it will be parsed as a
* C int32_t (range: -2147483648 to 2147483647) before being returned to the usermod.
* Overflows or underflows are truncated to the max/min value for an int32_t, and again truncated to the type
* used in the Usermod when reading the value from ArduinoJson.
* - Pin values can be treated differently from an integer value by using the key name "pin"
* - "pin" can contain a single or array of integer values
* - On the Usermod Settings page there is simple checking for pin conflicts and warnings for special pins
* - Red color indicates a conflict. Yellow color indicates a pin with a warning (e.g. an input-only pin)
* - Tip: use int8_t to store the pin value in the Usermod, so a -1 value (pin not set) can be used
*
* See usermod_v2_auto_save.h for an example that saves Flash space by reusing ArduinoJson key name strings
*
* If you need a dedicated settings page with custom layout for your Usermod, that takes a lot more work.
* You will have to add the setting to the HTML, xml.cpp and set.cpp manually.
* See the WLED Soundreactive fork (code and wiki) for reference. https://github.com/atuline/WLED
*
* I highly recommend checking out the basics of ArduinoJson serialization and deserialization in order to use custom settings!
*/
void addToConfig(JsonObject& root)
{
JsonObject top = root.createNestedObject("exampleUsermod");
top["great"] = userVar0; //save these vars persistently whenever settings are saved
top["testBool"] = testBool;
top["testInt"] = testInt;
top["testLong"] = testLong;
top["testULong"] = testULong;
top["testFloat"] = testFloat;
top["testString"] = testString;
JsonArray pinArray = top.createNestedArray("pin");
pinArray.add(testPins[0]);
pinArray.add(testPins[1]);
}
/*
* readFromConfig() can be used to read back the custom settings you added with addToConfig().
* This is called by WLED when settings are loaded (currently this only happens immediately after boot, or after saving on the Usermod Settings page)
*
* readFromConfig() is called BEFORE setup(). This means you can use your persistent values in setup() (e.g. pin assignments, buffer sizes),
* but also that if you want to write persistent values to a dynamic buffer, you'd need to allocate it here instead of in setup.
* If you don't know what that is, don't fret. It most likely doesn't affect your use case :)
*
* Return true in case the config values returned from Usermod Settings were complete, or false if you'd like WLED to save your defaults to disk (so any missing values are editable in Usermod Settings)
*
* getJsonValue() returns false if the value is missing, or copies the value into the variable provided and returns true if the value is present
* The configComplete variable is true only if the "exampleUsermod" object and all values are present. If any values are missing, WLED will know to call addToConfig() to save them
*
* This function is guaranteed to be called on boot, but could also be called every time settings are updated
*/
bool readFromConfig(JsonObject& root)
{
// default settings values could be set here (or below using the 3-argument getJsonValue()) instead of in the class definition or constructor
// setting them inside readFromConfig() is slightly more robust, handling the rare but plausible use case of single value being missing after boot (e.g. if the cfg.json was manually edited and a value was removed)
JsonObject top = root["exampleUsermod"];
bool configComplete = !top.isNull();
configComplete &= getJsonValue(top["great"], userVar0);
configComplete &= getJsonValue(top["testBool"], testBool);
configComplete &= getJsonValue(top["testULong"], testULong);
configComplete &= getJsonValue(top["testFloat"], testFloat);
configComplete &= getJsonValue(top["testString"], testString);
// A 3-argument getJsonValue() assigns the 3rd argument as a default value if the Json value is missing
configComplete &= getJsonValue(top["testInt"], testInt, 42);
configComplete &= getJsonValue(top["testLong"], testLong, -42424242);
configComplete &= getJsonValue(top["pin"][0], testPins[0], -1);
configComplete &= getJsonValue(top["pin"][1], testPins[1], -1);
return configComplete;
}
/*
* handleOverlayDraw() is called just before every show() (LED strip update frame) after effects have set the colors.
* Use this to blank out some LEDs or set them to a different color regardless of the set effect mode.
* Commonly used for custom clocks (Cronixie, 7 segment)
*/
void handleOverlayDraw()
{
//strip.setPixelColor(0, RGBW32(0,0,0,0)) // set the first pixel to black
}
/*
* getId() allows you to optionally give your V2 usermod an unique ID (please define it in const.h!).
* This could be used in the future for the system to determine whether your usermod is installed.
*/
uint16_t getId()
{
return USERMOD_ID_EXAMPLE;
}
//More methods can be added in the future, this example will then be extended.
//Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class!
};

View File

@@ -0,0 +1,70 @@
#ifndef CHIP_SELECT_H
#define CHIP_SELECT_H
#include "Hardware.h"
/*
* `digit`s are as defined in Hardware.h, 0 == seconds ones, 5 == hours tens.
*/
class ChipSelect {
private:
uint8_t digits_map;
const uint8_t all_on = 0x3F;
const uint8_t all_off = 0x00;
public:
ChipSelect() : digits_map(all_off) {}
void update() {
// Documented in README.md. Q7 and Q6 are unused. Q5 is Seconds Ones, Q0 is Hours Tens.
// Q7 is the first bit written, Q0 is the last. So we push two dummy bits, then start with
// Seconds Ones and end with Hours Tens.
// CS is Active Low, but digits_map is 1 for enable, 0 for disable. So we bit-wise NOT first.
uint8_t to_shift = (~digits_map) << 2;
digitalWrite(CSSR_LATCH_PIN, LOW);
shiftOut(CSSR_DATA_PIN, CSSR_CLOCK_PIN, LSBFIRST, to_shift);
digitalWrite(CSSR_LATCH_PIN, HIGH);
}
void begin()
{
pinMode(CSSR_LATCH_PIN, OUTPUT);
pinMode(CSSR_DATA_PIN, OUTPUT);
pinMode(CSSR_CLOCK_PIN, OUTPUT);
digitalWrite(CSSR_DATA_PIN, LOW);
digitalWrite(CSSR_CLOCK_PIN, LOW);
digitalWrite(CSSR_LATCH_PIN, LOW);
update();
}
// These speak the indexes defined in Hardware.h.
// So 0 is disabled, 1 is enabled (even though CS is active low, this gets mapped.)
// So bit 0 (LSB), is index 0, is SECONDS_ONES
// Translation to what the 74HC595 uses is done in update()
void setDigitMap(uint8_t map, bool update_=true) { digits_map = map; if (update_) update(); }
uint8_t getDigitMap() { return digits_map; }
// Helper functions
// Sets just the one digit by digit number
void setDigit(uint8_t digit, bool update_=true) { setDigitMap(0x01 << digit, update_); }
void setAll(bool update_=true) { setDigitMap(all_on, update_); }
void clear(bool update_=true) { setDigitMap(all_off, update_); }
void setSecondsOnes() { setDigit(SECONDS_ONES); }
void setSecondsTens() { setDigit(SECONDS_TENS); }
void setMinutesOnes() { setDigit(MINUTES_ONES); }
void setMinutesTens() { setDigit(MINUTES_TENS); }
void setHoursOnes() { setDigit(HOURS_ONES); }
void setHoursTens() { setDigit(HOURS_TENS); }
bool isSecondsOnes() { return ((digits_map & SECONDS_ONES_MAP) > 0); }
bool isSecondsTens() { return ((digits_map & SECONDS_TENS_MAP) > 0); }
bool isMinutesOnes() { return ((digits_map & MINUTES_ONES_MAP) > 0); }
bool isMinutesTens() { return ((digits_map & MINUTES_TENS_MAP) > 0); }
bool isHoursOnes() { return ((digits_map & HOURS_ONES_MAP) > 0); }
bool isHoursTens() { return ((digits_map & HOURS_TENS_MAP) > 0); }
};
#endif // CHIP_SELECT_H

View File

@@ -0,0 +1,52 @@
/*
* Define the hardware for the EleksTube IPS clock. Mostly pin definitions
*/
#ifndef ELEKSTUBEHAX_HARDWARE_H
#define ELEKSTUBEHAX_HARDWARE_H
#include <stdint.h>
#include <Arduino.h> // for HIGH and LOW
// Common indexing scheme, used to identify the digit
#define SECONDS_ONES (0)
#define SECONDS_TENS (1)
#define MINUTES_ONES (2)
#define MINUTES_TENS (3)
#define HOURS_ONES (4)
#define HOURS_TENS (5)
#define NUM_DIGITS (6)
#define SECONDS_ONES_MAP (0x01 << SECONDS_ONES)
#define SECONDS_TENS_MAP (0x01 << SECONDS_TENS)
#define MINUTES_ONES_MAP (0x01 << MINUTES_ONES)
#define MINUTES_TENS_MAP (0x01 << MINUTES_TENS)
#define HOURS_ONES_MAP (0x01 << HOURS_ONES)
#define HOURS_TENS_MAP (0x01 << HOURS_TENS)
// WS2812 (or compatible) LEDs on the back of the display modules.
#define BACKLIGHTS_PIN (12)
// Buttons, active low, externally pulled up (with actual resistors!)
#define BUTTON_LEFT_PIN (33)
#define BUTTON_MODE_PIN (32)
#define BUTTON_RIGHT_PIN (35)
#define BUTTON_POWER_PIN (34)
// I2C to DS3231 RTC.
#define RTC_SCL_PIN (22)
#define RTC_SDA_PIN (21)
// Chip Select shift register, to select the display
#define CSSR_DATA_PIN (14)
#define CSSR_CLOCK_PIN (16)
#define CSSR_LATCH_PIN (17)
// SPI to displays
// DEFINED IN User_Setup.h
// Look for: TFT_MOSI, TFT_SCLK, TFT_CS, TFT_DC, and TFT_RST
// Power for all TFT displays are grounded through a MOSFET so they can all be turned off.
// Active HIGH.
#define TFT_ENABLE_PIN (27)
#endif // ELEKSTUBEHAX_HARDWARE_H

View File

@@ -0,0 +1,379 @@
#ifndef TFTS_H
#define TFTS_H
#include "wled.h"
#include <FS.h>
#include <TFT_eSPI.h>
#include "Hardware.h"
#include "ChipSelect.h"
class TFTs : public TFT_eSPI {
private:
uint8_t digits[NUM_DIGITS];
// These read 16- and 32-bit types from the SD card file.
// BMP data is stored little-endian, Arduino is little-endian too.
// May need to reverse subscript order if porting elsewhere.
uint16_t read16(fs::File &f) {
uint16_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read(); // MSB
return result;
}
uint32_t read32(fs::File &f) {
uint32_t result;
((uint8_t *)&result)[0] = f.read(); // LSB
((uint8_t *)&result)[1] = f.read();
((uint8_t *)&result)[2] = f.read();
((uint8_t *)&result)[3] = f.read(); // MSB
return result;
}
uint16_t output_buffer[TFT_HEIGHT][TFT_WIDTH];
int16_t w = 135, h = 240, x = 0, y = 0, bufferedDigit = 255;
uint16_t digitR, digitG, digitB, dimming = 255;
uint32_t digitColor = 0;
void drawBuffer() {
bool oldSwapBytes = getSwapBytes();
setSwapBytes(true);
pushImage(x, y, w, h, (uint16_t *)output_buffer);
setSwapBytes(oldSwapBytes);
}
// These BMP functions are stolen directly from the TFT_SPIFFS_BMP example in the TFT_eSPI library.
// Unfortunately, they aren't part of the library itself, so I had to copy them.
// I've modified drawBmp to buffer the whole image at once instead of doing it line-by-line.
//// BEGIN STOLEN CODE
// Draw directly from file stored in RGB565 format. Fastest
bool drawBin(const char *filename) {
fs::File bmpFS;
// Open requested file on SD card
bmpFS = WLED_FS.open(filename, "r");
size_t sz = bmpFS.size();
if (sz > 64800) {
bmpFS.close();
return false;
}
uint16_t r, g, b, dimming = 255;
int16_t row, col;
//draw img that is shorter than 240pix into the center
w = 135;
h = sz / (w * 2);
x = 0;
y = (height() - h) /2;
uint8_t lineBuffer[w * 2];
if (!realtimeMode || realtimeOverride) strip.service();
// 0,0 coordinates are top left
for (row = 0; row < h; row++) {
bmpFS.read(lineBuffer, sizeof(lineBuffer));
uint8_t PixM, PixL;
// Colors are already in 16-bit R5, G6, B5 format
for (col = 0; col < w; col++)
{
if (dimming == 255 && !digitColor) { // not needed, copy directly
output_buffer[row][col] = (lineBuffer[col*2+1] << 8) | (lineBuffer[col*2]);
} else {
// 16 BPP pixel format: R5, G6, B5 ; bin: RRRR RGGG GGGB BBBB
PixM = lineBuffer[col*2+1];
PixL = lineBuffer[col*2];
// align to 8-bit value (MSB left aligned)
r = (PixM) & 0xF8;
g = ((PixM << 5) | (PixL >> 3)) & 0xFC;
b = (PixL << 3) & 0xF8;
r *= dimming; g *= dimming; b *= dimming;
r = r >> 8; g = g >> 8; b = b >> 8;
if (digitColor) { // grayscale pixel coloring
uint8_t l = (r > g) ? ((r > b) ? r:b) : ((g > b) ? g:b);
r = g = b = l;
r *= digitR; g *= digitG; b *= digitB;
r = r >> 8; g = g >> 8; b = b >> 8;
}
output_buffer[row][col] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
}
}
drawBuffer();
bmpFS.close();
return true;
}
bool drawBmp(const char *filename) {
fs::File bmpFS;
// Open requested file on SD card
bmpFS = WLED_FS.open(filename, "r");
uint32_t seekOffset, headerSize, paletteSize = 0;
int16_t row;
uint16_t r, g, b, dimming = 255, bitDepth;
uint16_t magic = read16(bmpFS);
if (magic != ('B' | ('M' << 8))) { // File not found or not a BMP
Serial.println(F("BMP not found!"));
bmpFS.close();
return false;
}
read32(bmpFS); // filesize in bytes
read32(bmpFS); // reserved
seekOffset = read32(bmpFS); // start of bitmap
headerSize = read32(bmpFS); // header size
w = read32(bmpFS); // width
h = read32(bmpFS); // height
read16(bmpFS); // color planes (must be 1)
bitDepth = read16(bmpFS);
if (read32(bmpFS) != 0 || (bitDepth != 24 && bitDepth != 1 && bitDepth != 4 && bitDepth != 8)) {
Serial.println(F("BMP format not recognized."));
bmpFS.close();
return false;
}
uint32_t palette[256];
if (bitDepth <= 8) // 1,4,8 bit bitmap: read color palette
{
read32(bmpFS); read32(bmpFS); read32(bmpFS); // size, w resolution, h resolution
paletteSize = read32(bmpFS);
if (paletteSize == 0) paletteSize = bitDepth * bitDepth; //if 0, size is 2^bitDepth
bmpFS.seek(14 + headerSize); // start of color palette
for (uint16_t i = 0; i < paletteSize; i++) {
palette[i] = read32(bmpFS);
}
}
// draw img that is shorter than 240pix into the center
x = (width() - w) /2;
y = (height() - h) /2;
bmpFS.seek(seekOffset);
uint32_t lineSize = ((bitDepth * w +31) >> 5) * 4;
uint8_t lineBuffer[lineSize];
uint8_t serviceStrip = (!realtimeMode || realtimeOverride) ? 7 : 0;
// row is decremented as the BMP image is drawn bottom up
for (row = h-1; row >= 0; row--) {
if ((row & 0b00000111) == serviceStrip) strip.service(); //still refresh backlight to mitigate stutter every few rows
bmpFS.read(lineBuffer, sizeof(lineBuffer));
uint8_t* bptr = lineBuffer;
// Convert 24 to 16 bit colors while copying to output buffer.
for (uint16_t col = 0; col < w; col++)
{
if (bitDepth == 24) {
b = *bptr++;
g = *bptr++;
r = *bptr++;
} else {
uint32_t c = 0;
if (bitDepth == 8) {
c = palette[*bptr++];
}
else if (bitDepth == 4) {
c = palette[(*bptr >> ((col & 0x01)?0:4)) & 0x0F];
if (col & 0x01) bptr++;
}
else { // bitDepth == 1
c = palette[(*bptr >> (7 - (col & 0x07))) & 0x01];
if ((col & 0x07) == 0x07) bptr++;
}
b = c; g = c >> 8; r = c >> 16;
}
if (dimming != 255) { // only dimm when needed
r *= dimming; g *= dimming; b *= dimming;
r = r >> 8; g = g >> 8; b = b >> 8;
}
if (digitColor) { // grayscale pixel coloring
uint8_t l = (r > g) ? ((r > b) ? r:b) : ((g > b) ? g:b);
r = g = b = l;
r *= digitR; g *= digitG; b *= digitB;
r = r >> 8; g = g >> 8; b = b >> 8;
}
output_buffer[row][col] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | ((b & 0xFF) >> 3);
}
}
drawBuffer();
bmpFS.close();
return true;
}
bool drawClk(const char *filename) {
fs::File bmpFS;
// Open requested file on SD card
bmpFS = WLED_FS.open(filename, "r");
if (!bmpFS)
{
Serial.print("File not found: ");
Serial.println(filename);
return false;
}
uint16_t r, g, b, dimming = 255, magic;
int16_t row, col;
magic = read16(bmpFS);
if (magic != 0x4B43) { // look for "CK" header
Serial.print(F("File not a CLK. Magic: "));
Serial.println(magic);
bmpFS.close();
return false;
}
w = read16(bmpFS);
h = read16(bmpFS);
x = (width() - w) / 2;
y = (height() - h) / 2;
uint8_t lineBuffer[w * 2];
if (!realtimeMode || realtimeOverride) strip.service();
// 0,0 coordinates are top left
for (row = 0; row < h; row++) {
bmpFS.read(lineBuffer, sizeof(lineBuffer));
uint8_t PixM, PixL;
// Colors are already in 16-bit R5, G6, B5 format
for (col = 0; col < w; col++)
{
if (dimming == 255 && !digitColor) { // not needed, copy directly
output_buffer[row][col+x] = (lineBuffer[col*2+1] << 8) | (lineBuffer[col*2]);
} else {
// 16 BPP pixel format: R5, G6, B5 ; bin: RRRR RGGG GGGB BBBB
PixM = lineBuffer[col*2+1];
PixL = lineBuffer[col*2];
// align to 8-bit value (MSB left aligned)
r = (PixM) & 0xF8;
g = ((PixM << 5) | (PixL >> 3)) & 0xFC;
b = (PixL << 3) & 0xF8;
r *= dimming; g *= dimming; b *= dimming;
r = r >> 8; g = g >> 8; b = b >> 8;
if (digitColor) { // grayscale pixel coloring
uint8_t l = (r > g) ? ((r > b) ? r:b) : ((g > b) ? g:b);
r = g = b = l;
r *= digitR; g *= digitG; b *= digitB;
r = r >> 8; g = g >> 8; b = b >> 8;
}
output_buffer[row][col+x] = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
}
}
}
drawBuffer();
bmpFS.close();
return true;
}
public:
TFTs() : TFT_eSPI(), chip_select()
{ for (uint8_t digit=0; digit < NUM_DIGITS; digit++) digits[digit] = 0; }
// no == Do not send to TFT. yes == Send to TFT if changed. force == Send to TFT.
enum show_t { no, yes, force };
// A digit of 0xFF means blank the screen.
const static uint8_t blanked = 255;
uint8_t tubeSegment = 1;
uint8_t digitOffset = 0;
void begin() {
pinMode(TFT_ENABLE_PIN, OUTPUT);
digitalWrite(TFT_ENABLE_PIN, HIGH); //enable displays on boot
// Start with all displays selected.
chip_select.begin();
chip_select.setAll();
// Initialize the super class.
init();
}
void showDigit(uint8_t digit) {
chip_select.setDigit(digit);
uint8_t digitToDraw = digits[digit];
if (digitToDraw < 10) digitToDraw += digitOffset;
if (digitToDraw == blanked) {
fillScreen(TFT_BLACK); return;
}
// if last digit was the same, skip loading from FS to buffer
if (!digitColor && digitToDraw == bufferedDigit) drawBuffer();
digitR = R(digitColor); digitG = G(digitColor); digitB = B(digitColor);
// Filenames are no bigger than "254.bmp\0"
char file_name[10];
// Fastest, raw RGB565
sprintf(file_name, "/%d.bin", digitToDraw);
if (WLED_FS.exists(file_name)) {
if (drawBin(file_name)) bufferedDigit = digitToDraw;
return;
}
// Fast, raw RGB565, see https://github.com/aly-fly/EleksTubeHAX on how to create this clk format
sprintf(file_name, "/%d.clk", digitToDraw);
if (WLED_FS.exists(file_name)) {
if (drawClk(file_name)) bufferedDigit = digitToDraw;
return;
}
// Slow, regular RGB888 or 1,4,8 bit palette BMP
sprintf(file_name, "/%d.bmp", digitToDraw);
if (drawBmp(file_name)) bufferedDigit = digitToDraw;
return;
}
void setDigit(uint8_t digit, uint8_t value, show_t show=yes) {
uint8_t old_value = digits[digit];
digits[digit] = value;
// Color in grayscale bitmaps if Segment 1 exists
// TODO If secondary and tertiary are black, color all in primary,
// else color first three from Seg 1 color slots and last three from Seg 2 color slots
WS2812FX::Segment& seg1 = strip.getSegment(tubeSegment);
if (seg1.isActive()) {
digitColor = strip.getPixelColor(seg1.start + digit);
dimming = seg1.opacity;
} else {
digitColor = 0;
dimming = 255;
}
if (show != no && (old_value != value || show == force)) {
showDigit(digit);
}
}
uint8_t getDigit(uint8_t digit) {return digits[digit];}
void showAllDigits() {for (uint8_t digit=0; digit < NUM_DIGITS; digit++) showDigit(digit);}
// Making chip_select public so we don't have to proxy all methods, and the caller can just use it directly.
ChipSelect chip_select;
};
#endif // TFTS_H

View File

@@ -0,0 +1,47 @@
/*
* This is intended to over-ride `User_Setup.h` that comes with the TFT_eSPI library.
* I hate having to modify the library code.
*/
// ST7789 135 x 240 display with no chip select line
#define ST7789_DRIVER // Configure all registers
#define TFT_WIDTH 135
#define TFT_HEIGHT 240
#define CGRAM_OFFSET // Library will add offsets required
//#define TFT_RGB_ORDER TFT_RGB // Colour order Red-Green-Blue
//#define TFT_RGB_ORDER TFT_BGR // Colour order Blue-Green-Red
//#define TFT_INVERSION_ON
//#define TFT_INVERSION_OFF
// EleksTube IPS
#define TFT_SDA_READ // Read and write on the MOSI/SDA pin, no separate MISO pin
#define TFT_MOSI 23
#define TFT_SCLK 18
//#define TFT_CS -1 // Not connected
#define TFT_DC 25 // Data Command, aka Register Select or RS
#define TFT_RST 26 // Connect reset to ensure display initialises
#define LOAD_GLCD // Font 1. Original Adafruit 8 pixel font needs ~1820 bytes in FLASH
//#define LOAD_FONT2 // Font 2. Small 16 pixel high font, needs ~3534 bytes in FLASH, 96 characters
//#define LOAD_FONT4 // Font 4. Medium 26 pixel high font, needs ~5848 bytes in FLASH, 96 characters
//#define LOAD_FONT6 // Font 6. Large 48 pixel font, needs ~2666 bytes in FLASH, only characters 1234567890:-.apm
//#define LOAD_FONT7 // Font 7. 7 segment 48 pixel font, needs ~2438 bytes in FLASH, only characters 1234567890:.
//#define LOAD_FONT8 // Font 8. Large 75 pixel font needs ~3256 bytes in FLASH, only characters 1234567890:-.
//#define LOAD_FONT8N // Font 8. Alternative to Font 8 above, slightly narrower, so 3 digits fit a 160 pixel TFT
//#define LOAD_GFXFF // FreeFonts. Include access to the 48 Adafruit_GFX free fonts FF1 to FF48 and custom fonts
//#define SMOOTH_FONT
//#define SPI_FREQUENCY 27000000
#define SPI_FREQUENCY 40000000
/*
* To make the Library not over-write all this:
*/
#define USER_SETUP_LOADED

View File

@@ -0,0 +1,45 @@
# EleksTube IPS Clock usermod
This usermod allows WLED to run on the EleksTube IPS clock.
It enables running all WLED effects on the background SK6812 lighting, while displaying digit bitmaps on the 6 IPS screens.
Code is largely based on https://github.com/SmittyHalibut/EleksTubeHAX by Mark Smith!
Supported:
- Display with custom bitmaps (.bmp) or raw RGB565 images (.bin) from filesystem
- Background lighting
- All 4 hardware buttons
- RTC (with RTC usermod)
- Standard WLED time features (NTP, DST, timezones)
Not supported:
- On-device setup with buttons (WiFi setup only)
Your images must be 1-135 pixels wide and 1-240 pixels high.
For BMP, 1, 4, 8, and 24 bits per pixel formats are supported.
## Installation
Compile and upload to clock using the `elekstube_ips` PlatformIO environment
Once uploaded (the clock can be flashed like any ESP32 module), go to `[WLED-IP]/edit` and upload the 0-9.bin files from [here](https://github.com/Aircoookie/NixieThemes/tree/master/themes/RealisticNixie/bin).
You can find more clockfaces in the [NixieThemes](https://github.com/Aircoookie/NixieThemes/) repo.
Use LED pin 12, relay pin 27 and button pin 34.
## Use of RGB565 images
Binary 16-bit per pixel RGB565 format `.bin` and `.clk` images are now supported. This has the benefit of only using 2/3rds of the file size a 24 BPP `.bmp` has.
The drawback is that this format cannot be handled by common image programs and that an extra conversion step is needed.
You can use https://lvgl.io/tools/imageconverter to convert your .bmp to a .bin file (settings `True color` and `Binary RGB565`).
Thank you to @RedNax67 for adding .bin and .clk support.
For most clockface designs, using 4 or 8 BPP BMP formats will save even more file size:
| Bits per pixel | File size in kB (for 135x240 img) | % of 24 BPP BMP | Max unique colors
| --- | --- | --- | --- |
24 | 98 | 100% | 16M (66K)
16 (.clk) | 64.8 | 66% | 66K
8 | 33.7 | 34% | 256
4 | 16.4 | 17% | 16
1 | 4.9 | 5% | 2
Comparison 1 vs. 4 vs. 8 vs. 24 BPP. With this clockface on the actual clock, 4 bit looks good, and 8 bit is almost indistinguishable from 24 bit.
![comparison](https://user-images.githubusercontent.com/21045690/156899667-5b55ed9f-6e03-4066-b2aa-1260e9570369.png)

View File

@@ -0,0 +1,158 @@
#pragma once
#include "TFTs.h"
#include "wled.h"
//Large parts of the code are from https://github.com/SmittyHalibut/EleksTubeHAX
class ElekstubeIPSUsermod : public Usermod {
private:
// strings to reduce flash memory usage (used more than twice)
static const char _name[];
static const char _tubeSeg[];
static const char _digitOffset[];
char cronixieDisplay[7] = "HHMMSS";
TFTs tfts;
void updateClockDisplay(TFTs::show_t show=TFTs::yes) {
bool set[6] = {false};
for (uint8_t i = 0; i<6; i++) {
char c = cronixieDisplay[i];
if (c >= '0' && c <= '9') {
tfts.setDigit(5-i, c - '0', show); set[i] = true;
} else if (c >= 'A' && c <= 'G') {
tfts.setDigit(5-i, c - 'A' + 10, show); set[i] = true; //10.bmp to 16.bmp static display
} else if (c == '-' || c == '_' || c == ' ') {
tfts.setDigit(5-i, 255, show); set[i] = true; //blank
} else {
set[i] = false; //display HHMMSS time
}
}
uint8_t hr = hour(localTime);
uint8_t hrTens = hr/10;
uint8_t mi = minute(localTime);
uint8_t mittens = mi/10;
uint8_t s = second(localTime);
uint8_t sTens = s/10;
if (!set[0]) tfts.setDigit(HOURS_TENS, hrTens, show);
if (!set[1]) tfts.setDigit(HOURS_ONES, hr - hrTens*10, show);
if (!set[2]) tfts.setDigit(MINUTES_TENS, mittens, show);
if (!set[3]) tfts.setDigit(MINUTES_ONES, mi - mittens*10, show);
if (!set[4]) tfts.setDigit(SECONDS_TENS, sTens, show);
if (!set[5]) tfts.setDigit(SECONDS_ONES, s - sTens*10, show);
}
unsigned long lastTime = 0;
public:
uint8_t lastBri;
uint32_t lastCols[6];
TFTs::show_t fshow=TFTs::yes;
void setup() {
tfts.begin();
tfts.fillScreen(TFT_BLACK);
for (int8_t i = 5; i >= 0; i--) {
tfts.setDigit(i, 255, TFTs::force); //turn all off
}
}
void loop() {
if (!toki.isTick()) return;
updateLocalTime();
WS2812FX::Segment& seg1 = strip.getSegment(tfts.tubeSegment);
if (seg1.isActive()) {
bool update = false;
if (seg1.opacity != lastBri) update = true;
lastBri = seg1.opacity;
for (uint8_t i = 0; i < 6; i++) {
uint32_t c = strip.getPixelColor(seg1.start + i);
if (c != lastCols[i]) update = true;
lastCols[i] = c;
}
if (update) fshow=TFTs::force;
} else if (lastCols[0] != 0) { // Segment 1 deleted
fshow=TFTs::force;
lastCols[0] = 0;
}
updateClockDisplay(fshow);
fshow=TFTs::yes;
}
/**
* addToConfig() (called from set.cpp) stores persistent properties to cfg.json
*/
void addToConfig(JsonObject &root) {
// we add JSON object: {"EleksTubeIPS": {"tubeSegment": 1, "digitOffset": 0}}
JsonObject top = root.createNestedObject(FPSTR(_name)); // usermodname
top[FPSTR(_tubeSeg)] = tfts.tubeSegment;
top[FPSTR(_digitOffset)] = tfts.digitOffset;
DEBUG_PRINTLN(F("EleksTube config saved."));
}
/**
* readFromConfig() is called before setup() to populate properties from values stored in cfg.json
*
* The function should return true if configuration was successfully loaded or false if there was no configuration.
*/
bool readFromConfig(JsonObject &root) {
// we look for JSON object: {"EleksTubeIPS": {"tubeSegment": 1, "digitOffset": 0}}
DEBUG_PRINT(FPSTR(_name));
JsonObject top = root[FPSTR(_name)];
if (top.isNull()) {
DEBUG_PRINTLN(F(": No config found. (Using defaults.)"));
return false;
}
tfts.tubeSegment = top[FPSTR(_tubeSeg)] | tfts.tubeSegment;
uint8_t digitOffsetPrev = tfts.digitOffset;
tfts.digitOffset = top[FPSTR(_digitOffset)] | tfts.digitOffset;
if (tfts.digitOffset > 240) tfts.digitOffset = 240;
if (tfts.digitOffset != digitOffsetPrev) fshow=TFTs::force;
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
return !top[FPSTR(_digitOffset)].isNull();
}
/*
* addToJsonState() can be used to add custom entries to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void addToJsonState(JsonObject& root)
{
root["nx"] = cronixieDisplay;
root[FPSTR(_digitOffset)] = tfts.digitOffset;
}
/*
* readFromJsonState() can be used to receive data clients send to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void readFromJsonState(JsonObject& root)
{
if (root["nx"].is<const char*>()) {
strncpy(cronixieDisplay, root["nx"], 6);
}
uint8_t digitOffsetPrev = tfts.digitOffset;
tfts.digitOffset = root[FPSTR(_digitOffset)] | tfts.digitOffset;
if (tfts.digitOffset > 240) tfts.digitOffset = 240;
if (tfts.digitOffset != digitOffsetPrev) fshow=TFTs::force;
}
uint16_t getId()
{
return USERMOD_ID_ELEKSTUBE_IPS;
}
};
// strings to reduce flash memory usage (used more than twice)
const char ElekstubeIPSUsermod::_name[] PROGMEM = "EleksTubeIPS";
const char ElekstubeIPSUsermod::_tubeSeg[] PROGMEM = "tubeSegment";
const char ElekstubeIPSUsermod::_digitOffset[] PROGMEM = "digitOffset";

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

View File

@@ -0,0 +1,7 @@
# Enclosure and PCB
## IP67 rated enclosure
![Enclosure](controller.jpg)
## PCB
![PCB](pcb.png)

View File

@@ -0,0 +1,68 @@
# Almost universal controller board for outdoor applications
This usermod is using ideas from @mrVanboy and @400killer
Installation of file: Copy and replace file in wled00 directory.
For BME280 sensor use usermod_bme280.cpp. Copy to wled00 and rename to usermod.cpp
## Project repository
- [Original repository](https://github.com/srg74/Controller-for-WLED-firmware) - Main controller repository
## Features
- SSD1306 128x32 and 128x64 I2C OLED display
- On screen IP address, SSID and controller status (e.g. ON or OFF, recent effect)
- Auto display shutoff for saving display lifetime
- Dallas temperature sensor
- Reporting temperature to MQTT broker
## Hardware
![Hardware connection](assets/controller.jpg)
## Functionality checked with
- ESP-07S
- PlatformIO
- SSD1306 128x32 I2C OLED display
- DS18B20 (temperature sensor)
- BME280 (temperature, humidity and pressure sensor)
- KY-022 (infrared receiver)
- Push button (N.O. momentary switch)
For Dallas sensor uncomment `U8g2@~2.27.3`,`DallasTemperature@~3.8.0`,`OneWire@~2.3.5 under` `[common]` section in `platformio.ini`:
```ini
# platformio.ini
...
[platformio]
...
default_envs = esp07
; default_envs = d1_mini
...
[common]
...
lib_deps_external =
...
#For use SSD1306 OLED display uncomment following
U8g2@~2.27.3
#For Dallas sensor uncomment following 2 lines
DallasTemperature@~3.8.0
OneWire@~2.3.5
...
```
For BME280 sensor uncomment `U8g2@~2.27.3`,`BME280@~3.0.0 under` `[common]` section in `platformio.ini`:
```ini
# platformio.ini
...
[platformio]
...
default_envs = esp07
; default_envs = d1_mini
...
[common]
...
lib_deps_external =
...
#For use SSD1306 OLED display uncomment following
U8g2@~2.27.3
#For BME280 sensor uncomment following
BME280@~3.0.0
...
```

View File

@@ -0,0 +1,209 @@
#include "wled.h"
#include <Arduino.h>
#include <U8x8lib.h> // from https://github.com/olikraus/u8g2/
#include <DallasTemperature.h> //Dallastemperature sensor
//The SCL and SDA pins are defined here.
//Lolin32 boards use SCL=5 SDA=4
#define U8X8_PIN_SCL 5
#define U8X8_PIN_SDA 4
// Dallas sensor
OneWire oneWire(13);
DallasTemperature sensor(&oneWire);
long temptimer = millis();
long lastMeasure = 0;
#define Celsius // Show temperature mesaurement in Celcius otherwise is in Fahrenheit
// If display does not work or looks corrupted check the
// constructor reference:
// https://github.com/olikraus/u8g2/wiki/u8x8setupcpp
// or check the gallery:
// https://github.com/olikraus/u8g2/wiki/gallery
// --> First choise of cheap I2C OLED 128X32 0.91"
U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// --> Second choise of cheap I2C OLED 128X64 0.96" or 1.3"
//U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// gets called once at boot. Do all initialization that doesn't depend on
// network here
void userSetup() {
sensor.begin(); //Start Dallas temperature sensor
u8x8.begin();
//u8x8.setFlipMode(1); //Uncoment if using WLED Wemos shield
u8x8.setPowerSave(0);
u8x8.setContrast(10); //Contrast setup will help to preserve OLED lifetime. In case OLED need to be brighter increase number up to 255
u8x8.setFont(u8x8_font_chroma48medium8_r);
u8x8.drawString(0, 0, "Loading...");
}
// gets called every time WiFi is (re-)connected. Initialize own network
// interfaces here
void userConnected() {}
// needRedraw marks if redraw is required to prevent often redrawing.
bool needRedraw = true;
// Next variables hold the previous known values to determine if redraw is
// required.
String knownSsid = "";
IPAddress knownIp;
uint8_t knownBrightness = 0;
uint8_t knownMode = 0;
uint8_t knownPalette = 0;
long lastUpdate = 0;
long lastRedraw = 0;
bool displayTurnedOff = false;
// How often we are redrawing screen
#define USER_LOOP_REFRESH_RATE_MS 5000
void userLoop() {
//----> Dallas temperature sensor MQTT publishing
temptimer = millis();
// Timer to publishe new temperature every 60 seconds
if (temptimer - lastMeasure > 60000)
{
lastMeasure = temptimer;
//Check if MQTT Connected, otherwise it will crash the 8266
if (mqtt != nullptr)
{
sensor.requestTemperatures();
//Gets prefered temperature scale based on selection in definitions section
#ifdef Celsius
float board_temperature = sensor.getTempCByIndex(0);
#else
float board_temperature = sensor.getTempFByIndex(0);
#endif
//Create character string populated with user defined device topic from the UI, and the read temperature. Then publish to MQTT server.
char subuf[38];
strcpy(subuf, mqttDeviceTopic);
strcat(subuf, "/temperature");
mqtt->publish(subuf, 0, true, String(board_temperature).c_str());
}
}
// Check if we time interval for redrawing passes.
if (millis() - lastUpdate < USER_LOOP_REFRESH_RATE_MS) {
return;
}
lastUpdate = millis();
// Turn off display after 3 minutes with no change.
if(!displayTurnedOff && millis() - lastRedraw > 3*60*1000) {
u8x8.setPowerSave(1);
displayTurnedOff = true;
}
// Check if values which are shown on display changed from the last time.
if (((apActive) ? String(apSSID) : WiFi.SSID()) != knownSsid) {
needRedraw = true;
} else if (knownIp != (apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP())) {
needRedraw = true;
} else if (knownBrightness != bri) {
needRedraw = true;
} else if (knownMode != strip.getMainSegment().mode) {
needRedraw = true;
} else if (knownPalette != strip.getMainSegment().palette) {
needRedraw = true;
}
if (!needRedraw) {
return;
}
needRedraw = false;
if (displayTurnedOff)
{
u8x8.setPowerSave(0);
displayTurnedOff = false;
}
lastRedraw = millis();
// Update last known values.
#if defined(ESP8266)
knownSsid = apActive ? WiFi.softAPSSID() : WiFi.SSID();
#else
knownSsid = WiFi.SSID();
#endif
knownIp = apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP();
knownBrightness = bri;
knownMode = strip.getMainSegment().mode;
knownPalette = strip.getMainSegment().palette;
u8x8.clear();
u8x8.setFont(u8x8_font_chroma48medium8_r);
// First row with Wifi name
u8x8.setCursor(1, 0);
u8x8.print(knownSsid.substring(0, u8x8.getCols() > 1 ? u8x8.getCols() - 2 : 0));
// Print `~` char to indicate that SSID is longer, than owr dicplay
if (knownSsid.length() > u8x8.getCols())
u8x8.print("~");
// Second row with IP or Psssword
u8x8.setCursor(1, 1);
// Print password in AP mode and if led is OFF.
if (apActive && bri == 0)
u8x8.print(apPass);
else
u8x8.print(knownIp);
// Third row with mode name
u8x8.setCursor(2, 2);
uint8_t qComma = 0;
bool insideQuotes = false;
uint8_t printedChars = 0;
char singleJsonSymbol;
// Find the mode name in JSON
for (size_t i = 0; i < strlen_P(JSON_mode_names); i++) {
singleJsonSymbol = pgm_read_byte_near(JSON_mode_names + i);
switch (singleJsonSymbol) {
case '"':
insideQuotes = !insideQuotes;
break;
case '[':
case ']':
break;
case ',':
qComma++;
default:
if (!insideQuotes || (qComma != knownMode))
break;
u8x8.print(singleJsonSymbol);
printedChars++;
}
if ((qComma > knownMode) || (printedChars > u8x8.getCols() - 2))
break;
}
// Fourth row with palette name
u8x8.setCursor(2, 3);
qComma = 0;
insideQuotes = false;
printedChars = 0;
// Looking for palette name in JSON.
for (size_t i = 0; i < strlen_P(JSON_palette_names); i++) {
singleJsonSymbol = pgm_read_byte_near(JSON_palette_names + i);
switch (singleJsonSymbol) {
case '"':
insideQuotes = !insideQuotes;
break;
case '[':
case ']':
break;
case ',':
qComma++;
default:
if (!insideQuotes || (qComma != knownPalette))
break;
u8x8.print(singleJsonSymbol);
printedChars++;
}
if ((qComma > knownMode) || (printedChars > u8x8.getCols() - 2))
break;
}
u8x8.setFont(u8x8_font_open_iconic_embedded_1x1);
u8x8.drawGlyph(0, 0, 80); // wifi icon
u8x8.drawGlyph(0, 1, 68); // home icon
u8x8.setFont(u8x8_font_open_iconic_weather_2x2);
u8x8.drawGlyph(0, 2, 66 + (bri > 0 ? 3 : 0)); // sun/moon icon
}

View File

@@ -0,0 +1,266 @@
#include "wled.h"
#include <Arduino.h>
#include <U8x8lib.h> // from https://github.com/olikraus/u8g2/
#include <Wire.h>
#include <BME280I2C.h> //BME280 sensor
void UpdateBME280Data();
#define Celsius // Show temperature mesaurement in Celcius otherwise is in Fahrenheit
BME280I2C bme; // Default : forced mode, standby time = 1000 ms
// Oversampling = pressure ×1, temperature ×1, humidity ×1, filter off,
#ifdef ARDUINO_ARCH_ESP32 //ESP32 boards
uint8_t SCL_PIN = 22;
uint8_t SDA_PIN = 21;
#else //ESP8266 boards
uint8_t SCL_PIN = 5;
uint8_t SDA_PIN = 4;
// uint8_t RST_PIN = 16; // Uncoment for Heltec WiFi-Kit-8
#endif
//The SCL and SDA pins are defined here.
//ESP8266 Wemos D1 mini board use SCL=5 SDA=4 while ESP32 Wemos32 mini board use SCL=22 SDA=21
#define U8X8_PIN_SCL SCL_PIN
#define U8X8_PIN_SDA SDA_PIN
//#define U8X8_PIN_RESET RST_PIN // Uncoment for Heltec WiFi-Kit-8
// If display does not work or looks corrupted check the
// constructor reference:
// https://github.com/olikraus/u8g2/wiki/u8x8setupcpp
// or check the gallery:
// https://github.com/olikraus/u8g2/wiki/gallery
// --> First choise of cheap I2C OLED 128X32 0.91"
U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// --> Second choise of cheap I2C OLED 128X64 0.96" or 1.3"
//U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(U8X8_PIN_NONE, U8X8_PIN_SCL, U8X8_PIN_SDA); // Pins are Reset, SCL, SDA
// --> Third choise of Heltec WiFi-Kit-8 OLED 128X32 0.91"
//U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(U8X8_PIN_RESET, U8X8_PIN_SCL, U8X8_PIN_SDA); // Constructor for Heltec WiFi-Kit-8
// gets called once at boot. Do all initialization that doesn't depend on network here
// BME280 sensor timer
long tempTimer = millis();
long lastMeasure = 0;
float SensorPressure(NAN);
float SensorTemperature(NAN);
float SensorHumidity(NAN);
void userSetup() {
u8x8.begin();
u8x8.setPowerSave(0);
u8x8.setFlipMode(1);
u8x8.setContrast(10); //Contrast setup will help to preserve OLED lifetime. In case OLED need to be brighter increase number up to 255
u8x8.setFont(u8x8_font_chroma48medium8_r);
u8x8.drawString(0, 0, "Loading...");
Wire.begin(SDA_PIN,SCL_PIN);
while(!bme.begin())
{
Serial.println("Could not find BME280I2C sensor!");
delay(1000);
}
switch(bme.chipModel())
{
case BME280::ChipModel_BME280:
Serial.println("Found BME280 sensor! Success.");
break;
case BME280::ChipModel_BMP280:
Serial.println("Found BMP280 sensor! No Humidity available.");
break;
default:
Serial.println("Found UNKNOWN sensor! Error!");
}
}
// gets called every time WiFi is (re-)connected. Initialize own network
// interfaces here
void userConnected() {}
// needRedraw marks if redraw is required to prevent often redrawing.
bool needRedraw = true;
// Next variables hold the previous known values to determine if redraw is
// required.
String knownSsid = "";
IPAddress knownIp;
uint8_t knownBrightness = 0;
uint8_t knownMode = 0;
uint8_t knownPalette = 0;
long lastUpdate = 0;
long lastRedraw = 0;
bool displayTurnedOff = false;
// How often we are redrawing screen
#define USER_LOOP_REFRESH_RATE_MS 5000
void userLoop() {
// BME280 sensor MQTT publishing
tempTimer = millis();
// Timer to publish new sensor data every 60 seconds
if (tempTimer - lastMeasure > 60000)
{
lastMeasure = tempTimer;
// Check if MQTT Connected, otherwise it will crash the 8266
if (mqtt != nullptr)
{
UpdateBME280Data();
float board_temperature = SensorTemperature;
float board_pressure = SensorPressure;
float board_humidity = SensorHumidity;
// Create string populated with user defined device topic from the UI, and the read temperature, humidity and pressure. Then publish to MQTT server.
String t = String(mqttDeviceTopic);
t += "/temperature";
mqtt->publish(t.c_str(), 0, true, String(board_temperature).c_str());
String p = String(mqttDeviceTopic);
p += "/pressure";
mqtt->publish(p.c_str(), 0, true, String(board_pressure).c_str());
String h = String(mqttDeviceTopic);
h += "/humidity";
mqtt->publish(h.c_str(), 0, true, String(board_humidity).c_str());
}
}
// Check if we time interval for redrawing passes.
if (millis() - lastUpdate < USER_LOOP_REFRESH_RATE_MS) {
return;
}
lastUpdate = millis();
// Turn off display after 3 minutes with no change.
if(!displayTurnedOff && millis() - lastRedraw > 3*60*1000) {
u8x8.setPowerSave(1);
displayTurnedOff = true;
}
// Check if values which are shown on display changed from the last time.
if (((apActive) ? String(apSSID) : WiFi.SSID()) != knownSsid) {
needRedraw = true;
} else if (knownIp != (apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP())) {
needRedraw = true;
} else if (knownBrightness != bri) {
needRedraw = true;
} else if (knownMode != strip.getMainSegment().mode) {
needRedraw = true;
} else if (knownPalette != strip.getMainSegment().palette) {
needRedraw = true;
}
if (!needRedraw) {
return;
}
needRedraw = false;
if (displayTurnedOff)
{
u8x8.setPowerSave(0);
displayTurnedOff = false;
}
lastRedraw = millis();
// Update last known values.
#if defined(ESP8266)
knownSsid = apActive ? WiFi.softAPSSID() : WiFi.SSID();
#else
knownSsid = WiFi.SSID();
#endif
knownIp = apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP();
knownBrightness = bri;
knownMode = strip.getMainSegment().mode;
knownPalette = strip.getMainSegment().palette;
u8x8.clear();
u8x8.setFont(u8x8_font_chroma48medium8_r);
// First row with Wifi name
u8x8.setCursor(1, 0);
u8x8.print(knownSsid.substring(0, u8x8.getCols() > 1 ? u8x8.getCols() - 2 : 0));
// Print `~` char to indicate that SSID is longer, than owr dicplay
if (knownSsid.length() > u8x8.getCols())
u8x8.print("~");
// Second row with IP or Psssword
u8x8.setCursor(1, 1);
// Print password in AP mode and if led is OFF.
if (apActive && bri == 0)
u8x8.print(apPass);
else
u8x8.print(knownIp);
// Third row with mode name
u8x8.setCursor(2, 2);
uint8_t qComma = 0;
bool insideQuotes = false;
uint8_t printedChars = 0;
char singleJsonSymbol;
// Find the mode name in JSON
for (size_t i = 0; i < strlen_P(JSON_mode_names); i++) {
singleJsonSymbol = pgm_read_byte_near(JSON_mode_names + i);
switch (singleJsonSymbol) {
case '"':
insideQuotes = !insideQuotes;
break;
case '[':
case ']':
break;
case ',':
qComma++;
default:
if (!insideQuotes || (qComma != knownMode))
break;
u8x8.print(singleJsonSymbol);
printedChars++;
}
if ((qComma > knownMode) || (printedChars > u8x8.getCols() - 2))
break;
}
// Fourth row with palette name
u8x8.setCursor(2, 3);
qComma = 0;
insideQuotes = false;
printedChars = 0;
// Looking for palette name in JSON.
for (size_t i = 0; i < strlen_P(JSON_palette_names); i++) {
singleJsonSymbol = pgm_read_byte_near(JSON_palette_names + i);
switch (singleJsonSymbol) {
case '"':
insideQuotes = !insideQuotes;
break;
case '[':
case ']':
break;
case ',':
qComma++;
default:
if (!insideQuotes || (qComma != knownPalette))
break;
u8x8.print(singleJsonSymbol);
printedChars++;
}
if ((qComma > knownMode) || (printedChars > u8x8.getCols() - 2))
break;
}
u8x8.setFont(u8x8_font_open_iconic_embedded_1x1);
u8x8.drawGlyph(0, 0, 80); // wifi icon
u8x8.drawGlyph(0, 1, 68); // home icon
u8x8.setFont(u8x8_font_open_iconic_weather_2x2);
u8x8.drawGlyph(0, 2, 66 + (bri > 0 ? 3 : 0)); // sun/moon icon
}
void UpdateBME280Data() {
float temp(NAN), hum(NAN), pres(NAN);
#ifdef Celsius
BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
#else
BME280::TempUnit tempUnit(BME280::TempUnit_Fahrenheit);
#endif
BME280::PresUnit presUnit(BME280::PresUnit_Pa);
bme.read(pres, temp, hum, tempUnit, presUnit);
SensorTemperature=temp;
SensorHumidity=hum;
SensorPressure=pres;
}

View File

@@ -0,0 +1,69 @@
# Fix unreachable net services V2
**Attention: This usermod compiles only for ESP8266**
This usermod-v2 modification performs a ping request to the local IP address every 60 seconds. By this procedure the net services of WLED remains accessible in some problematic WLAN environments.
The modification works with static or DHCP IP address configuration.
_Story:_
Unfortunately, with all ESP projects where a web server or other network services are running, I have the problem that after some time the web server is no longer accessible. Now I found out that the connection is at least reestablished when a ping request is executed by the device.
With this modification, in the worst case, the network functions are not available for 60 seconds until the next ping request.
## Webinterface
The number of pings and reconnects is displayed on the info page in the web interface.
The ping delay can be changed. Changes persist after a reboot.
## JSON API
The usermod supports the following state changes:
| JSON key | Value range | Description |
|-------------|------------------|---------------------------------|
| PingDelayMs | 5000 to 18000000 | Deactivdate/activate the sensor |
Changes also persist after a reboot.
## Installation
1. Copy the file `usermod_Fix_unreachable_netservices.h` to the `wled00` directory.
2. Register the usermod by adding `#include "usermod_Fix_unreachable_netservices.h"` in the top and `registerUsermod(new FixUnreachableNetServices());` in the bottom of `usermods_list.cpp`.
Example **usermods_list.cpp**:
```cpp
#include "wled.h"
/*
* Register your v2 usermods here!
* (for v1 usermods using just usermod.cpp, you can ignore this file)
*/
/*
* Add/uncomment your usermod filename here (and once more below)
* || || ||
* \/ \/ \/
*/
//#include "usermod_v2_example.h"
//#include "usermod_temperature.h"
//#include "usermod_v2_empty.h"
#include "usermod_Fix_unreachable_netservices.h"
void registerUsermods()
{
/*
* Add your usermod class name here
* || || ||
* \/ \/ \/
*/
//usermods.add(new MyExampleUsermod());
//usermods.add(new UsermodTemperature());
//usermods.add(new UsermodRenameMe());
usermods.add(new FixUnreachableNetServices());
}
```
Hopefully I can help someone with that - @gegu

View File

@@ -0,0 +1,171 @@
#pragma once
#include "wled.h"
#if defined(ESP32)
#warning "Usermod FixUnreachableNetServices works only with ESP8266 builds"
class FixUnreachableNetServices : public Usermod
{
};
#endif
#if defined(ESP8266)
#include <ping.h>
/*
* This usermod performs a ping request to the local IP address every 60 seconds.
* By this procedure the net services of WLED remains accessible in some problematic WLAN environments.
*
* Usermods allow you to add own functionality to WLED more easily
* See: https://github.com/Aircoookie/WLED/wiki/Add-own-functionality
*
* v2 usermods are class inheritance based and can (but don't have to) implement more functions, each of them is shown in this example.
* Multiple v2 usermods can be added to one compilation easily.
*
* Creating a usermod:
* This file serves as an example. If you want to create a usermod, it is recommended to use usermod_v2_empty.h from the usermods folder as a template.
* Please remember to rename the class and file to a descriptive name.
* You may also use multiple .h and .cpp files.
*
* Using a usermod:
* 1. Copy the usermod into the sketch folder (same folder as wled00.ino)
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp
*/
class FixUnreachableNetServices : public Usermod
{
private:
//Private class members. You can declare variables and functions only accessible to your usermod here
unsigned long m_lastTime = 0;
// declare required variables
unsigned long m_pingDelayMs = 60000;
unsigned long m_connectedWiFi = 0;
ping_option m_pingOpt;
unsigned int m_pingCount = 0;
bool m_updateConfig = false;
public:
//Functions called by WLED
/**
* setup() is called once at boot. WiFi is not yet connected at this point.
* You can use it to initialize variables, sensors or similar.
*/
void setup()
{
//Serial.println("Hello from my usermod!");
}
/**
* connected() is called every time the WiFi is (re)connected
* Use it to initialize network interfaces
*/
void connected()
{
//Serial.println("Connected to WiFi!");
++m_connectedWiFi;
// initialize ping_options structure
memset(&m_pingOpt, 0, sizeof(struct ping_option));
m_pingOpt.count = 1;
m_pingOpt.ip = WiFi.localIP();
}
/**
* loop
*/
void loop()
{
if (m_connectedWiFi > 0 && millis() - m_lastTime > m_pingDelayMs)
{
ping_start(&m_pingOpt);
m_lastTime = millis();
++m_pingCount;
}
if (m_updateConfig)
{
serializeConfig();
m_updateConfig = false;
}
}
/**
* addToJsonInfo() can be used to add custom entries to the /json/info part of the JSON API.
* Creating an "u" object allows you to add custom key/value pairs to the Info section of the WLED web UI.
* Below it is shown how this could be used for e.g. a light sensor
*/
void addToJsonInfo(JsonObject &root)
{
//this code adds "u":{"&#x26A1; Ping fix pings": m_pingCount} to the info object
JsonObject user = root["u"];
if (user.isNull())
user = root.createNestedObject("u");
String uiDomString = "&#x26A1; Ping fix pings<span style=\"display:block;padding-left:25px;\">\
Delay <input type=\"number\" min=\"5\" max=\"300\" value=\"";
uiDomString += (unsigned long)(m_pingDelayMs / 1000);
uiDomString += "\" onchange=\"requestJson({PingDelay:parseInt(this.value)});\">sec</span>";
JsonArray infoArr = user.createNestedArray(uiDomString); //name
infoArr.add(m_pingCount); //value
//this code adds "u":{"&#x26A1; Reconnects": m_connectedWiFi - 1} to the info object
infoArr = user.createNestedArray("&#x26A1; Reconnects"); //name
infoArr.add(m_connectedWiFi - 1); //value
}
/**
* addToJsonState() can be used to add custom entries to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void addToJsonState(JsonObject &root)
{
root["PingDelay"] = (m_pingDelayMs/1000);
}
/**
* readFromJsonState() can be used to receive data clients send to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
*/
void readFromJsonState(JsonObject &root)
{
if (root["PingDelay"] != nullptr)
{
m_pingDelayMs = (1000 * max(1UL, min(300UL, root["PingDelay"].as<unsigned long>())));
m_updateConfig = true;
}
}
/**
* provide the changeable values
*/
void addToConfig(JsonObject &root)
{
JsonObject top = root.createNestedObject("FixUnreachableNetServices");
top["PingDelayMs"] = m_pingDelayMs;
}
/**
* restore the changeable values
*/
bool readFromConfig(JsonObject &root)
{
JsonObject top = root["FixUnreachableNetServices"];
if (top.isNull()) return false;
m_pingDelayMs = top["PingDelayMs"] | m_pingDelayMs;
m_pingDelayMs = max(5000UL, min(18000000UL, m_pingDelayMs));
// use "return !top["newestParameter"].isNull();" when updating Usermod with new features
return true;
}
/**
* getId() allows you to optionally give your V2 usermod an unique ID (please define it in const.h!).
* This could be used in the future for the system to determine whether your usermod is installed.
*/
uint16_t getId()
{
return USERMOD_ID_FIXNETSERVICES;
}
};
#endif

View File

@@ -0,0 +1,119 @@
{
"desc": "21-key",
"0xFFA25D": {
"label": "On",
"pos": "1x1",
"cmd": "T=1"
},
"0xFF629D": {
"label": "Off",
"pos": "1x2",
"cmd": "T=0"
},
"0xFFE21D": {
"label": "Flash",
"pos": "1x3",
"cmnt": "Cycle Effects",
"cmd": "CY=0&FX=~"
},
"0xFF22DD": {
"label": "Strobe",
"pos": "2x1",
"cmnt": "Sinelon Dual",
"cmd": "CY=0&FX=93"
},
"0xFF02FD": {
"label": "Fade",
"pos": "2x2",
"cmnt": "Rain",
"cmd": "CY=0&FX=43"
},
"0xFFC23D": {
"label": "Smooth",
"pos": "2x3",
"cmnt": "Aurora",
"cmd": "CY=0&FX=38"
},
"0xFFE01F": {
"label": "Bright +",
"pos": "3x1",
"cmd": "A=~16"
},
"0xFFA857": {
"label": "Bright -",
"pos": "3x2",
"cmd": "A=~-16"
},
"0xFF906F": {
"label": "White",
"pos": "3x3",
"cmd": "FP=5&CL=hFFFFFF&C2=hFFFFFF&C3=hA8A8A8"
},
"0xFF6897": {
"label": "Red",
"pos": "4x1",
"cmnt": "Lava",
"cmd": "FP=8"
},
"0xFF9867": {
"label": "Green",
"pos": "4x2",
"cmnt": "Forest",
"cmd": "FP=10"
},
"0xFFB04F": {
"label": "Blue",
"pos": "4x3",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xFF30CF": {
"label": "Tomato",
"pos": "5x1",
"cmd": "FP=5&CL=hFF6347&C2=hFFBF47&C3=hA85859"
},
"0xFF18E7": {
"label": "LightGreen",
"pos": "5x2",
"cmnt": "Rivendale",
"cmd": "FP=14"
},
"0xFF7A85": {
"label": "SkyBlue",
"pos": "5x3",
"cmnt": "Ocean",
"cmd": "FP=9"
},
"0xFF10EF": {
"label": "Orange",
"pos": "6x1",
"cmnt": "Orangery",
"cmd": "FP=47"
},
"0xFF38C7": {
"label": "Aqua",
"pos": "6x2",
"cmd": "FP=5&CL=hFFFF&C2=h7FFF&C3=h39A895"
},
"0xFF5AA5": {
"label": "Purple",
"pos": "6x3",
"cmd": "FP=5&CL=h663399&C2=h993399&C3=h473864"
},
"0xFF42BD": {
"label": "Yellow",
"pos": "7x1",
"cmd": "FP=5&CL=hFFFF00&C2=hFFC800&C3=hFDFFDE"
},
"0xFF4AB5": {
"label": "Cyan",
"pos": "7x2",
"cmnt": "Beech",
"cmd": "FP=22"
},
"0xFF52AD": {
"label": "Pink",
"pos": "7x3",
"cmd": "FP=5&CL=hFFC0CB&C2=hFFD4C0&C3=hA88C96"
}
}

View File

@@ -0,0 +1,147 @@
{
"desc": "24-key",
"0xF700FF": {
"label": "+",
"pos": "1x1",
"cmnt": "Speed +",
"cmd": "SX=~16"
},
"0xF7807F": {
"label": "-",
"pos": "1x2",
"cmnt": "Speed -",
"cmd": "SX=~-16"
},
"0xF740BF": {
"label": "On/Off",
"pos": "1x3",
"cmnt": "Toggle On/Off",
"cmd": "T=2"
},
"0xF7C03F": {
"label": "W",
"pos": "1x4",
"cmnt": "Cycle color palette",
"cmd": "FP=~"
},
"0xF720DF": {
"label": "R",
"pos": "2x1",
"cmnt": "Lava",
"cmd": "FP=8"
},
"0xF7A05F": {
"label": "G",
"pos": "2x2",
"cmnt": "Forest",
"cmd": "FP=10"
},
"0xF7609F": {
"label": "B",
"pos": "2x3",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xF7E01F": {
"label": "Bright -",
"pos": "2x4",
"cmnt": "Bright -",
"cmd": "A=~-16"
},
"0xF710EF": {
"label": "Timer1H",
"pos": "3x1",
"cmnt": "Timer 60 min",
"cmd": "NL=60&NT=0"
},
"0xF7906F": {
"label": "Timer4H",
"pos": "3x2",
"cmnt": "Timer 30 min",
"cmd": "NL=30&NT=0"
},
"0xF750AF": {
"label": "Timer8H",
"pos": "3x3",
"cmnt": "Timer 15 min",
"cmd": "NL=15&NT=0"
},
"0xF7D02F": {
"label": "Bright128",
"pos": "3x4",
"cmnt": "Bright 128",
"cmd": "A=128"
},
"0xF730CF": {
"label": "Music1",
"pos": "4x1",
"cmnt": "Cycle FX +",
"cmd": "FX=~"
},
"0xF7B04F": {
"label": "Music2",
"pos": "4x2",
"cmnt": "Cycle FX -",
"cmd": "FX=~-1"
},
"0xF7708F": {
"label": "Music3",
"pos": "4x3",
"cmnt": "Reset FX and FP",
"cmd": "FX=1&PF=6"
},
"0xF7F00F": {
"label": "Bright +",
"pos": "4x4",
"cmnt": "Bright +",
"cmd": "A=~16"
},
"0xF708F7": {
"label": "Mode1",
"pos": "5x1",
"cmnt": "Preset 1",
"cmd": "PL=1"
},
"0xF78877": {
"label": "Mode2",
"pos": "5x2",
"cmnt": "Preset 2",
"cmd": "PL=2"
},
"0xF748B7": {
"label": "Mode3",
"pos": "5x3",
"cmnt": "Preset 3",
"cmd": "PL=3"
},
"0xF7C837": {
"label": "Up",
"pos": "5x4",
"cmnt": "Intensity +",
"cmd": "IX=~16"
},
"0xF728D7": {
"label": "Mode4",
"pos": "6x1",
"cmnt": "Preset 4",
"cmd": "PL=4"
},
"0xF7A857": {
"label": "Mode5",
"pos": "6x2",
"cmnt": "Preset 5",
"cmd": "PL=5"
},
"0xF76897": {
"label": "Cycle",
"pos": "6x3",
"cmnt": "Toggle preset cycle",
"cmd": "CY=1&PT=60000"
},
"0xF7E817": {
"label": "Down",
"pos": "6x4",
"cmnt": "Intensity -",
"cmd": "IX=~-16"
}
}

View File

@@ -0,0 +1,185 @@
{
"desc": "32-key",
"0xFF08F7": {
"label": "On",
"pos": "1x1",
"cmd": "T=1"
},
"0xFFC03F": {
"label": "Off",
"pos": "1x2",
"cmd": "T=0"
},
"0xFF807F": {
"label": "Auto",
"pos": "1x3",
"cmnt": "Toggle preset cycle",
"cmd": "CY=2"
},
"0xFF609F": {
"label": "Mode",
"pos": "1x4",
"cmnt": "Cycle effects",
"cmd": "FX=~&CY=0"
},
"0xFF906F": {
"label": "4H",
"pos": "2x1",
"cmnt": "Timer 60min",
"cmd": "NL=60&NT=0"
},
"0xFFB847": {
"label": "6H",
"pos": "2x2",
"cmnt": "Timer 90min",
"cmd": "NL=90&NT=0"
},
"0xFFF807": {
"label": "8H",
"pos": "2x3",
"cmnt": "Timer 120min",
"cmd": "NL=120&NT=0"
},
"0xFFB04F": {
"label": "Timer Off",
"pos": "2x4",
"cmd": "NL=0"
},
"0xFF9867": {
"label": "Red",
"pos": "3x1",
"cmnt": "Lava",
"cmd": "FP=8"
},
"0xFFD827": {
"label": "Green",
"pos": "3x2",
"cmnt": "Forest",
"cmd": "FP=10"
},
"0xFF8877": {
"label": "Blue",
"pos": "3x3",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xFFA857": {
"label": "White",
"pos": "3x4",
"cmd": "FP=5&CL=hFFFFFF&C2=hFFE4CD&C3=hE4E4FF"
},
"0xFFE817": {
"label": "OrangeRed",
"pos": "4x1",
"cmnt": "Sakura",
"cmd": "FP=49"
},
"0xFF48B7": {
"label": "SeaGreen",
"pos": "4x2",
"cmnt": "Rivendale",
"cmd": "FP=14"
},
"0xFF6897": {
"label": "RoyalBlue",
"pos": "4x3",
"cmnt": "Ocean",
"cmd": "FP=9"
},
"0xFFB24D": {
"label": "DarkBlue",
"pos": "4x4",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xFF02FD": {
"label": "Orange",
"pos": "5x1",
"cmnt": "Orangery",
"cmd": "FP=47"
},
"0xFF32CD": {
"label": "YellowGreen",
"pos": "5x2",
"cmnt": "Aurora",
"cmd": "FP=37"
},
"0xFF20DF": {
"label": "SkyBlue",
"pos": "5x3",
"cmnt": "Beech",
"cmd": "FP=22"
},
"0xFF00FF": {
"label": "Orchid",
"pos": "5x4",
"cmd": "FP=5&CL=hDA70D6&C2=hDA70A0&C3=h89618F"
},
"0xFF50AF": {
"label": "Yellow",
"pos": "6x1",
"cmd": "FP=5&CL=hFFFF00&C2=hFFC800&C3=hFDFFDE"
},
"0xFF7887": {
"label": "DarkGreen",
"pos": "6x2",
"cmnt": "Orange and Teal",
"cmd": "FP=44"
},
"0xFF708F": {
"label": "RebeccaPurple",
"pos": "6x3",
"cmd": "FP=5&CL=h800080&C2=h800040&C3=h4B1C54"
},
"0xFF58A7": {
"label": "Plum",
"pos": "6x4",
"cmd": "FP=5&CL=hDDA0DD&C2=hDDA0BE&C3=h8D7791"
},
"0xFF38C7": {
"label": "Strobe",
"pos": "7x1",
"cmnt": "Dancing Shadows",
"cmd": "FX=112&CY=0"
},
"0xFF28D7": {
"label": "In Waves",
"pos": "7x2",
"cmnt": "Noise 1",
"cmd": "FX=70&CY=0"
},
"0xFFF00F": {
"label": "Speed +",
"pos": "7x3",
"cmd": "SX=~16"
},
"0xFF30CF": {
"label": "Speed -",
"pos": "7x4",
"cmd": "SX=~-16"
},
"0xFF40BF": {
"label": "Jump",
"pos": "8x1",
"cmnt": "Colortwinkles",
"cmd": "FX=74&CY=0"
},
"0xFF12ED": {
"label": "Fade",
"pos": "8x2",
"cmnt": "Sunrise",
"cmd": "FX=104&CY=0"
},
"0xFF2AD5": {
"label": "Flash",
"pos": "8x3",
"cmnt": "Railway",
"cmd": "FX=78&CY=0"
},
"0xFFA05F": {
"label": "Chase Flash",
"pos": "8x4",
"cmnt": "Washing Machine",
"cmd": "FX=113&CY=0"
}
}

View File

@@ -0,0 +1,233 @@
{
"desc": "40-key-black",
"0xFF3AC5": {
"label": "Bright +",
"pos": "1x1",
"cmd": "A=~16"
},
"0xFFBA45": {
"label": "Bright -",
"pos": "1x2",
"cmd": "A=~-16"
},
"0xFF827D": {
"label": "Off",
"pos": "1x3",
"cmd": "T=0"
},
"0xFF02FD": {
"label": "On",
"pos": "1x4",
"cmd": "T=1"
},
"0xFF1AE5": {
"label": "Red",
"pos": "2x1",
"cmnt": "Lava",
"cmd": "FP=8"
},
"0xFF9A65": {
"label": "Green",
"pos": "2x2",
"cmnt": "Forest",
"cmd": "FP=10"
},
"0xFFA25D": {
"label": "Blue",
"pos": "2x3",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xFF22DD": {
"label": "White",
"pos": "2x4",
"cmd": "FP=5&CL=hFFFFFF&C2=hFFFFFF&C3=hA8A8A8"
},
"0xFF2AD5": {
"label": "Tomato",
"pos": "3x1",
"cmnt": "Yelmag",
"cmd": "FP=5&CL=hFF6347&C2=hFFBF47&C3=hA85859"
},
"0xFFAA55": {
"label": "LightGreen",
"pos": "3x2",
"cmnt": "Rivendale",
"cmd": "FP=14"
},
"0xFF926D": {
"label": "SkyBlue",
"pos": "3x3",
"cmnt": "Ocean",
"cmd": "FP=9"
},
"0xFF12ED": {
"label": "WarmWhite",
"pos": "3x4",
"cmnt": "Warm White",
"cmd": "FP=5&CL=hFFE4CD&C2=hFFFCCD&C3=hA89892"
},
"0xFF0AF5": {
"label": "OrangeRed",
"pos": "4x1",
"cmnt": "Sakura",
"cmd": "FP=49"
},
"0xFF8A75": {
"label": "Cyan",
"pos": "4x2",
"cmnt": "Beech",
"cmd": "FP=22"
},
"0xFFB24D": {
"label": "RebeccaPurple",
"pos": "4x3",
"cmd": "FP=5&CL=h663399&C2=h993399&C3=h473864"
},
"0xFF32CD": {
"label": "CoolWhite",
"pos": "4x4",
"cmnt": "Cool White",
"cmd": "FP=5&CL=hE4E4FF&C2=hF1E4FF&C3=h9C9EA8"
},
"0xFF38C7": {
"label": "Orange",
"pos": "5x1",
"cmnt": "Orangery",
"cmd": "FP=47"
},
"0xFFB847": {
"label": "Turquoise",
"pos": "5x2",
"cmd": "FP=5&CL=h40E0D0&C2=h40A0E0&C3=h4E9381"
},
"0xFF7887": {
"label": "Purple",
"pos": "5x3",
"cmd": "FP=5&CL=h800080&C2=h800040&C3=h4B1C54"
},
"0xFFF807": {
"label": "MedGray",
"pos": "5x4",
"cmnt": "Cycle palette +",
"cmd": "FP=~"
},
"0xFF18E7": {
"label": "Yellow",
"pos": "6x1",
"cmd": "FP=5&CL=hFFFF00&C2=h7FFF00&C3=hA89539"
},
"0xFF9867": {
"label": "DarkCyan",
"pos": "6x2",
"cmd": "FP=5&CL=h8B8B&C2=h458B&C3=h1F5B51"
},
"0xFF58A7": {
"label": "Plum",
"pos": "6x3",
"cmnt": "Magenta",
"cmd": "FP=40"
},
"0xFFD827": {
"label": "DarkGray",
"pos": "6x4",
"cmnt": "Cycle palette -",
"cmd": "FP=~-"
},
"0xFF28D7": {
"label": "Jump3",
"pos": "7x1",
"cmnt": "Colortwinkles",
"cmd": "CY=0&FX=74"
},
"0xFFA857": {
"label": "Fade3",
"pos": "7x2",
"cmnt": "Rain",
"cmd": "CY=0&FX=43"
},
"0xFF6897": {
"label": "Flash",
"pos": "7x3",
"cmnt": "Cycle Effects",
"cmd": "CY=0&FX=~"
},
"0xFFE817": {
"label": "Quick",
"pos": "7x4",
"cmnt": "Fx speed +16",
"cmd": "SX=~16"
},
"0xFF08F7": {
"label": "Jump7",
"pos": "8x1",
"cmnt": "Sinelon Dual",
"cmd": "CY=0&FX=93"
},
"0xFF8877": {
"label": "Fade7",
"pos": "8x2",
"cmnt": "Lighthouse",
"cmd": "CY=0&FX=41"
},
"0xFF48B7": {
"label": "Auto",
"pos": "8x3",
"cmnt": "Toggle preset cycle",
"cmd": "CY=2"
},
"0xFFC837": {
"label": "Slow",
"pos": "8x4",
"cmnt": "FX speed -16",
"cmd": "SX=~-16"
},
"0xFF30CF": {
"label": "Custom1",
"pos": "9x1",
"cmnt": "Noise 1",
"cmd": "CY=0&FX=70"
},
"0xFFB04F": {
"label": "Custom2",
"pos": "9x2",
"cmnt": "Dancing Shadows",
"cmd": "CY=0&FX=112"
},
"0xFF708F": {
"label": "Music +",
"pos": "9x3",
"cmnt": "FX Intensity +16",
"cmd": "IX=~16"
},
"0xFFF00F": {
"label": "Timer60",
"pos": "9x4",
"cmnt": "Timer 60 min",
"cmd": "NL=60&NT=0"
},
"0xFF10EF": {
"label": "Custom3",
"pos": "10x1",
"cmnt": "Twinklefox",
"cmd": "CY=0&FX=80"
},
"0xFF906F": {
"label": "Custom4",
"pos": "10x2",
"cmnt": "Twinklecat",
"cmd": "CY=0&FX=81"
},
"0xFF50AF": {
"label": "Music -",
"pos": "10x3",
"cmnt": "FX Intesity -16",
"cmd": "IX=~-16"
},
"0xFFD02F": {
"label": "Timer120",
"pos": "10x4",
"cmnt": "Timer 120 min",
"cmd": "NL=120&NT=0"
}
}

View File

@@ -0,0 +1,217 @@
{
"desc": "40-key-blue",
"0xFF3AC5": {
"label": "Bright +",
"pos": "1x1",
"cmd": "A=~16"
},
"0xFFBA45": {
"label": "Bright -",
"pos": "1x2",
"cmd": "A=~-16"
},
"0xFF827D": {
"label": "Off",
"pos": "1x3",
"cmd": "T=0"
},
"0xFF02FD": {
"label": "On",
"pos": "1x4",
"cmd": "T=1"
},
"0xFF1AE5": {
"label": "Red",
"pos": "2x1",
"cmnt": "Lava",
"cmd": "FP=8"
},
"0xFF9A65": {
"label": "Green",
"pos": "2x2",
"cmnt": "Forest",
"cmd": "FP=10"
},
"0xFFA25D": {
"label": "Blue",
"pos": "2x3",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xFF22DD": {
"label": "White",
"pos": "2x4",
"cmd": "FP=5&CL=hFFFFFF&C2=hFFFFFF&C3=hA8A8A8"
},
"0xFF2AD5": {
"label": "Tomato",
"pos": "3x1",
"cmnt": "Yelmag",
"cmd": "FP=5&CL=hFF6347&C2=hFFBF47&C3=hA85859"
},
"0xFFAA55": {
"label": "LightGreen",
"pos": "3x2",
"cmnt": "Rivendale",
"cmd": "FP=14"
},
"0xFF926D": {
"label": "SkyBlue",
"pos": "3x3",
"cmnt": "Ocean",
"cmd": "FP=9"
},
"0xFF12ED": {
"label": "WarmWhite",
"pos": "3x4",
"cmnt": "Warm White",
"cmd": "FP=5&CL=hFFE4CD&C2=hFFFCCD&C3=hA89892"
},
"0xFF0AF5": {
"label": "OrangeRed",
"pos": "4x1",
"cmnt": "Sakura",
"cmd": "FP=49"
},
"0xFF8A75": {
"label": "Cyan",
"pos": "4x2",
"cmnt": "Beech",
"cmd": "FP=22"
},
"0xFFB24D": {
"label": "RebeccaPurple",
"pos": "4x3",
"cmd": "FP=5&CL=h663399&C2=h993399&C3=h473864"
},
"0xFF32CD": {
"label": "CoolWhite",
"pos": "4x4",
"cmnt": "Cool White",
"cmd": "FP=5&CL=hE4E4FF&C2=hF1E4FF&C3=h9C9EA8"
},
"0xFF38C7": {
"label": "Orange",
"pos": "5x1",
"cmnt": "Orangery",
"cmd": "FP=47"
},
"0xFFB847": {
"label": "Turquoise",
"pos": "5x2",
"cmd": "FP=5&CL=h40E0D0&C2=h40A0E0&C3=h4E9381"
},
"0xFF7887": {
"label": "Purple",
"pos": "5x3",
"cmd": "FP=5&CL=h800080&C2=h800040&C3=h4B1C54"
},
"0xFFF807": {
"label": "MedGray",
"pos": "5x4",
"cmnt": "Cycle palette +",
"cmd": "FP=~"
},
"0xFF18E7": {
"label": "Yellow",
"pos": "6x1",
"cmd": "FP=5&CL=hFFFF00&C2=h7FFF00&C3=hA89539"
},
"0xFF9867": {
"label": "DarkCyan",
"pos": "6x2",
"cmd": "FP=5&CL=h8B8B&C2=h458B&C3=h1F5B51"
},
"0xFF58A7": {
"label": "Plum",
"pos": "6x3",
"cmnt": "Magenta",
"cmd": "FP=40"
},
"0xFFD827": {
"label": "DarkGray",
"pos": "6x4",
"cmnt": "Cycle palette -",
"cmd": "FP=~-"
},
"0xFF28D7": {
"label": "W +",
"pos": "7x1"
},
"0xFFA857": {
"label": "W -",
"pos": "7x2"
},
"0xFF6897": {
"label": "W On",
"pos": "7x3"
},
"0xFFE817": {
"label": "W Off",
"pos": "7x4"
},
"0xFF08F7": {
"label": "W25",
"pos": "8x1"
},
"0xFF8877": {
"label": "W50",
"pos": "8x2"
},
"0xFF48B7": {
"label": "W75",
"pos": "8x3"
},
"0xFFC837": {
"label": "W100",
"pos": "8x4"
},
"0xFF30CF": {
"label": "Jump3",
"pos": "9x1",
"cmnt": "Colortwinkles",
"cmd": "CY=0&FX=74"
},
"0xFFB04F": {
"label": "Fade3",
"pos": "9x2",
"cmnt": "Rain",
"cmd": "CY=0&FX=43"
},
"0xFF708F": {
"label": "Jump7",
"pos": "9x3",
"cmnt": "Sinelon Dual",
"cmd": "CY=0&FX=93"
},
"0xFFF00F": {
"label": "Quick",
"pos": "9x4",
"cmnt": "Fx speed +16",
"cmd": "SX=~16"
},
"0xFF10EF": {
"label": "Fade",
"pos": "10x1",
"cmnt": "Lighthouse",
"cmd": "CY=0&FX=41"
},
"0xFF906F": {
"label": "Flash",
"pos": "10x2",
"cmnt": "Cycle Effects",
"cmd": "CY=0&FX=~"
},
"0xFF50AF": {
"label": "Auto",
"pos": "10x3",
"cmnt": "Toggle preset cycle",
"cmd": "CY=2"
},
"0xFFD02F": {
"label": "Slow",
"pos": "10x4",
"cmnt": "Sinelon Dual",
"cmd": "CY=0&FX=93"
}
}

View File

@@ -0,0 +1,241 @@
{
"desc": "44-key",
"0xFF3AC5": {
"label": "Bright +",
"pos": "1x1",
"cmd": "A=~16"
},
"0xFFBA45": {
"label": "Bright -",
"pos": "1x2",
"cmd": "A=~-16"
},
"0xFF827D": {
"label": "Off",
"pos": "1x3",
"cmd": "T=0"
},
"0xFF02FD": {
"label": "On",
"pos": "1x4",
"cmd": "T=1"
},
"0xFF1AE5": {
"label": "Red",
"pos": "2x1",
"cmnt": "Lava",
"cmd": "FP=8"
},
"0xFF9A65": {
"label": "Green",
"pos": "2x2",
"cmnt": "Forest",
"cmd": "FP=10"
},
"0xFFA25D": {
"label": "Blue",
"pos": "2x3",
"cmnt": "Breeze",
"cmd": "FP=15"
},
"0xFF22DD": {
"label": "White",
"pos": "2x4",
"cmd": "FP=5&CL=hFFFFFF&C2=hFFFFFF&C3=hA8A8A8"
},
"0xFF2AD5": {
"label": "Tomato",
"pos": "3x1",
"cmd": "FP=5&CL=hFF6347&C2=hFFBF47&C3=hA85859"
},
"0xFFAA55": {
"label": "LightGreen",
"pos": "3x2",
"cmnt": "Rivendale",
"cmd": "FP=14"
},
"0xFF926D": {
"label": "DeepBlue",
"pos": "3x3",
"cmnt": "Ocean",
"cmd": "FP=9"
},
"0xFF12ED": {
"label": "Warmwhite2",
"pos": "3x4",
"cmnt": "Warm White",
"cmd": "FP=5&CL=hFFE4CD&C2=hFFFCCD&C3=hA89892"
},
"0xFF0AF5": {
"label": "Orange",
"pos": "4x1",
"cmnt": "Sakura",
"cmd": "FP=49"
},
"0xFF8A75": {
"label": "Turquoise",
"pos": "4x2",
"cmnt": "Beech",
"cmd": "FP=22"
},
"0xFFB24D": {
"label": "Purple",
"pos": "4x3",
"cmd": "FP=5&CL=h663399&C2=h993399&C3=h473864"
},
"0xFF32CD": {
"label": "WarmWhite",
"pos": "4x4",
"cmd": "FP=5&CL=hE4E4FF&C2=hF1E4FF&C3=h9C9EA8"
},
"0xFF38C7": {
"label": "Yellowish",
"pos": "5x1",
"cmnt": "Orangery",
"cmd": "FP=47"
},
"0xFFB847": {
"label": "Cyan",
"pos": "5x2",
"cmnt": "Beech",
"cmd": "FP=22"
},
"0xFF7887": {
"label": "Magenta",
"pos": "5x3",
"cmd": "FP=5&CL=hFF00FF&C2=hFF007F&C3=h9539A8"
},
"0xFFF807": {
"label": "ColdWhite",
"pos": "5x4",
"cmd": "FP=5&CL=hE4E4FF&C2=hF1E4FF&C3=h9C9EA8"
},
"0xFF18E7": {
"label": "Yellow",
"pos": "6x1",
"cmd": "FP=5&CL=hFFFF00&C2=hFFC800&C3=hFDFFDE"
},
"0xFF9867": {
"label": "Aqua",
"pos": "6x2",
"cmd": "FP=5&CL=hFFFF&C2=h7FFF&C3=h39A895"
},
"0xFF58A7": {
"label": "Pink",
"pos": "6x3",
"cmd": "FP=5&CL=hFFC0CB&C2=hFFD4C0&C3=hA88C96"
},
"0xFFD827": {
"label": "ColdWhite2",
"pos": "6x4",
"cmd": "FP=5&CL=hE4E4FF&C2=hF1E4FF&C3=h9C9EA8"
},
"0xFF28D7": {
"label": "Red +",
"pos": "7x1",
"cmd": "FP=5&R=~16"
},
"0xFFA857": {
"label": "Green +",
"pos": "7x2",
"cmd": "FP=5&G=~16"
},
"0xFF6897": {
"label": "Blue +",
"pos": "7x3",
"cmd": "FP=5&B=~16"
},
"0xFFE817": {
"label": "Quick",
"pos": "7x4",
"cmnt": "Fx speed +16",
"cmd": "SX=~16"
},
"0xFF08F7": {
"label": "Red -",
"pos": "8x1",
"cmd": "FP=5&R=~-16"
},
"0xFF8877": {
"label": "Green -",
"pos": "8x2",
"cmd": "FP=5&G=~-16"
},
"0xFF48B7": {
"label": "Blue -",
"pos": "8x3",
"cmd": "FP=5&B=~-16"
},
"0xFFC837": {
"label": "Slow",
"pos": "8x4",
"cmnt": "FX speed -16",
"cmd": "SX=~-16"
},
"0xFF30CF": {
"label": "Diy1",
"pos": "9x1",
"cmd": "CY=0&PL=1"
},
"0xFFB04F": {
"label": "Diy2",
"pos": "9x2",
"cmd": "CY=0&PL=2"
},
"0xFF708F": {
"label": "Diy3",
"pos": "9x3",
"cmd": "CY=0&PL=3"
},
"0xFFF00F": {
"label": "Auto",
"pos": "9x4",
"cmnt": "Toggle preset cycle",
"cmd": "CY=2"
},
"0xFF10EF": {
"label": "Diy4",
"pos": "10x1",
"cmd": "CY=0&PL=4"
},
"0xFF906F": {
"label": "Diy5",
"pos": "10x2",
"cmd": "CY=0&PL=5"
},
"0xFF50AF": {
"label": "Diy6",
"pos": "10x3",
"cmd": "CY=0&PL=6"
},
"0xFFD02F": {
"label": "Flash",
"pos": "10x4",
"cmnt": "Cycle Effects",
"cmd": "CY=0&FX=~"
},
"0xFF20DF": {
"label": "Jump3",
"pos": "11x1",
"cmnt": "Colortwinkles",
"cmd": "CY=0&FX=74"
},
"0xFFA05F": {
"label": "Jump7",
"pos": "11x2",
"cmnt": "Sinelon Dual",
"cmd": "CY=0&FX=93"
},
"0xFF609F": {
"label": "Fade3",
"pos": "11x3",
"cmnt": "Rain",
"cmd": "CY=0&FX=43"
},
"0xFFE01F": {
"label": "Fade7",
"pos": "11x4",
"cmnt": "Lighthouse",
"cmd": "CY=0&FX=41"
}
}

View File

@@ -0,0 +1,38 @@
{
"desc": "6-key",
"0xFF0FF0": {
"label": "Power",
"pos": "1x1",
"cmd": "T=2"
},
"0xFF8F70": {
"label": "Channel +",
"pos": "2x1",
"cmnt": "Cycle palette up",
"cmd": "FP=~"
},
"0xFF4FB0": {
"label": "Channel -",
"pos": "3x1",
"cmnt": "Cycle palette down",
"cmd": "FP=~-"
},
"0xFFCF30": {
"label": "Volume +",
"pos": "4x1",
"cmnt": "Brighten",
"cmd": "A=~16"
},
"0xFF2FD0": {
"label": "Volume -",
"pos": "5x1",
"cmnt": "Dim",
"cmd": "A=~-16"
},
"0xFFAF50": {
"label": "Mute",
"pos": "6x1",
"cmnt": "Cycle effects",
"cmd": "CY=0&FX=~"
}
}

View File

@@ -0,0 +1,47 @@
{
"desc": "9-key",
"0xFF629D": {
"label": "Power",
"cmd": "T=2"
},
"0xFF22DD": {
"label": "A",
"cmnt": "Preset 1",
"cmd": "PL=1"
},
"0xFF02FD": {
"label": "B",
"cmnt": "Preset 2",
"cmd": "PL=2"
},
"0xFFC23D": {
"label": "C",
"cmnt": "Preset 3",
"cmd": "PL=3"
},
"0xFF30CF": {
"label": "Left",
"cmnt": "Speed -",
"cmd": "SI=~-16"
},
"0xFF7A85": {
"label": "Right",
"cmnt": "Speed +",
"cmd": "SI=~16"
},
"0xFF9867": {
"label": "Up",
"cmnt": "Bright +",
"cmd": "A=~16"
},
"0xFF38C7": {
"label": "Down",
"cmnt": "Bright -",
"cmd": "A=~-16"
},
"0xFF18E7": {
"label": "Select",
"cmnt": "Cycle effects",
"cmd": "CY=0&FX=~"
}
}

Binary file not shown.

View File

@@ -0,0 +1,108 @@
import colorsys
import json
import openpyxl
named_colors = {'AliceBlue': '0xF0F8FF', 'AntiqueWhite': '0xFAEBD7', 'Aqua': '0x00FFFF',
'Aquamarine': '0x7FFFD4', 'Azure': '0xF0FFFF', 'Beige': '0xF5F5DC', 'Bisque': '0xFFE4C4',
'Black': '0x000000', 'BlanchedAlmond': '0xFFEBCD', 'Blue': '0x0000FF',
'BlueViolet': '0x8A2BE2', 'Brown': '0xA52A2A', 'BurlyWood': '0xDEB887',
'CadetBlue': '0x5F9EA0', 'Chartreuse': '0x7FFF00', 'Chocolate': '0xD2691E',
'Coral': '0xFF7F50', 'CornflowerBlue': '0x6495ED', 'Cornsilk': '0xFFF8DC',
'Crimson': '0xDC143C', 'Cyan': '0x00FFFF', 'DarkBlue': '0x00008B', 'DarkCyan': '0x008B8B',
'DarkGoldenRod': '0xB8860B', 'DarkGray': '0xA9A9A9', 'DarkGrey': '0xA9A9A9',
'DarkGreen': '0x006400', 'DarkKhaki': '0xBDB76B', 'DarkMagenta': '0x8B008B',
'DarkOliveGreen': '0x556B2F', 'DarkOrange': '0xFF8C00', 'DarkOrchid': '0x9932CC',
'DarkRed': '0x8B0000', 'DarkSalmon': '0xE9967A', 'DarkSeaGreen': '0x8FBC8F',
'DarkSlateBlue': '0x483D8B', 'DarkSlateGray': '0x2F4F4F', 'DarkSlateGrey': '0x2F4F4F',
'DarkTurquoise': '0x00CED1', 'DarkViolet': '0x9400D3', 'DeepPink': '0xFF1493',
'DeepSkyBlue': '0x00BFFF', 'DimGray': '0x696969', 'DimGrey': '0x696969',
'DodgerBlue': '0x1E90FF', 'FireBrick': '0xB22222', 'FloralWhite': '0xFFFAF0',
'ForestGreen': '0x228B22', 'Fuchsia': '0xFF00FF', 'Gainsboro': '0xDCDCDC',
'GhostWhite': '0xF8F8FF', 'Gold': '0xFFD700', 'GoldenRod': '0xDAA520', 'Gray': '0x808080',
'Grey': '0x808080', 'Green': '0x008000', 'GreenYellow': '0xADFF2F', 'HoneyDew': '0xF0FFF0',
'HotPink': '0xFF69B4', 'IndianRed': '0xCD5C5C', 'Indigo': '0x4B0082', 'Ivory': '0xFFFFF0',
'Khaki': '0xF0E68C', 'Lavender': '0xE6E6FA', 'LavenderBlush': '0xFFF0F5',
'LawnGreen': '0x7CFC00', 'LemonChiffon': '0xFFFACD', 'LightBlue': '0xADD8E6',
'LightCoral': '0xF08080', 'LightCyan': '0xE0FFFF', 'LightGoldenRodYellow': '0xFAFAD2',
'LightGray': '0xD3D3D3', 'LightGrey': '0xD3D3D3', 'LightGreen': '0x90EE90',
'LightPink': '0xFFB6C1', 'LightSalmon': '0xFFA07A', 'LightSeaGreen': '0x20B2AA',
'LightSkyBlue': '0x87CEFA', 'LightSlateGray': '0x778899', 'LightSlateGrey': '0x778899',
'LightSteelBlue': '0xB0C4DE', 'LightYellow': '0xFFFFE0', 'Lime': '0x00FF00',
'LimeGreen': '0x32CD32', 'Linen': '0xFAF0E6', 'Magenta': '0xFF00FF', 'Maroon': '0x800000',
'MediumAquaMarine': '0x66CDAA', 'MediumBlue': '0x0000CD', 'MediumOrchid': '0xBA55D3',
'MediumPurple': '0x9370DB', 'MediumSeaGreen': '0x3CB371', 'MediumSlateBlue': '0x7B68EE',
'MediumSpringGreen': '0x00FA9A', 'MediumTurquoise': '0x48D1CC', 'MediumVioletRed': '0xC71585',
'MidnightBlue': '0x191970', 'MintCream': '0xF5FFFA', 'MistyRose': '0xFFE4E1',
'Moccasin': '0xFFE4B5', 'NavajoWhite': '0xFFDEAD', 'Navy': '0x000080', 'OldLace': '0xFDF5E6',
'Olive': '0x808000', 'OliveDrab': '0x6B8E23', 'Orange': '0xFFA500', 'OrangeRed': '0xFF4500',
'Orchid': '0xDA70D6', 'PaleGoldenRod': '0xEEE8AA', 'PaleGreen': '0x98FB98',
'PaleTurquoise': '0xAFEEEE', 'PaleVioletRed': '0xDB7093', 'PapayaWhip': '0xFFEFD5',
'PeachPuff': '0xFFDAB9', 'Peru': '0xCD853F', 'Pink': '0xFFC0CB', 'Plum': '0xDDA0DD',
'PowderBlue': '0xB0E0E6', 'Purple': '0x800080', 'RebeccaPurple': '0x663399', 'Red': '0xFF0000',
'RosyBrown': '0xBC8F8F', 'RoyalBlue': '0x4169E1', 'SaddleBrown': '0x8B4513', 'Salmon': '0xFA8072',
'SandyBrown': '0xF4A460', 'SeaGreen': '0x2E8B57', 'SeaShell': '0xFFF5EE', 'Sienna': '0xA0522D',
'Silver': '0xC0C0C0', 'SkyBlue': '0x87CEEB', 'SlateBlue': '0x6A5ACD', 'SlateGray': '0x708090',
'SlateGrey': '0x708090', 'Snow': '0xFFFAFA', 'SpringGreen': '0x00FF7F', 'SteelBlue': '0x4682B4',
'Tan': '0xD2B48C', 'Teal': '0x008080', 'Thistle': '0xD8BFD8', 'Tomato': '0xFF6347',
'Turquoise': '0x40E0D0', 'Violet': '0xEE82EE', 'Wheat': '0xF5DEB3', 'White': '0xFFFFFF',
'WhiteSmoke': '0xF5F5F5', 'Yellow': '0xFFFF00', 'YellowGreen': '0x9ACD32'}
def shift_color(col, shift=30, sat=1.0, val=1.0):
r = (col & (255 << 16)) >> 16
g = (col & (255 << 8)) >> 8
b = col & 255
hsv = colorsys.rgb_to_hsv(r, g, b)
h = (((hsv[0] * 360) + shift) % 360) / 360
rgb = colorsys.hsv_to_rgb(h, hsv[1] * sat, hsv[2] * val)
return (int(rgb[0]) << 16) + (int(rgb[1]) << 8) + int(rgb[2])
def parse_sheet(ws):
print(f'Parsing worksheet {ws.title}')
ir = {"desc": ws.title}
rows = ws.rows
keys = [col.value.lower() for col in next(rows)]
for row in rows:
rec = dict(zip(keys, [col.value for col in row]))
if rec.get('code') is None:
continue
cd = {"label": rec.get('label')}
if rec.get('row'):
cd['pos'] = f'{rec["row"]}x{rec["col"]}'
if rec.get('comment'):
cd['cmnt'] = rec.get('comment')
if rec.get('rpt'):
cd['rpt'] = bool(rec['rpt'])
if rec.get('cmd'):
cd['cmd'] = rec['cmd']
elif all((rec.get('primary'), rec.get('secondary'), rec.get('tertiary'))):
c1 = int(rec.get('primary'), 16)
c2 = int(rec.get('secondary'), 16)
c3 = int(rec.get('tertiary'), 16)
cd['cmd'] = f'FP=5&CL=h{c1:X}&C2=h{c2:X}&C3=h{c3:X}'
elif all((rec.get('primary'), rec.get('secondary'))):
c1 = int(rec.get('primary'), 16)
c2 = int(rec.get('secondary'), 16)
c3 = shift_color(c1, -1, sat=0.66, val=0.66)
cd['cmd'] = f'FP=5&CL=h{c1:X}&C2=h{c2:X}&C3=h{c3:X}'
elif rec.get('primary'):
c1 = int(rec.get('primary'), 16)
c2 = shift_color(c1, 30)
c3 = shift_color(c1, -10, sat=0.66, val=0.66)
cd['cmd'] = f'FP=5&CL=h{c1:X}&C2=h{c2:X}&C3=h{c3:X}'
elif rec.get('label') in named_colors:
c1 = int(named_colors[rec.get('label')], 16)
c2 = shift_color(c1, 30)
c3 = shift_color(c1, -10, sat=0.66, val=0.66)
cd['cmd'] = f'FP=5&CL=h{c1:X}&C2=h{c2:X}&C3=h{c3:X}'
else:
print(f'Did not find a command or color for {rec["label"]}. Hint use named CSS colors as labels')
ir[rec['code']] = cd
with open(f'{ws.title}_ir.json', 'w') as fp:
json.dump(ir, fp, indent=2)
if __name__ == '__main__':
wb = openpyxl.load_workbook('IR_Remote_Codes.xlsx')
for ws in wb.worksheets:
parse_sheet(ws)

View File

@@ -0,0 +1,33 @@
# JSON IR remote
## Purpose
The JSON IR remote allows users to customize IR remote behavior without writing custom code and compiling.
It also enables using any remote that is compatible with your IR receiver. Using the JSON IR remote, you can
map buttons from any remote to any HTTP request API or JSON API command.
## Usage
* Upload the IR config file, named _ir.json_ to your board using the [ip address]/edit url. Pick from one of the included files or create your own.
* On the config > LED settings page, set the correct IR pin.
* On the config > Sync Interfaces page, select "JSON Remote" as the Infrared remote.
## Modification
* See if there is a json file with the same number of buttons as your remote. Many remotes will have the same internals and emit the same codes but have different labels.
* In the ir.json file, each key will be the hex encoded IR code.
* The "cmd" property will be the HTTP Request API or JSON API to execute when that button is pressed.
* A limited number of c functions are supported (!incBrightness, !decBrightness, !presetFallback)
* When using !presetFallback, include properties PL (preset to load), FX (effect to fall back to) and FP (palette to fall back to)
* If the command is _repeatable_ and does not contain the "~" character, add a "rpt": true property.
* Other properties are ignored, but having a label property may help when editing.
Sample:
{
"0xFF629D": {"cmd": "T=2", "rpt": true, "label": "Toggle on/off"}, // HTTP command
"0xFF9867": {"cmd": "A=~16", "label": "Inc brightness"}, // HTTP command with incrementing
"0xFF38C7": {"cmd": {"bri": 10}, "label": "Dim to 10"}, // JSON command
"0xFF22DD": {"cmd": "!presetFallback", "PL": 1, "FX": 16, "FP": 6,
"label": "Preset 1 or fallback to Saw - Party"}, // c function
}

321
usermods/MY9291/MY92xx.h Normal file
View File

@@ -0,0 +1,321 @@
/*
MY92XX LED Driver for Arduino
Based on the C driver by MaiKe Labs
Copyright (c) 2016 - 2026 MaiKe Labs
Copyright (C) 2017 - 2018 Xose Pérez for the Arduino compatible library
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _my92xx_h
#define _my92xx_h
#include <Arduino.h>
#ifdef DEBUG_MY92XX
#if ARDUINO_ARCH_ESP8266
#define DEBUG_MSG_MY92XX(...) DEBUG_MY92XX.printf( __VA_ARGS__ )
#elif ARDUINO_ARCH_AVR
#define DEBUG_MSG_MY92XX(...) { char buffer[80]; snprintf(buffer, sizeof(buffer), __VA_ARGS__ ); DEBUG_MY92XX.print(buffer); }
#endif
#else
#define DEBUG_MSG_MY92XX(...)
#endif
typedef enum my92xx_model_t {
MY92XX_MODEL_MY9291 = 0X00,
MY92XX_MODEL_MY9231 = 0X01,
} my92xx_model_t;
typedef enum my92xx_cmd_one_shot_t {
MY92XX_CMD_ONE_SHOT_DISABLE = 0X00,
MY92XX_CMD_ONE_SHOT_ENFORCE = 0X01,
} my92xx_cmd_one_shot_t;
typedef enum my92xx_cmd_reaction_t {
MY92XX_CMD_REACTION_FAST = 0X00,
MY92XX_CMD_REACTION_SLOW = 0X01,
} my92xx_cmd_reaction_t;
typedef enum my92xx_cmd_bit_width_t {
MY92XX_CMD_BIT_WIDTH_16 = 0X00,
MY92XX_CMD_BIT_WIDTH_14 = 0X01,
MY92XX_CMD_BIT_WIDTH_12 = 0X02,
MY92XX_CMD_BIT_WIDTH_8 = 0X03,
} my92xx_cmd_bit_width_t;
typedef enum my92xx_cmd_frequency_t {
MY92XX_CMD_FREQUENCY_DIVIDE_1 = 0X00,
MY92XX_CMD_FREQUENCY_DIVIDE_4 = 0X01,
MY92XX_CMD_FREQUENCY_DIVIDE_16 = 0X02,
MY92XX_CMD_FREQUENCY_DIVIDE_64 = 0X03,
} my92xx_cmd_frequency_t;
typedef enum my92xx_cmd_scatter_t {
MY92XX_CMD_SCATTER_APDM = 0X00,
MY92XX_CMD_SCATTER_PWM = 0X01,
} my92xx_cmd_scatter_t;
typedef struct {
my92xx_cmd_scatter_t scatter : 1;
my92xx_cmd_frequency_t frequency : 2;
my92xx_cmd_bit_width_t bit_width : 2;
my92xx_cmd_reaction_t reaction : 1;
my92xx_cmd_one_shot_t one_shot : 1;
unsigned char resv : 1;
} __attribute__((aligned(1), packed)) my92xx_cmd_t;
#define MY92XX_COMMAND_DEFAULT { \
.scatter = MY92XX_CMD_SCATTER_APDM, \
.frequency = MY92XX_CMD_FREQUENCY_DIVIDE_1, \
.bit_width = MY92XX_CMD_BIT_WIDTH_8, \
.reaction = MY92XX_CMD_REACTION_FAST, \
.one_shot = MY92XX_CMD_ONE_SHOT_DISABLE, \
.resv = 0 \
}
class my92xx {
public:
my92xx(my92xx_model_t model, unsigned char chips, unsigned char di, unsigned char dcki, my92xx_cmd_t command);
unsigned char getChannels();
void setChannel(unsigned char channel, unsigned int value);
unsigned int getChannel(unsigned char channel);
void setState(bool state);
bool getState();
void update();
private:
void _di_pulse(unsigned int times);
void _dcki_pulse(unsigned int times);
void _set_cmd(my92xx_cmd_t command);
void _send();
void _write(unsigned int data, unsigned char bit_length);
my92xx_cmd_t _command;
my92xx_model_t _model = MY92XX_MODEL_MY9291;
unsigned char _chips = 1;
unsigned char _channels;
uint16_t* _value;
bool _state = false;
unsigned char _pin_di;
unsigned char _pin_dcki;
};
#if ARDUINO_ARCH_ESP8266
extern "C" {
void os_delay_us(unsigned int);
}
#elif ARDUINO_ARCH_AVR
#define os_delay_us delayMicroseconds
#endif
void my92xx::_di_pulse(unsigned int times) {
for (unsigned int i = 0; i < times; i++) {
digitalWrite(_pin_di, HIGH);
digitalWrite(_pin_di, LOW);
}
}
void my92xx::_dcki_pulse(unsigned int times) {
for (unsigned int i = 0; i < times; i++) {
digitalWrite(_pin_dcki, HIGH);
digitalWrite(_pin_dcki, LOW);
}
}
void my92xx::_write(unsigned int data, unsigned char bit_length) {
unsigned int mask = (0x01 << (bit_length - 1));
for (unsigned int i = 0; i < bit_length / 2; i++) {
digitalWrite(_pin_dcki, LOW);
digitalWrite(_pin_di, (data & mask) ? HIGH : LOW);
digitalWrite(_pin_dcki, HIGH);
data = data << 1;
digitalWrite(_pin_di, (data & mask) ? HIGH : LOW);
digitalWrite(_pin_dcki, LOW);
digitalWrite(_pin_di, LOW);
data = data << 1;
}
}
void my92xx::_set_cmd(my92xx_cmd_t command) {
// ets_intr_lock();
// TStop > 12us.
os_delay_us(12);
// Send 12 DI pulse, after 6 pulse's falling edge store duty data, and 12
// pulse's rising edge convert to command mode.
_di_pulse(12);
// Delay >12us, begin send CMD data
os_delay_us(12);
// Send CMD data
unsigned char command_data = *(unsigned char*)(&command);
for (unsigned char i = 0; i < _chips; i++) {
_write(command_data, 8);
}
// TStart > 12us. Delay 12 us.
os_delay_us(12);
// Send 16 DI pulseat 14 pulse's falling edge store CMD data, and
// at 16 pulse's falling edge convert to duty mode.
_di_pulse(16);
// TStop > 12us.
os_delay_us(12);
// ets_intr_unlock();
}
void my92xx::_send() {
#ifdef DEBUG_MY92XX
DEBUG_MSG_MY92XX("[MY92XX] Refresh: %s (", _state ? "ON" : "OFF");
for (unsigned char channel = 0; channel < _channels; channel++) {
DEBUG_MSG_MY92XX(" %d", _value[channel]);
}
DEBUG_MSG_MY92XX(" )\n");
#endif
unsigned char bit_length = 8;
switch (_command.bit_width) {
case MY92XX_CMD_BIT_WIDTH_16:
bit_length = 16;
break;
case MY92XX_CMD_BIT_WIDTH_14:
bit_length = 14;
break;
case MY92XX_CMD_BIT_WIDTH_12:
bit_length = 12;
break;
case MY92XX_CMD_BIT_WIDTH_8:
bit_length = 8;
break;
default:
bit_length = 8;
break;
}
// ets_intr_lock();
// TStop > 12us.
os_delay_us(12);
// Send color data
for (unsigned char channel = 0; channel < _channels; channel++) {
_write(_state ? _value[channel] : 0, bit_length);
}
// TStart > 12us. Ready for send DI pulse.
os_delay_us(12);
// Send 8 DI pulse. After 8 pulse falling edge, store old data.
_di_pulse(8);
// TStop > 12us.
os_delay_us(12);
// ets_intr_unlock();
}
// -----------------------------------------------------------------------------
unsigned char my92xx::getChannels() {
return _channels;
}
void my92xx::setChannel(unsigned char channel, unsigned int value) {
if (channel < _channels) {
_value[channel] = value;
}
}
unsigned int my92xx::getChannel(unsigned char channel) {
if (channel < _channels) {
return _value[channel];
}
return 0;
}
bool my92xx::getState() {
return _state;
}
void my92xx::setState(bool state) {
_state = state;
}
void my92xx::update() {
_send();
}
// -----------------------------------------------------------------------------
my92xx::my92xx(my92xx_model_t model, unsigned char chips, unsigned char di, unsigned char dcki, my92xx_cmd_t command) : _command(command) {
_model = model;
_chips = chips;
_pin_di = di;
_pin_dcki = dcki;
// Init channels
if (_model == MY92XX_MODEL_MY9291) {
_channels = 4 * _chips;
}
else if (_model == MY92XX_MODEL_MY9231) {
_channels = 3 * _chips;
}
_value = new uint16_t[_channels];
for (unsigned char i = 0; i < _channels; i++) {
_value[i] = 0;
}
// Init GPIO
pinMode(_pin_di, OUTPUT);
pinMode(_pin_dcki, OUTPUT);
digitalWrite(_pin_di, LOW);
digitalWrite(_pin_dcki, LOW);
// Clear all duty register
_dcki_pulse(32 * _chips);
// Send init command
_set_cmd(command);
DEBUG_MSG_MY92XX("[MY92XX] Initialized\n");
}
#endif

View File

@@ -0,0 +1,45 @@
#pragma once
#include "wled.h"
#include "MY92xx.h"
#define MY92XX_MODEL MY92XX_MODEL_MY9291
#define MY92XX_CHIPS 1
#define MY92XX_DI_PIN 13
#define MY92XX_DCKI_PIN 15
#define MY92XX_RED 0
#define MY92XX_GREEN 1
#define MY92XX_BLUE 2
#define MY92XX_WHITE 3
class MY9291Usermod : public Usermod {
private:
my92xx _my92xx = my92xx(MY92XX_MODEL, MY92XX_CHIPS, MY92XX_DI_PIN, MY92XX_DCKI_PIN, MY92XX_COMMAND_DEFAULT);
public:
void setup() {
_my92xx.setState(true);
}
void connected() {
}
void loop() {
uint32_t c = strip.getPixelColor(0);
int w = ((c >> 24) & 0xff) * bri / 255.0;
int r = ((c >> 16) & 0xff) * bri / 255.0;
int g = ((c >> 8) & 0xff) * bri / 255.0;
int b = (c & 0xff) * bri / 255.0;
_my92xx.setChannel(MY92XX_RED, r);
_my92xx.setChannel(MY92XX_GREEN, g);
_my92xx.setChannel(MY92XX_BLUE, b);
_my92xx.setChannel(MY92XX_WHITE, w);
_my92xx.update();
}
uint16_t getId() {
return USERMOD_ID_MY9291;
}
};

View File

@@ -0,0 +1,347 @@
#pragma once
#include "wled.h"
/*
* --------------------
* Rawframe edit:
* - TESTED ON WLED VS.0.10.1 - WHERE ONLY PRESET 16 SAVES SEGMENTS - some macros may not be needed if this changes.
* - Code has been modified as my usage changed, as such it has poor use of functions vs if thens, but feel free to change it for me :)
*
* Edited to SWITCH between two lighting scenes/modes : STANDBY and HIGHLIGHT
*
* Usage:
* - Standby is the default mode and Highlight is activated when the PIR detects activity.
* - PIR delay now set to same value as Nightlight feature on boot but otherwise controlled as normal.
* - Standby and Highlight brightness can be set on the fly (default values set on boot via macros calling presets).
* - Macros are used to set Standby and Highlight states (macros can load saved presets etc).
*
* - Macro short button press = Highlight state default (used on boot only and sets default brightness).
* - Macro double button press = Standby state default (used on boot only and sets default brightness).
* - Macro long button press = Highlight state (after boot).
* - Macro 16 = Standby state (after boot).
*
* ! It is advised not to set 'Apply preset at boot' or a boot macro (that activates a preset) as we will call our own macros on boot.
*
* - When the strip is off before PIR activates the strip will return to off for Standby mode, and vice versa.
* - When the strip is turned off while in Highlight mode, it will return to standby mode. (This behaviour could be changed easily if for some reason you wanted the lights to go out when the pir is activated).
* - Macros can be chained so you could do almost anything, such as have standby mode also turn on the nightlight function with a new time delay.
*
* Segment Notes:
* - It's easier to save the segment selections in preset than apply via macro while we a limited to preset 16. (Ie, instead of selecting sections at the point of activating standby/highlight modes).
* - Because only preset 16 saves segments, for now we are having to use addiotional macros to control segments where they are involved. Macros can be chained so this works but it would be better if macros also accepted json-api commands. (Testing http api segement behaviour of SS with SB left me a little confused).
*
* Future:
* - Maybe a second timer/timetable that turns on/off standby mode also after set inactivity period / date & times. For now this can be achieved others ways so may not be worth eating more processing power.
*
* --------------------
*
* This usermod handles PIR sensor states.
* The strip will be switched on and the off timer will be resetted when the sensor goes HIGH.
* When the sensor state goes LOW, the off timer is started and when it expires, the strip is switched off.
*
*
* Usermods allow you to add own functionality to WLED more easily
* See: https://github.com/Aircoookie/WLED/wiki/Add-own-functionality
*
* v2 usermods are class inheritance based and can (but don't have to) implement more functions, each of them is shown in this example.
* Multiple v2 usermods can be added to one compilation easily.
*
* Creating a usermod:
* This file serves as an example. If you want to create a usermod, it is recommended to use usermod_v2_empty.h from the usermods folder as a template.
* Please remember to rename the class and file to a descriptive name.
* You may also use multiple .h and .cpp files.
*
* Using a usermod:
* 1. Copy the usermod into the sketch folder (same folder as wled00.ino)
* 2. Register the usermod by adding #include "usermod_filename.h" in the top and registerUsermod(new MyUsermodClass()) in the bottom of usermods_list.cpp
*/
class PIRsensorSwitch : public Usermod {
private:
// PIR sensor pin
const uint8_t PIRsensorPin = 13; // D7 on D1 mini
// notification mode for stateUpdated()
const byte NotifyUpdateMode = CALL_MODE_NO_NOTIFY; // CALL_MODE_DIRECT_CHANGE
// 1 min delay before switch off after the sensor state goes LOW
uint32_t m_switchOffDelay = 60000;
// off timer start time
uint32_t m_offTimerStart = 0;
// current PIR sensor pin state
byte m_PIRsensorPinState = LOW;
// PIR sensor enabled - ISR attached
bool m_PIRenabled = true;
// temp standby brightness store. initial value set as nightlight default target brightness
byte briStandby _INIT(nightlightTargetBri);
// temp hightlight brightness store. initial value set as current brightness
byte briHighlight _INIT(bri);
// highlight active/deactive monitor
bool highlightActive = false;
// wled on/off state in standby mode
bool standbyoff = false;
/*
* return or change if new PIR sensor state is available
*/
static volatile bool newPIRsensorState(bool changeState = false, bool newState = false) {
static volatile bool s_PIRsensorState = false;
if (changeState) {
s_PIRsensorState = newState;
}
return s_PIRsensorState;
}
/*
* PIR sensor state has changed
*/
static void IRAM_ATTR ISR_PIRstateChange() {
newPIRsensorState(true, true);
}
/*
* switch strip on/off
*/
// now allowing adjustable standby and highlight brightness
void switchStrip(bool switchOn) {
//if (switchOn && bri == 0) {
if (switchOn) { // **pir sensor is on and activated**
//bri = briLast;
if (bri != 0) { // is WLED currently on
if (highlightActive) { // and is Highlight already on
briHighlight = bri; // then update highlight brightness with current brightness
}
else {
briStandby = bri; // else update standby brightness with current brightness
}
}
else { // WLED is currently off
if (!highlightActive) { // and Highlight is not already on
briStandby = briLast; // then update standby brightness with last active brightness (before turned off)
standbyoff = true;
}
else { // and Highlight is already on
briHighlight = briLast; // then set hightlight brightness to last active brightness (before turned off)
}
}
applyMacro(16); // apply highlight lighting without brightness
if (bri != briHighlight) {
bri = briHighlight; // set current highlight brightness to last set highlight brightness
}
stateUpdated(NotifyUpdateMode);
highlightActive = true; // flag highlight is on
}
else { // **pir timer has elapsed**
//briLast = bri;
//bri = 0;
if (bri != 0) { // is WLED currently on
briHighlight = bri; // update highlight brightness with current brightness
if (!standbyoff) { //
bri = briStandby; // set standby brightness to last set standby brightness
}
else { //
briLast = briStandby; // set standby off brightness
bri = 0; // set power off in standby
standbyoff = false; // turn off flag
}
applyMacro(macroLongPress); // apply standby lighting without brightness
}
else { // WLED is currently off
briHighlight = briLast; // set last active brightness (before turned off) to highlight lighting brightness
if (!standbyoff) { //
bri = briStandby; // set standby brightness to last set standby brightness
}
else { //
briLast = briStandby; // set standby off brightness
bri = 0; // set power off in standby
standbyoff = false; // turn off flag
}
applyMacro(macroLongPress); // apply standby lighting without brightness
}
stateUpdated(NotifyUpdateMode);
highlightActive = false; // flag highlight is off
}
}
/*
* Read and update PIR sensor state.
* Initilize/reset switch off timer
*/
bool updatePIRsensorState() {
if (newPIRsensorState()) {
m_PIRsensorPinState = digitalRead(PIRsensorPin);
if (m_PIRsensorPinState == HIGH) {
m_offTimerStart = 0;
switchStrip(true);
}
else if (bri != 0) {
// start switch off timer
m_offTimerStart = millis();
}
newPIRsensorState(true, false);
return true;
}
return false;
}
/*
* switch off the strip if the delay has elapsed
*/
bool handleOffTimer() {
if (m_offTimerStart > 0) {
if ((millis() - m_offTimerStart > m_switchOffDelay) || bri == 0 ) { // now also checking for manual power off during highlight mode
switchStrip(false);
m_offTimerStart = 0;
return true;
}
}
return false;
}
public:
//Functions called by WLED
/*
* setup() is called once at boot. WiFi is not yet connected at this point.
* You can use it to initialize variables, sensors or similar.
*/
void setup() {
// PIR Sensor mode INPUT_PULLUP
pinMode(PIRsensorPin, INPUT_PULLUP);
// assign interrupt function and set CHANGE mode
attachInterrupt(digitalPinToInterrupt(PIRsensorPin), ISR_PIRstateChange, CHANGE);
// set delay to nightlight default duration on boot (after which json PIRoffSec overides if needed)
m_switchOffDelay = (nightlightDelayMins*60000);
applyMacro(macroButton); // apply default highlight lighting
briHighlight = bri;
applyMacro(macroDoublePress); // apply default standby lighting with brightness
briStandby = bri;
}
/*
* connected() is called every time the WiFi is (re)connected
* Use it to initialize network interfaces
*/
void connected() {
}
/*
* loop() is called continuously. Here you can check for events, read sensors, etc.
*/
void loop() {
if (!updatePIRsensorState()) {
handleOffTimer();
}
}
/*
* addToJsonInfo() can be used to add custom entries to the /json/info part of the JSON API.
*
* Add PIR sensor state and switch off timer duration to jsoninfo
*/
void addToJsonInfo(JsonObject& root)
{
//this code adds "u":{"&#x23F2; PIR sensor state":uiDomString} to the info object
// the value contains a button to toggle the sensor enabled/disabled
JsonObject user = root["u"];
if (user.isNull()) user = root.createNestedObject("u");
JsonArray infoArr = user.createNestedArray("&#x23F2; PIR sensor state"); //name
String uiDomString = "<button class=\"btn infobtn\" onclick=\"requestJson({PIRenabled:";
String sensorStateInfo;
// PIR sensor state
if (m_PIRenabled) {
uiDomString += "false";
sensorStateInfo = (m_PIRsensorPinState != LOW ? "active" : "inactive"); //value
} else {
uiDomString += "true";
sensorStateInfo = "Disabled !";
}
uiDomString += "});return false;\">";
uiDomString += sensorStateInfo;
uiDomString += "</button>";
infoArr.add(uiDomString); //value
//this code adds "u":{"&#x23F2; switch off timer":uiDomString} to the info object
infoArr = user.createNestedArray("&#x23F2; switch off timer"); //name
// off timer
if (m_offTimerStart > 0) {
uiDomString = "";
unsigned int offSeconds = (m_switchOffDelay - (millis() - m_offTimerStart)) / 1000;
if (offSeconds >= 3600) {
uiDomString += (offSeconds / 3600);
uiDomString += " hours ";
offSeconds %= 3600;
}
if (offSeconds >= 60) {
uiDomString += (offSeconds / 60);
offSeconds %= 60;
} else if (uiDomString.length() > 0){
uiDomString += 0;
}
if (uiDomString.length() > 0){
uiDomString += " min ";
}
uiDomString += (offSeconds);
infoArr.add(uiDomString + " sec");
} else {
infoArr.add("inactive");
}
}
/*
* addToJsonState() can be used to add custom entries to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
* Add "PIRenabled" to json state. This can be used to disable/enable the sensor.
* Add "PIRoffSec" to json state. This can be used to adjust <m_switchOffDelay> milliseconds .
*/
void addToJsonState(JsonObject& root)
{
root["PIRenabled"] = m_PIRenabled;
root["PIRoffSec"] = (m_switchOffDelay / 1000);
}
/*
* readFromJsonState() can be used to receive data clients send to the /json/state part of the JSON API (state object).
* Values in the state object may be modified by connected clients
* Read "PIRenabled" from json state and switch enable/disable the PIR sensor.
* Read "PIRoffSec" from json state and adjust <m_switchOffDelay> milliseconds .
*/
void readFromJsonState(JsonObject& root)
{
if (root["PIRoffSec"] != nullptr) {
m_switchOffDelay = (1000 * max(60UL, min(43200UL, root["PIRoffSec"].as<unsigned long>())));
}
if (root["PIRenabled"] != nullptr) {
if (root["PIRenabled"] && !m_PIRenabled) {
attachInterrupt(digitalPinToInterrupt(PIRsensorPin), ISR_PIRstateChange, CHANGE);
newPIRsensorState(true, true);
}
else if(m_PIRenabled) {
detachInterrupt(PIRsensorPin);
}
m_PIRenabled = root["PIRenabled"];
}
}
/*
* getId() allows you to optionally give your V2 usermod an unique ID (please define it in const.h!).
* This could be used in the future for the system to determine whether your usermod is installed.
*/
uint16_t getId()
{
return USERMOD_ID_PIRSWITCH;
}
//More methods can be added in the future, this example will then be extended.
//Your usermod will remain compatible as it does not need to implement all methods from the Usermod base class!
};

Some files were not shown because too many files have changed in this diff Show More