├── requirements.in
├── .envrc
├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── question.md
│ └── feature_request.md
├── stale.yml
└── workflows
│ └── wled-ci.yml
├── wled00
├── data
│ ├── favicon.ico
│ ├── usermod.htm
│ ├── msg.htm
│ ├── settings.htm
│ ├── dmxmap.htm
│ ├── 404.htm
│ ├── liveview.htm
│ ├── update.htm
│ ├── liveviewws.htm
│ ├── style.css
│ └── welcome.htm
├── wled00.vcxproj.user
├── src
│ └── dependencies
│ │ ├── async-mqtt-client
│ │ ├── AsyncMqttClient
│ │ │ ├── MessageProperties.hpp
│ │ │ ├── Storage.hpp
│ │ │ ├── Packets
│ │ │ │ ├── Packet.hpp
│ │ │ │ ├── PingRespPacket.cpp
│ │ │ │ ├── PingRespPacket.hpp
│ │ │ │ ├── PubAckPacket.hpp
│ │ │ │ ├── PubRecPacket.hpp
│ │ │ │ ├── PubRelPacket.hpp
│ │ │ │ ├── SubAckPacket.hpp
│ │ │ │ ├── PubCompPacket.hpp
│ │ │ │ ├── UnsubAckPacket.hpp
│ │ │ │ ├── ConnAckPacket.hpp
│ │ │ │ ├── PubAckPacket.cpp
│ │ │ │ ├── PubRecPacket.cpp
│ │ │ │ ├── PubRelPacket.cpp
│ │ │ │ ├── PubCompPacket.cpp
│ │ │ │ ├── UnsubAckPacket.cpp
│ │ │ │ ├── ConnAckPacket.cpp
│ │ │ │ ├── PublishPacket.hpp
│ │ │ │ └── SubAckPacket.cpp
│ │ │ ├── DisconnectReasons.hpp
│ │ │ ├── ParsingInformation.hpp
│ │ │ ├── Helpers.hpp
│ │ │ ├── Callbacks.hpp
│ │ │ └── Flags.hpp
│ │ ├── AsyncMqttClient.h
│ │ ├── README.md
│ │ └── LICENSE
│ │ ├── blynk
│ │ ├── BlynkSimpleEsp.cpp
│ │ ├── LICENSE.txt
│ │ ├── Blynk
│ │ │ ├── BlynkTemplates.h
│ │ │ ├── BlynkUtility.h
│ │ │ ├── BlynkWidgetBase.h
│ │ │ ├── BlynkEveryN.h
│ │ │ └── BlynkConfig.h
│ │ └── BlynkSimpleEsp.h
│ │ ├── ws2812fx
│ │ ├── readme.txt
│ │ └── LICENSE.txt
│ │ ├── network
│ │ ├── Network.h
│ │ └── Network.cpp
│ │ ├── time
│ │ ├── library.properties
│ │ ├── library.json
│ │ ├── DS1307RTC.h
│ │ └── LICENSE.txt
│ │ ├── timezone
│ │ ├── LICENSE.md
│ │ └── Timezone.h
│ │ ├── dmx
│ │ ├── ESPDMX.h
│ │ └── ESPDMX.cpp
│ │ └── espalexa
│ │ ├── LICENSE
│ │ └── EspalexaDevice.h
├── usermod_v2_empty.h
├── wled00.ino
├── usermod.cpp
├── util.cpp
├── NodeStruct.h
├── my_config_sample.h
├── dmx.cpp
├── blynk.cpp
├── um_manager.cpp
└── lx_parser.cpp
├── images
├── wled_logo_old.png
├── wled_logo_akemi.png
├── walking-with-iphone-x.jpg
├── macbook-pro-space-gray-on-the-wooden-table.jpg
└── Readme.md
├── .gitpod.Dockerfile
├── usermods
├── JSON_IR_remote
│ ├── IR_Remote_Codes.xlsx
│ ├── 6-key_ir.json
│ ├── 9-key_ir.json
│ ├── readme.md
│ └── 21-key_ir.json
├── ST7789_display
│ ├── images
│ │ └── ST7789_Guide.jpg
│ ├── Setup_ST7789_Display.h
│ └── README.md
├── word-clock-matrix
│ ├── Word Clock Baffle.stl
│ └── readme.md
├── TTGO-T-Display
│ ├── assets
│ │ ├── ttgo_hardware1.png
│ │ ├── ttgo-tdisplay-enclosure1a.png
│ │ ├── ttgo-tdisplay-enclosure2a.png
│ │ ├── ttgo-tdisplay-enclosure3a.png
│ │ └── ttgo-tdisplay-enclosure4a.png
│ └── platformio_override.ini
├── Enclosure_with_OLED_temp_ESP07
│ ├── assets
│ │ ├── pcb.png
│ │ ├── controller.jpg
│ │ └── readme.md
│ └── readme.md
├── battery_keypad_controller
│ ├── assets
│ │ ├── bat-key-ctrl-1.jpg
│ │ ├── bat-key-ctrl-2.jpg
│ │ └── bat-key-ctrl-3.jpg
│ └── README.md
├── battery_status_basic
│ └── assets
│ │ ├── battery_info_screen.png
│ │ ├── battery_connection_schematic_01.png
│ │ └── battery_connection_schematic_02.png
├── BH1750_v2
│ ├── usermods_list.cpp
│ ├── platformio_override.ini
│ └── readme.md
├── RTC
│ ├── readme.md
│ └── usermod_rtc.h
├── SN_Photoresistor
│ ├── usermods_list.cpp
│ ├── platformio_override.ini
│ └── readme.md
├── EXAMPLE_v2
│ └── readme.md
├── Artemis_reciever
│ ├── readme.md
│ └── usermod.cpp
├── Temperature
│ ├── usermods_list.cpp
│ ├── platformio_override.ini
│ └── readme.md
├── photoresistor_sensor_mqtt_v1
│ ├── README.md
│ └── usermod.cpp
├── project_cars_shiftlight
│ ├── readme.md
│ └── wled06_usermod.ino
├── stairway_wipe_basic
│ └── readme.md
├── UserModv2_SunRiseAndSet
│ └── README.md
├── blynk_relay_control
│ └── README.md
├── usermod_v2_mode_sort
│ └── readme.md
├── DHT
│ ├── platformio_override.ini
│ └── readme.md
├── readme.md
├── PWM_fan
│ └── readme.md
├── usermod_v2_rotary_encoder_ui
│ ├── readme.md
│ └── platformio_override.ini.sample
├── rotary_encoder_change_effect
│ └── wled06_usermod.ino
├── QuinLED_Dig_Uno_Temp_MQTT
│ ├── readme.md
│ └── usermod.cpp
├── usermod_v2_four_line_display
│ └── readme.md
├── EleksTube_IPS
│ ├── readme.md
│ ├── Hardware.h
│ ├── User_Setup.h
│ └── usermod_elekstube_ips.h
├── VL53L0X_gestures
│ └── readme.md
├── usermod_v2_four_line_display_ALT
│ └── readme.md
├── usermod_v2_rotary_encoder_ui_ALT
│ └── readme.md
├── usermod_rotary_brightness_color
│ └── README.md
├── usermod_v2_auto_save
│ └── readme.md
├── mqtt_switch_v2
│ └── README.md
├── sensors_to_mqtt
│ └── readme.md
├── Wemos_D1_mini+Wemos32_mini_shield
│ └── readme.md
├── BME280_v2
│ └── README.md
├── seven_segment_display
│ └── readme.md
├── Fix_unreachable_netservices_v2
│ └── readme.md
└── buzzer
│ └── usermod_v2_buzzer.h
├── .vscode
├── extensions.json
└── tasks.json
├── pio-scripts
├── set_version.py
├── user_config_copy.py
├── strip-floats.py
├── obj-dump.py
└── output_bins.py
├── tools
├── WLED_ESP32_16MB.csv
├── WLED_ESP32_8MB.csv
├── WLED_ESP32_4MB_1MB_FS.csv
├── multi-update.cmd
└── multi-update.sh
├── .gitignore
├── .gitpod.yml
├── test
└── README
├── package.json
├── LICENSE
├── wled00.sln
├── requirements.txt
├── .devcontainer
├── Dockerfile
└── devcontainer.json
├── lib
└── README
├── include
└── README
└── platformio_override.ini.sample
/requirements.in:
--------------------------------------------------------------------------------
1 | platformio
2 |
--------------------------------------------------------------------------------
/.envrc:
--------------------------------------------------------------------------------
1 | layout python-venv python3
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [Aircoookie]
2 | custom: ['https://paypal.me/Aircoookie']
3 |
--------------------------------------------------------------------------------
/wled00/data/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/wled00/data/favicon.ico
--------------------------------------------------------------------------------
/images/wled_logo_old.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/images/wled_logo_old.png
--------------------------------------------------------------------------------
/images/wled_logo_akemi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/images/wled_logo_akemi.png
--------------------------------------------------------------------------------
/images/walking-with-iphone-x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/images/walking-with-iphone-x.jpg
--------------------------------------------------------------------------------
/wled00/data/usermod.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
No usermod custom web page set.
5 |
6 |
--------------------------------------------------------------------------------
/.gitpod.Dockerfile:
--------------------------------------------------------------------------------
1 | FROM gitpod/workspace-full
2 |
3 | USER gitpod
4 |
5 | RUN pip3 install -U platformio
6 |
--------------------------------------------------------------------------------
/usermods/JSON_IR_remote/IR_Remote_Codes.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/JSON_IR_remote/IR_Remote_Codes.xlsx
--------------------------------------------------------------------------------
/usermods/ST7789_display/images/ST7789_Guide.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/ST7789_display/images/ST7789_Guide.jpg
--------------------------------------------------------------------------------
/usermods/word-clock-matrix/Word Clock Baffle.stl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/word-clock-matrix/Word Clock Baffle.stl
--------------------------------------------------------------------------------
/usermods/TTGO-T-Display/assets/ttgo_hardware1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/TTGO-T-Display/assets/ttgo_hardware1.png
--------------------------------------------------------------------------------
/images/macbook-pro-space-gray-on-the-wooden-table.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/images/macbook-pro-space-gray-on-the-wooden-table.jpg
--------------------------------------------------------------------------------
/usermods/Enclosure_with_OLED_temp_ESP07/assets/pcb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/Enclosure_with_OLED_temp_ESP07/assets/pcb.png
--------------------------------------------------------------------------------
/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure1a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure1a.png
--------------------------------------------------------------------------------
/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure2a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure2a.png
--------------------------------------------------------------------------------
/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure3a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure3a.png
--------------------------------------------------------------------------------
/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure4a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/TTGO-T-Display/assets/ttgo-tdisplay-enclosure4a.png
--------------------------------------------------------------------------------
/usermods/battery_keypad_controller/assets/bat-key-ctrl-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/battery_keypad_controller/assets/bat-key-ctrl-1.jpg
--------------------------------------------------------------------------------
/usermods/battery_keypad_controller/assets/bat-key-ctrl-2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/battery_keypad_controller/assets/bat-key-ctrl-2.jpg
--------------------------------------------------------------------------------
/usermods/battery_keypad_controller/assets/bat-key-ctrl-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/battery_keypad_controller/assets/bat-key-ctrl-3.jpg
--------------------------------------------------------------------------------
/usermods/battery_status_basic/assets/battery_info_screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/battery_status_basic/assets/battery_info_screen.png
--------------------------------------------------------------------------------
/usermods/Enclosure_with_OLED_temp_ESP07/assets/controller.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/Enclosure_with_OLED_temp_ESP07/assets/controller.jpg
--------------------------------------------------------------------------------
/usermods/Enclosure_with_OLED_temp_ESP07/assets/readme.md:
--------------------------------------------------------------------------------
1 | # Enclosure and PCB
2 |
3 | ## IP67 rated enclosure
4 | 
5 |
6 | ## PCB
7 | 
8 |
--------------------------------------------------------------------------------
/usermods/battery_status_basic/assets/battery_connection_schematic_01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/battery_status_basic/assets/battery_connection_schematic_01.png
--------------------------------------------------------------------------------
/usermods/battery_status_basic/assets/battery_connection_schematic_02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bombcheck/WLED/master/usermods/battery_status_basic/assets/battery_connection_schematic_02.png
--------------------------------------------------------------------------------
/wled00/wled00.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/MessageProperties.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | struct AsyncMqttClientMessageProperties {
4 | uint8_t qos;
5 | bool dup;
6 | bool retain;
7 | };
8 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient.h:
--------------------------------------------------------------------------------
1 | #ifndef SRC_ASYNCMQTTCLIENT_H_
2 | #define SRC_ASYNCMQTTCLIENT_H_
3 |
4 | #include "AsyncMqttClient.hpp"
5 |
6 | #endif // SRC_ASYNCMQTTCLIENT_H_
7 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/blynk/BlynkSimpleEsp.cpp:
--------------------------------------------------------------------------------
1 | #include "BlynkSimpleEsp.h"
2 |
3 | WiFiClient _blynkWifiClient;
4 | BlynkArduinoClient _blynkTransport(_blynkWifiClient);
5 | BlynkWifi Blynk(_blynkTransport);
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | // See http://go.microsoft.com/fwlink/?LinkId=827846
3 | // for the documentation about the extensions.json format
4 | "recommendations": [
5 | "platformio.platformio-ide"
6 | ]
7 | }
8 |
--------------------------------------------------------------------------------
/images/Readme.md:
--------------------------------------------------------------------------------
1 | ### Additional Logos
2 |
3 | Additional awesome logos for WLED can be found here [Aircoookie/Akemi](https://github.com/Aircoookie/Akemi).
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pio-scripts/set_version.py:
--------------------------------------------------------------------------------
1 | Import('env')
2 | import json
3 |
4 | PACKAGE_FILE = "package.json"
5 |
6 | with open(PACKAGE_FILE, "r") as package:
7 | version = json.load(package)["version"]
8 | env.Append(BUILD_FLAGS=[f"-DWLED_VERSION={version}"])
9 |
--------------------------------------------------------------------------------
/usermods/TTGO-T-Display/platformio_override.ini:
--------------------------------------------------------------------------------
1 | [env:esp32dev]
2 | build_flags = ${common.build_flags_esp32}
3 | ; PIN defines - uncomment and change, if needed:
4 | ; -D LEDPIN=2
5 | -D BTNPIN=35
6 | ; -D IRPIN=4
7 | ; -D RLYPIN=12
8 | ; -D RLYMDE=1
9 |
--------------------------------------------------------------------------------
/usermods/word-clock-matrix/readme.md:
--------------------------------------------------------------------------------
1 | ## Word clock usermod
2 |
3 | By @bwente
4 |
5 | See https://www.hackster.io/bwente/word-clock-with-just-two-components-073834 for the hardware guide!
6 | Includes a customizable feature to lower the brightness at night.
7 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/ws2812fx/readme.txt:
--------------------------------------------------------------------------------
1 | https://github.com/kitesurfer1404/WS2812FX/
2 |
3 | The WS2812FX implementation was heavily altered and differs from its master branch.
4 | Due to regular changes to the library code it is kept in the source dir for now.
5 |
--------------------------------------------------------------------------------
/tools/WLED_ESP32_16MB.csv:
--------------------------------------------------------------------------------
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,
--------------------------------------------------------------------------------
/tools/WLED_ESP32_8MB.csv:
--------------------------------------------------------------------------------
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,
--------------------------------------------------------------------------------
/tools/WLED_ESP32_4MB_1MB_FS.csv:
--------------------------------------------------------------------------------
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,
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .pio
2 | .cache
3 | .pioenvs
4 | .piolibdeps
5 | .vscode
6 | !.vscode/extensions.json
7 | /wled00/Release
8 | /wled00/extLibs
9 | /platformio_override.ini
10 | /wled00/my_config.h
11 | /build_output
12 | .DS_Store
13 | .gitignore
14 | .clang-format
15 | node_modules
16 | .idea
17 | .direnv
18 |
--------------------------------------------------------------------------------
/pio-scripts/user_config_copy.py:
--------------------------------------------------------------------------------
1 | Import('env')
2 | import os
3 | import shutil
4 |
5 | # copy WLED00/my_config_sample.h to WLED00/my_config.h
6 | if os.path.isfile("wled00/my_config.h"):
7 | print ("*** use existing my_config.h ***")
8 | else:
9 | shutil.copy("wled00/my_config_sample.h", "wled00/my_config.h")
10 |
--------------------------------------------------------------------------------
/usermods/BH1750_v2/usermods_list.cpp:
--------------------------------------------------------------------------------
1 | #include "wled.h"
2 | /*
3 | * Register your v2 usermods here!
4 | */
5 | #ifdef USERMOD_BH1750
6 | #include "../usermods/BH1750_v2/usermod_BH1750.h"
7 | #endif
8 |
9 | void registerUsermods()
10 | {
11 | #ifdef USERMOD_BH1750
12 | usermods.add(new Usermod_BH1750());
13 | #endif
14 | }
15 |
--------------------------------------------------------------------------------
/usermods/RTC/readme.md:
--------------------------------------------------------------------------------
1 | # DS1307/DS3231 Real time clock
2 |
3 | Gets the time from I2C RTC module on boot. This allows clocks to operate e.g. if temporarily no WiFi is available.
4 | The stored time is updated each time NTP is synced.
5 |
6 | ## Installation
7 |
8 | Add the build flag `-D USERMOD_RTC` to your platformio environment.
9 |
--------------------------------------------------------------------------------
/pio-scripts/strip-floats.py:
--------------------------------------------------------------------------------
1 | Import('env')
2 |
3 | #
4 | # Dump build environment (for debug)
5 | #print env.Dump()
6 | #
7 |
8 | flags = " ".join(env['LINKFLAGS'])
9 | flags = flags.replace("-u _printf_float", "")
10 | flags = flags.replace("-u _scanf_float", "")
11 | newflags = flags.split()
12 |
13 | env.Replace(
14 | LINKFLAGS=newflags
15 | )
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Storage.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace AsyncMqttClientInternals {
4 | struct PendingPubRel {
5 | uint16_t packetId;
6 | };
7 |
8 | struct PendingAck {
9 | uint8_t packetType;
10 | uint8_t headerFlag;
11 | uint16_t packetId;
12 | };
13 | } // namespace AsyncMqttClientInternals
14 |
--------------------------------------------------------------------------------
/pio-scripts/obj-dump.py:
--------------------------------------------------------------------------------
1 | # Little convenience script to get an object dump
2 |
3 | Import('env')
4 |
5 | def obj_dump_after_elf(source, target, env):
6 | print("Create firmware.asm")
7 | env.Execute("xtensa-lx106-elf-objdump "+ "-D " + str(target[0]) + " > "+ "${PROGNAME}.asm")
8 |
9 | env.AddPostAction("$BUILD_DIR/${PROGNAME}.elf", [obj_dump_after_elf])
10 |
--------------------------------------------------------------------------------
/usermods/SN_Photoresistor/usermods_list.cpp:
--------------------------------------------------------------------------------
1 | #include "wled.h"
2 | /*
3 | * Register your v2 usermods here!
4 | */
5 | #ifdef USERMOD_SN_PHOTORESISTOR
6 | #include "../usermods/SN_Photoresistor/usermod_sn_photoresistor.h"
7 | #endif
8 |
9 | void registerUsermods()
10 | {
11 | #ifdef USERMOD_SN_PHOTORESISTOR
12 | usermods.add(new Usermod_SN_Photoresistor());
13 | #endif
14 | }
--------------------------------------------------------------------------------
/.gitpod.yml:
--------------------------------------------------------------------------------
1 | tasks:
2 | - command: platformio run
3 |
4 | image:
5 | file: .gitpod.Dockerfile
6 |
7 | vscode:
8 | extensions:
9 | - ms-vscode.cpptools@0.26.3:u3GsZ5PK12Ddr79vh4TWgQ==
10 | - eamodio.gitlens@10.2.1:e0IYyp0efFqVsrZwsIe8CA==
11 | - Atishay-Jain.All-Autocomplete@0.0.23:fbZNfSpnd8XkAHGfAPS2rA==
12 | - 2gua.rainbow-brackets@0.0.6:Tbu8dTz0i+/bgcKQTQ5b8g==
13 |
--------------------------------------------------------------------------------
/tools/multi-update.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | SETLOCAL
3 | SET FWPATH=c:\path\to\your\WLED\build_output\firmware
4 | GOTO ESPS
5 |
6 | :UPDATEONE
7 | IF NOT EXIST %FWPATH%\%2 GOTO SKIP
8 | ping -w 1000 -n 1 %1 | find "TTL=" || GOTO SKIP
9 | ECHO Updating %1
10 | curl -s -F "update=@%FWPATH%/%2" %1/update >nul
11 | :SKIP
12 | GOTO:EOF
13 |
14 | :ESPS
15 | call :UPDATEONE 192.168.x.x firmware.bin
16 | call :UPDATEONE ....
17 |
--------------------------------------------------------------------------------
/usermods/EXAMPLE_v2/readme.md:
--------------------------------------------------------------------------------
1 | # Usermods API v2 example usermod
2 |
3 | In this usermod file you can find the documentation on how to take advantage of the new version 2 usermods!
4 |
5 | ## Installation
6 |
7 | Copy `usermod_v2_example.h` to the wled00 directory.
8 | Uncomment the corresponding lines in `usermods_list.cpp` and compile!
9 | _(You shouldn't need to actually install this, it does nothing useful)_
10 |
11 |
--------------------------------------------------------------------------------
/wled00/usermod_v2_empty.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "wled.h"
4 |
5 | //This is an empty v2 usermod template. Please see the file usermod_v2_example.h in the EXAMPLE_v2 usermod folder for documentation on the functions you can use!
6 |
7 | class UsermodRenameMe : public Usermod {
8 | private:
9 |
10 | public:
11 | void setup() {
12 |
13 | }
14 |
15 | void loop() {
16 |
17 | }
18 | };
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/Packet.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace AsyncMqttClientInternals {
4 | class Packet {
5 | public:
6 | virtual ~Packet() {}
7 |
8 | virtual void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) = 0;
9 | virtual void parsePayload(char* data, size_t len, size_t* currentBytePosition) = 0;
10 | };
11 | } // namespace AsyncMqttClientInternals
12 |
--------------------------------------------------------------------------------
/tools/multi-update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | FWPATH=/path/to/your/WLED/build_output/firmware
3 |
4 | update_one() {
5 | if [ -f $FWPATH/$2 ]; then
6 | ping -c 1 $1 >/dev/null
7 | PINGRESULT=$?
8 | if [ $PINGRESULT -eq 0 ]; then
9 | echo Updating $1
10 | curl -s -F "update=@${FWPATH}/$2" $1/update >/dev/null
11 | return 0
12 | fi
13 | return 1
14 | fi
15 | }
16 |
17 | update_one 192.168.x.x firmware.bin
18 | update_one 192.168.x.x firmware.bin
19 | # ...
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/DisconnectReasons.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | enum class AsyncMqttClientDisconnectReason : int8_t {
4 | TCP_DISCONNECTED = 0,
5 |
6 | MQTT_UNACCEPTABLE_PROTOCOL_VERSION = 1,
7 | MQTT_IDENTIFIER_REJECTED = 2,
8 | MQTT_SERVER_UNAVAILABLE = 3,
9 | MQTT_MALFORMED_CREDENTIALS = 4,
10 | MQTT_NOT_AUTHORIZED = 5,
11 |
12 | ESP8266_NOT_ENOUGH_SPACE = 6,
13 |
14 | TLS_BAD_FINGERPRINT = 7
15 | };
16 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/network/Network.h:
--------------------------------------------------------------------------------
1 | #ifdef ESP8266
2 | #include
3 | #else // ESP32
4 | #include
5 | #include
6 | #endif
7 |
8 | #ifndef Network_h
9 | #define Network_h
10 |
11 | class NetworkClass
12 | {
13 | public:
14 | IPAddress localIP();
15 | IPAddress subnetMask();
16 | IPAddress gatewayIP();
17 | bool isConnected();
18 | bool isEthernet();
19 | };
20 |
21 | extern NetworkClass Network;
22 |
23 | #endif
--------------------------------------------------------------------------------
/wled00/src/dependencies/time/library.properties:
--------------------------------------------------------------------------------
1 | name=Time
2 | version=1.5
3 | author=Michael Margolis
4 | maintainer=Paul Stoffregen
5 | sentence=Timekeeping functionality for Arduino
6 | paragraph=Date and Time functions, with provisions to synchronize to external time sources like GPS and NTP (Internet). This library is often used together with TimeAlarms and DS1307RTC.
7 | category=Timing
8 | url=http://playground.arduino.cc/code/time
9 | architectures=*
10 |
11 |
--------------------------------------------------------------------------------
/usermods/battery_keypad_controller/README.md:
--------------------------------------------------------------------------------
1 | # Battery powered controller with keypad
2 |
3 | I'm using this controller for a festival totem. Runs on 3 18650 Cells, can deliver >5A current.
4 |
5 | Via keypad one can select 8 presets, change effect, effect speed, effect intensity and palette. Brightness can be
6 | adjusted with a potentiometer.
7 |
8 | ## Pictures
9 |
10 | 
11 | 
12 | 
13 |
--------------------------------------------------------------------------------
/test/README:
--------------------------------------------------------------------------------
1 |
2 | This directory is intended for PIO Unit Testing and project tests.
3 |
4 | Unit Testing is a software testing method by which individual units of
5 | source code, sets of one or more MCU program modules together with associated
6 | control data, usage procedures, and operating procedures, are tested to
7 | determine whether they are fit for use. Unit testing finds problems early
8 | in the development cycle.
9 |
10 | More information about PIO Unit Testing:
11 | - https://docs.platformio.org/page/plus/unit-testing.html
12 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/ParsingInformation.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace AsyncMqttClientInternals {
4 | enum class BufferState : uint8_t {
5 | NONE = 0,
6 | REMAINING_LENGTH = 2,
7 | VARIABLE_HEADER = 3,
8 | PAYLOAD = 4
9 | };
10 |
11 | struct ParsingInformation {
12 | BufferState bufferState;
13 |
14 | uint16_t maxTopicLength;
15 | char* topicBuffer;
16 |
17 | uint8_t packetType;
18 | uint16_t packetFlags;
19 | uint32_t remainingLength;
20 | };
21 | } // namespace AsyncMqttClientInternals
22 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/timezone/LICENSE.md:
--------------------------------------------------------------------------------
1 | #Arduino Timezone Library v1.0
2 | https://github.com/JChristensen/Timezone
3 | LICENSE file
4 | Jack Christensen Mar 2012
5 |
6 | 
7 | ##CC BY-SA
8 | Arduino Timezone Library by Jack Christensen is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to:
9 | Creative Commons
10 | 444 Castro Street, Suite 900
11 | Mountain View, CA 94041
12 |
--------------------------------------------------------------------------------
/wled00/wled00.ino:
--------------------------------------------------------------------------------
1 | /*
2 | * WLED Arduino IDE compatibility file.
3 | *
4 | * Where has everything gone?
5 | *
6 | * In April 2020, the project's structure underwent a major change.
7 | * Global variables are now found in file "wled.h"
8 | * Global function declarations are found in "fcn_declare.h"
9 | *
10 | * Usermod compatibility: Existing wled06_usermod.ino mods should continue to work. Delete usermod.cpp.
11 | * New usermods should use usermod.cpp instead.
12 | */
13 | #include "wled.h"
14 |
15 | void setup() {
16 | WLED::instance().setup();
17 | }
18 |
19 | void loop() {
20 | WLED::instance().loop();
21 | }
22 |
--------------------------------------------------------------------------------
/usermods/Artemis_reciever/readme.md:
--------------------------------------------------------------------------------
1 | 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)
2 |
3 | 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.
4 |
5 | To install, copy the usermod.cpp file to wled00 folder and recompile
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PingRespPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "PingRespPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::PingRespPacket;
4 |
5 | PingRespPacket::PingRespPacket(ParsingInformation* parsingInformation, OnPingRespInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback) {
8 | }
9 |
10 | PingRespPacket::~PingRespPacket() {
11 | }
12 |
13 | void PingRespPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
14 | (void)data;
15 | (void)currentBytePosition;
16 | }
17 |
18 | void PingRespPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
19 | (void)data;
20 | (void)currentBytePosition;
21 | }
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: Have a question about using WLED?
4 | title: ''
5 | labels: question
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Take a look at the wiki and FAQ, perhaps your question is already answered!**
11 | [FAQ](https://github.com/Aircoookie/WLED/wiki/FAQ)
12 |
13 | **Please consider asking your question on the WLED forum or Discord**
14 | [Forum](https://wled.discourse.group/)
15 | [Discord](https://discord.gg/KuqP7NE)
16 | [What to post where?](https://github.com/Aircoookie/WLED/issues/658)
17 |
18 | **If you do not like to use these platforms, delete this template and ask away!**
19 | Please keep in mind though that the issue section is generally not the preferred place for general questions.
20 |
--------------------------------------------------------------------------------
/usermods/Temperature/usermods_list.cpp:
--------------------------------------------------------------------------------
1 | #include "wled.h"
2 | /*
3 | * Register your v2 usermods here!
4 | */
5 |
6 | /*
7 | * Add/uncomment your usermod filename here (and once more below)
8 | * || || ||
9 | * \/ \/ \/
10 | */
11 | //#include "usermod_v2_example.h"
12 | #ifdef USERMOD_DALLASTEMPERATURE
13 | #include "../usermods/Temperature/usermod_temperature.h"
14 | #endif
15 |
16 | //#include "usermod_v2_empty.h"
17 |
18 | void registerUsermods()
19 | {
20 | /*
21 | * Add your usermod class name here
22 | * || || ||
23 | * \/ \/ \/
24 | */
25 | //usermods.add(new MyExampleUsermod());
26 | #ifdef USERMOD_DALLASTEMPERATURE
27 | usermods.add(new UsermodTemperature());
28 | #endif
29 |
30 | //usermods.add(new UsermodRenameMe());
31 | }
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an improvement idea for WLED!
4 | title: ''
5 | labels: enhancement
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
22 | Thank you for your ideas for making WLED better!
23 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PingRespPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class PingRespPacket : public Packet {
10 | public:
11 | explicit PingRespPacket(ParsingInformation* parsingInformation, OnPingRespInternalCallback callback);
12 | ~PingRespPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnPingRespInternalCallback _callback;
20 | };
21 | } // namespace AsyncMqttClientInternals
22 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 120
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 7
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - pinned
8 | - keep
9 | - enhancement
10 | - confirmed
11 | # Label to use when marking an issue as stale
12 | staleLabel: stale
13 | # Comment to post when marking an issue as stale. Set to `false` to disable
14 | markComment: >
15 | Hey! This issue has been open for quite some time without any new comments now.
16 | It will be closed automatically in a week if no further activity occurs.
17 |
18 | Thank you for using WLED!
19 | # Comment to post when closing a stale issue. Set to `false` to disable
20 | closeComment: false
21 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/time/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Time",
3 | "description": "Time keeping library",
4 | "keywords": "Time, date, hour, minute, second, day, week, month, year, RTC",
5 | "authors": [
6 | {
7 | "name": "Michael Margolis"
8 | },
9 | {
10 | "name": "Paul Stoffregen",
11 | "email": "paul@pjrc.com",
12 | "url": "http://www.pjrc.com",
13 | "maintainer": true
14 | }
15 | ],
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/PaulStoffregen/Time"
19 | },
20 | "version": "1.5",
21 | "homepage": "http://playground.arduino.cc/Code/Time",
22 | "frameworks": "Arduino",
23 | "examples": [
24 | "examples/*/*.ino"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/usermods/JSON_IR_remote/6-key_ir.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "6-key",
3 | "0xFF0FF0": {
4 | "label": "Power",
5 | "pos": "1x1",
6 | "cmd": "T=2"
7 | },
8 | "0xFF8F70": {
9 | "label": "Channel +",
10 | "pos": "2x1",
11 | "cmnt": "Cycle palette up",
12 | "cmd": "FP=~"
13 | },
14 | "0xFF4FB0": {
15 | "label": "Channel -",
16 | "pos": "3x1",
17 | "cmnt": "Cycle palette down",
18 | "cmd": "FP=~-"
19 | },
20 | "0xFFCF30": {
21 | "label": "Volume +",
22 | "pos": "4x1",
23 | "cmnt": "Brighten",
24 | "cmd": "A=~16"
25 | },
26 | "0xFF2FD0": {
27 | "label": "Volume -",
28 | "pos": "5x1",
29 | "cmnt": "Dim",
30 | "cmd": "A=~-16"
31 | },
32 | "0xFFAF50": {
33 | "label": "Mute",
34 | "pos": "6x1",
35 | "cmnt": "Cycle effects",
36 | "cmd": "CY=0&FX=~"
37 | }
38 | }
--------------------------------------------------------------------------------
/wled00/src/dependencies/dmx/ESPDMX.h:
--------------------------------------------------------------------------------
1 | // - - - - -
2 | // ESPDMX - A Arduino library for sending and receiving DMX using the builtin serial hardware port.
3 | // ESPDMX.cpp: Library implementation file
4 | //
5 | // Copyright (C) 2015 Rick
6 | // This work is licensed under a GNU style license.
7 | //
8 | // Last change: Marcel Seerig
9 | //
10 | // Documentation and samples are available at https://github.com/Rickgg/ESP-Dmx
11 | // - - - - -
12 |
13 | #include
14 |
15 |
16 | #ifndef ESPDMX_h
17 | #define ESPDMX_h
18 |
19 | // ---- Methods ----
20 |
21 | class DMXESPSerial {
22 | public:
23 | void init();
24 | void init(int MaxChan);
25 | uint8_t read(int Channel);
26 | void write(int channel, uint8_t value);
27 | void update();
28 | void end();
29 | };
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/wled00/data/msg.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | WLED Message
7 |
8 |
29 |
30 |
31 |
32 | Sample Message.
33 | Sample Detail.
34 |
35 |
36 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubAckPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class PubAckPacket : public Packet {
10 | public:
11 | explicit PubAckPacket(ParsingInformation* parsingInformation, OnPubAckInternalCallback callback);
12 | ~PubAckPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnPubAckInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | char _packetIdMsb;
23 | uint16_t _packetId;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubRecPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class PubRecPacket : public Packet {
10 | public:
11 | explicit PubRecPacket(ParsingInformation* parsingInformation, OnPubRecInternalCallback callback);
12 | ~PubRecPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnPubRecInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | char _packetIdMsb;
23 | uint16_t _packetId;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubRelPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class PubRelPacket : public Packet {
10 | public:
11 | explicit PubRelPacket(ParsingInformation* parsingInformation, OnPubRelInternalCallback callback);
12 | ~PubRelPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnPubRelInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | char _packetIdMsb;
23 | uint16_t _packetId;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/SubAckPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class SubAckPacket : public Packet {
10 | public:
11 | explicit SubAckPacket(ParsingInformation* parsingInformation, OnSubAckInternalCallback callback);
12 | ~SubAckPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnSubAckInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | char _packetIdMsb;
23 | uint16_t _packetId;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubCompPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class PubCompPacket : public Packet {
10 | public:
11 | explicit PubCompPacket(ParsingInformation* parsingInformation, OnPubCompInternalCallback callback);
12 | ~PubCompPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnPubCompInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | char _packetIdMsb;
23 | uint16_t _packetId;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/UnsubAckPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class UnsubAckPacket : public Packet {
10 | public:
11 | explicit UnsubAckPacket(ParsingInformation* parsingInformation, OnUnsubAckInternalCallback callback);
12 | ~UnsubAckPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnUnsubAckInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | char _packetIdMsb;
23 | uint16_t _packetId;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/ConnAckPacket.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Arduino.h"
4 | #include "Packet.hpp"
5 | #include "../ParsingInformation.hpp"
6 | #include "../Callbacks.hpp"
7 |
8 | namespace AsyncMqttClientInternals {
9 | class ConnAckPacket : public Packet {
10 | public:
11 | explicit ConnAckPacket(ParsingInformation* parsingInformation, OnConnAckInternalCallback callback);
12 | ~ConnAckPacket();
13 |
14 | void parseVariableHeader(char* data, size_t len, size_t* currentBytePosition);
15 | void parsePayload(char* data, size_t len, size_t* currentBytePosition);
16 |
17 | private:
18 | ParsingInformation* _parsingInformation;
19 | OnConnAckInternalCallback _callback;
20 |
21 | uint8_t _bytePosition;
22 | bool _sessionPresent;
23 | uint8_t _connectReturnCode;
24 | };
25 | } // namespace AsyncMqttClientInternals
26 |
--------------------------------------------------------------------------------
/usermods/BH1750_v2/platformio_override.ini:
--------------------------------------------------------------------------------
1 | ; Options
2 | ; -------
3 | ; USERMOD_BH1750 - define this to have this user mod included wled00\usermods_list.cpp
4 | ; USERMOD_BH1750_MAX_MEASUREMENT_INTERVAL - the max number of milliseconds between measurements, defaults to 10000ms
5 | ; USERMOD_BH1750_MIN_MEASUREMENT_INTERVAL - the min number of milliseconds between measurements, defaults to 500ms
6 | ; USERMOD_BH1750_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 10 seconds
7 | ; USERMOD_BH1750_OFFSET_VALUE - the offset value to report on, defaults to 1
8 | ;
9 | [env:usermod_BH1750_d1_mini]
10 | extends = env:d1_mini
11 | build_flags =
12 | ${common.build_flags_esp8266}
13 | -D USERMOD_BH1750
14 | lib_deps =
15 | ${env.lib_deps}
16 | claws/BH1750 @ ^1.2.0
17 |
--------------------------------------------------------------------------------
/usermods/Temperature/platformio_override.ini:
--------------------------------------------------------------------------------
1 | ; Options
2 | ; -------
3 | ; USERMOD_DALLASTEMPERATURE - define this to have this user mod included wled00\usermods_list.cpp
4 | ; USERMOD_DALLASTEMPERATURE_CELSIUS - define this to report temperatures in degrees celsius, otherwise fahrenheit will be reported
5 | ; USERMOD_DALLASTEMPERATURE_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds
6 | ; USERMOD_DALLASTEMPERATURE_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 20 seconds
7 | ;
8 | [env:d1_mini_usermod_dallas_temperature_C]
9 | extends = env:d1_mini
10 | build_flags = ${common.build_flags_esp8266} -D USERMOD_DALLASTEMPERATURE -D USERMOD_DALLASTEMPERATURE_CELSIUS
11 | lib_deps = ${env.lib_deps}
12 | milesburton/DallasTemperature@^3.9.0
13 | OneWire@~2.3.5
14 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "wled",
3 | "version": "0.13.0-b6",
4 | "description": "Tools for WLED project",
5 | "main": "tools/cdata.js",
6 | "directories": {
7 | "lib": "lib",
8 | "test": "test"
9 | },
10 | "scripts": {
11 | "build": "node tools/cdata.js",
12 | "dev": "nodemon -e js,html,htm,css,png,jpg,gif,ico,js -w tools/ -w wled00/data/ -x node tools/cdata.js"
13 | },
14 | "repository": {
15 | "type": "git",
16 | "url": "git+https://github.com/Aircoookie/WLED.git"
17 | },
18 | "author": "",
19 | "license": "ISC",
20 | "bugs": {
21 | "url": "https://github.com/Aircoookie/WLED/issues"
22 | },
23 | "homepage": "https://github.com/Aircoookie/WLED#readme",
24 | "dependencies": {
25 | "clean-css": "^4.2.3",
26 | "html-minifier-terser": "^5.1.1",
27 | "inliner": "^1.13.1",
28 | "nodemon": "^2.0.4",
29 | "zlib": "^1.0.5"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/wled00/usermod.cpp:
--------------------------------------------------------------------------------
1 | #include "wled.h"
2 | /*
3 | * This v1 usermod file allows you to add own functionality to WLED more easily
4 | * See: https://github.com/Aircoookie/WLED/wiki/Add-own-functionality
5 | * EEPROM bytes 2750+ are reserved for your custom use case. (if you extend #define EEPSIZE in const.h)
6 | * If you just need 8 bytes, use 2551-2559 (you do not need to increase EEPSIZE)
7 | *
8 | * Consider the v2 usermod API if you need a more advanced feature set!
9 | */
10 |
11 | //Use userVar0 and userVar1 (API calls &U0=,&U1=, uint16_t)
12 |
13 | //gets called once at boot. Do all initialization that doesn't depend on network here
14 | void userSetup()
15 | {
16 |
17 | }
18 |
19 | //gets called every time WiFi is (re-)connected. Initialize own network interfaces here
20 | void userConnected()
21 | {
22 |
23 | }
24 |
25 | //loop. You can use "if (WLED_CONNECTED)" to check for successful connection
26 | void userLoop()
27 | {
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/usermods/RTC/usermod_rtc.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "src/dependencies/time/DS1307RTC.h"
4 | #include "wled.h"
5 |
6 | //Connect DS1307 to standard I2C pins (ESP32: GPIO 21 (SDA)/GPIO 22 (SCL))
7 |
8 | class RTCUsermod : public Usermod {
9 | private:
10 | unsigned long lastTime = 0;
11 | bool disabled = false;
12 | public:
13 |
14 | void setup() {
15 | time_t rtcTime = RTC.get();
16 | if (rtcTime) {
17 | toki.setTime(rtcTime,TOKI_NO_MS_ACCURACY,TOKI_TS_RTC);
18 | updateLocalTime();
19 | } else {
20 | if (!RTC.chipPresent()) disabled = true; //don't waste time if H/W error
21 | }
22 | }
23 |
24 | void loop() {
25 | if (!disabled && toki.isTick()) {
26 | time_t t = toki.second();
27 | if (t != RTC.get()) RTC.set(t); //set RTC to NTP/UI-provided value
28 | }
29 | }
30 |
31 | uint16_t getId()
32 | {
33 | return USERMOD_ID_RTC;
34 | }
35 | };
--------------------------------------------------------------------------------
/usermods/photoresistor_sensor_mqtt_v1/README.md:
--------------------------------------------------------------------------------
1 | # Photoresister sensor with MQTT
2 |
3 | This simple usermod allows attaching a photoresistor sensor like the KY-018 and publish the readings in percentage over MQTT. The frequency of MQTT messages can be modified, and there is a threshold value that can be set so that significant changes in the readings can be published immediately instead of waiting for the next update. This was found to be a good compromise between spamming MQTT messages and delayed updates.
4 |
5 | I also found it useful to limit the frequency of analog pin reads because otherwise the board hangs.
6 |
7 | This usermod has only been tested with the KY-018 sensor though should work for any other analog pin sensor. Note that this does not control the LED strip directly, it only publishes MQTT readings for use with other integrations like Home Assistant.
8 |
9 | ## Installation
10 |
11 | Copy and replace the file `usermod.cpp` in wled00 directory.
12 |
--------------------------------------------------------------------------------
/usermods/project_cars_shiftlight/readme.md:
--------------------------------------------------------------------------------
1 | ### Shift Light for Project Cars
2 |
3 | Turn your WLED lights into a rev light and shift indicator for Project Cars.
4 |
5 | It is pretty straight forward to use.
6 |
7 | 1. Make sure, your WLED device and your PC/console are on the same network and can talk to each other
8 |
9 | 2. Go to the gameplay settings menu in PCARS and enable UDP. There are 9 numbers you can choose from. This is the refresh rate. The lower the number, the better. But you might run into problems at faster rates.
10 |
11 | | Number | Updates/Second |
12 | | ------ | -------------- |
13 | | 1 | 60 |
14 | | 2 | 50 |
15 | | 3 | 40 |
16 | | 4 | 30 |
17 | | 5 | 20 |
18 | | 6 | 15 |
19 | | 7 | 10 |
20 | | 8 | 05 |
21 | | 9 | 1 |
22 |
23 | 3. once you enter a race, WLED should automatically shift to PCARS mode. Done.
24 |
--------------------------------------------------------------------------------
/wled00/util.cpp:
--------------------------------------------------------------------------------
1 | #include "wled.h"
2 | #include "fcn_declare.h"
3 | #include "const.h"
4 |
5 | //threading/network callback details: https://github.com/Aircoookie/WLED/pull/2336#discussion_r762276994
6 | bool requestJSONBufferLock(uint8_t module)
7 | {
8 | unsigned long now = millis();
9 |
10 | while (jsonBufferLock && millis()-now < 1000) delay(1); // wait for a second for buffer lock
11 |
12 | if (millis()-now >= 1000) {
13 | DEBUG_PRINT(F("ERROR: Locking JSON buffer failed! ("));
14 | DEBUG_PRINT(jsonBufferLock);
15 | DEBUG_PRINTLN(")");
16 | return false; // waiting time-outed
17 | }
18 |
19 | jsonBufferLock = module ? module : 255;
20 | fileDoc = &doc; // used for applying presets (presets.cpp)
21 | doc.clear();
22 | return true;
23 | }
24 |
25 |
26 | void releaseJSONBufferLock()
27 | {
28 | DEBUG_PRINT(F("JSON buffer released. ("));
29 | DEBUG_PRINT(jsonBufferLock);
30 | DEBUG_PRINTLN(")");
31 | fileDoc = nullptr;
32 | jsonBufferLock = 0;
33 | }
34 |
--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "Build: HTML and binary",
6 | "dependsOn": [
7 | "Build: HTML only",
8 | "Build: binary only"
9 | ],
10 | "dependsOrder": "sequence",
11 | "problemMatcher": [
12 | "$platformio",
13 | ],
14 | },
15 | {
16 | "type": "PlatformIO",
17 | "label": "Build: binary only",
18 | "task": "Build",
19 | "group": {
20 | "kind": "build",
21 | "isDefault": true,
22 | },
23 | "problemMatcher": [
24 | "$platformio"
25 | ],
26 | "presentation": {
27 | "panel": "shared"
28 | }
29 | },
30 | {
31 | "type": "npm",
32 | "script": "build",
33 | "group": "build",
34 | "problemMatcher": [],
35 | "label": "Build: HTML only",
36 | "detail": "npm run build",
37 | "presentation": {
38 | "panel": "shared"
39 | }
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/usermods/JSON_IR_remote/9-key_ir.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "9-key",
3 | "0xFF629D": {
4 | "label": "Power",
5 | "cmd": "T=2"
6 | },
7 | "0xFF22DD": {
8 | "label": "A",
9 | "cmnt": "Preset 1",
10 | "cmd": "PL=1"
11 | },
12 | "0xFF02FD": {
13 | "label": "B",
14 | "cmnt": "Preset 2",
15 | "cmd": "PL=2"
16 | },
17 | "0xFFC23D": {
18 | "label": "C",
19 | "cmnt": "Preset 3",
20 | "cmd": "PL=3"
21 | },
22 | "0xFF30CF": {
23 | "label": "Left",
24 | "cmnt": "Speed -",
25 | "cmd": "SI=~-16"
26 | },
27 | "0xFF7A85": {
28 | "label": "Right",
29 | "cmnt": "Speed +",
30 | "cmd": "SI=~16"
31 | },
32 | "0xFF9867": {
33 | "label": "Up",
34 | "cmnt": "Bright +",
35 | "cmd": "A=~16"
36 | },
37 | "0xFF38C7": {
38 | "label": "Down",
39 | "cmnt": "Bright -",
40 | "cmd": "A=~-16"
41 | },
42 | "0xFF18E7": {
43 | "label": "Select",
44 | "cmnt": "Cycle effects",
45 | "cmd": "CY=0&FX=~"
46 | }
47 | }
--------------------------------------------------------------------------------
/usermods/stairway_wipe_basic/readme.md:
--------------------------------------------------------------------------------
1 | ### Stairway lighting
2 |
3 | Quick usermod to accomplish something similar to [this video](https://www.youtube.com/watch?v=NHkju5ncC4A).
4 |
5 | This usermod allows you to add a lightstrip alongside or on the steps of a staircase.
6 | When the `userVar0` variable is set, the LEDs will gradually turn on in a Wipe effect.
7 | Both directions are supported by setting userVar0 to 1 and 2, respectively (HTTP API commands `U0=1` and `U0=2`).
8 |
9 | After the Wipe is complete, the light will either stay on (Solid effect) indefinitely or after `userVar1` seconds have elapsed.
10 | If userVar0 is updated (e.g. by triggering a second sensor) the light will slowly fade off.
11 | This could be extended to also run a Wipe effect in reverse order to turn the LEDs back off.
12 |
13 | This is just a basic version to accomplish this using HTTP API calls `U0` and `U1` and/or macros.
14 | It should be easy to adapt this code however to interface with motion sensors or other input devices.
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/README.md:
--------------------------------------------------------------------------------
1 | Async MQTT client for ESP8266 and ESP32 (Github: https://github.com/marvinroger/async-mqtt-client)
2 | =============================
3 |
4 | [](https://travis-ci.org/marvinroger/async-mqtt-client)
5 |
6 | An Arduino for ESP8266 and ESP32 asynchronous [MQTT](http://mqtt.org/) client implementation, built on [me-no-dev/ESPAsyncTCP (ESP8266)](https://github.com/me-no-dev/ESPAsyncTCP) | [me-no-dev/AsyncTCP (ESP32)](https://github.com/me-no-dev/AsyncTCP) .
7 | ## Features
8 |
9 | * Compliant with the 3.1.1 version of the protocol
10 | * Fully asynchronous
11 | * Subscribe at QoS 0, 1 and 2
12 | * Publish at QoS 0, 1 and 2
13 | * SSL/TLS support
14 | * Available in the [PlatformIO registry](http://platformio.org/lib/show/346/AsyncMqttClient)
15 |
16 | ## Requirements, installation and usage
17 |
18 | The project is documented in the [/docs folder](docs).
19 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubAckPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "PubAckPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::PubAckPacket;
4 |
5 | PubAckPacket::PubAckPacket(ParsingInformation* parsingInformation, OnPubAckInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback)
8 | , _bytePosition(0)
9 | , _packetIdMsb(0)
10 | , _packetId(0) {
11 | }
12 |
13 | PubAckPacket::~PubAckPacket() {
14 | }
15 |
16 | void PubAckPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
17 | char currentByte = data[(*currentBytePosition)++];
18 | if (_bytePosition++ == 0) {
19 | _packetIdMsb = currentByte;
20 | } else {
21 | _packetId = currentByte | _packetIdMsb << 8;
22 | _parsingInformation->bufferState = BufferState::NONE;
23 | _callback(_packetId);
24 | }
25 | }
26 |
27 | void PubAckPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
28 | (void)data;
29 | (void)currentBytePosition;
30 | }
31 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubRecPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "PubRecPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::PubRecPacket;
4 |
5 | PubRecPacket::PubRecPacket(ParsingInformation* parsingInformation, OnPubRecInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback)
8 | , _bytePosition(0)
9 | , _packetIdMsb(0)
10 | , _packetId(0) {
11 | }
12 |
13 | PubRecPacket::~PubRecPacket() {
14 | }
15 |
16 | void PubRecPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
17 | char currentByte = data[(*currentBytePosition)++];
18 | if (_bytePosition++ == 0) {
19 | _packetIdMsb = currentByte;
20 | } else {
21 | _packetId = currentByte | _packetIdMsb << 8;
22 | _parsingInformation->bufferState = BufferState::NONE;
23 | _callback(_packetId);
24 | }
25 | }
26 |
27 | void PubRecPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
28 | (void)data;
29 | (void)currentBytePosition;
30 | }
31 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubRelPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "PubRelPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::PubRelPacket;
4 |
5 | PubRelPacket::PubRelPacket(ParsingInformation* parsingInformation, OnPubRelInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback)
8 | , _bytePosition(0)
9 | , _packetIdMsb(0)
10 | , _packetId(0) {
11 | }
12 |
13 | PubRelPacket::~PubRelPacket() {
14 | }
15 |
16 | void PubRelPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
17 | char currentByte = data[(*currentBytePosition)++];
18 | if (_bytePosition++ == 0) {
19 | _packetIdMsb = currentByte;
20 | } else {
21 | _packetId = currentByte | _packetIdMsb << 8;
22 | _parsingInformation->bufferState = BufferState::NONE;
23 | _callback(_packetId);
24 | }
25 | }
26 |
27 | void PubRelPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
28 | (void)data;
29 | (void)currentBytePosition;
30 | }
31 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/PubCompPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "PubCompPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::PubCompPacket;
4 |
5 | PubCompPacket::PubCompPacket(ParsingInformation* parsingInformation, OnPubCompInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback)
8 | , _bytePosition(0)
9 | , _packetIdMsb(0)
10 | , _packetId(0) {
11 | }
12 |
13 | PubCompPacket::~PubCompPacket() {
14 | }
15 |
16 | void PubCompPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
17 | char currentByte = data[(*currentBytePosition)++];
18 | if (_bytePosition++ == 0) {
19 | _packetIdMsb = currentByte;
20 | } else {
21 | _packetId = currentByte | _packetIdMsb << 8;
22 | _parsingInformation->bufferState = BufferState::NONE;
23 | _callback(_packetId);
24 | }
25 | }
26 |
27 | void PubCompPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
28 | (void)data;
29 | (void)currentBytePosition;
30 | }
31 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/UnsubAckPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "UnsubAckPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::UnsubAckPacket;
4 |
5 | UnsubAckPacket::UnsubAckPacket(ParsingInformation* parsingInformation, OnUnsubAckInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback)
8 | , _bytePosition(0)
9 | , _packetIdMsb(0)
10 | , _packetId(0) {
11 | }
12 |
13 | UnsubAckPacket::~UnsubAckPacket() {
14 | }
15 |
16 | void UnsubAckPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
17 | char currentByte = data[(*currentBytePosition)++];
18 | if (_bytePosition++ == 0) {
19 | _packetIdMsb = currentByte;
20 | } else {
21 | _packetId = currentByte | _packetIdMsb << 8;
22 | _parsingInformation->bufferState = BufferState::NONE;
23 | _callback(_packetId);
24 | }
25 | }
26 |
27 | void UnsubAckPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
28 | (void)data;
29 | (void)currentBytePosition;
30 | }
31 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/time/DS1307RTC.h:
--------------------------------------------------------------------------------
1 | /*
2 | * DS1307RTC.h - library for DS1307 RTC
3 | * This library is intended to be uses with Arduino Time library functions
4 | */
5 |
6 | #ifndef DS1307RTC_h
7 | #define DS1307RTC_h
8 |
9 | #include "TimeLib.h"
10 |
11 | // library interface description
12 | class DS1307RTC
13 | {
14 | // user-accessible "public" interface
15 | public:
16 | DS1307RTC();
17 | static time_t get();
18 | static bool set(time_t t);
19 | static bool read(tmElements_t &tm);
20 | static bool write(tmElements_t &tm);
21 | static bool chipPresent() { return exists; }
22 | static unsigned char isRunning();
23 | static void setCalibration(char calValue);
24 | static char getCalibration();
25 |
26 | private:
27 | static bool exists;
28 | static uint8_t dec2bcd(uint8_t num);
29 | static uint8_t bcd2dec(uint8_t num);
30 | };
31 |
32 | #ifdef RTC
33 | #undef RTC // workaround for Arduino Due, which defines "RTC"...
34 | #endif
35 |
36 | extern DS1307RTC RTC;
37 |
38 | #endif
39 |
40 |
41 |
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Packets/ConnAckPacket.cpp:
--------------------------------------------------------------------------------
1 | #include "ConnAckPacket.hpp"
2 |
3 | using AsyncMqttClientInternals::ConnAckPacket;
4 |
5 | ConnAckPacket::ConnAckPacket(ParsingInformation* parsingInformation, OnConnAckInternalCallback callback)
6 | : _parsingInformation(parsingInformation)
7 | , _callback(callback)
8 | , _bytePosition(0)
9 | , _sessionPresent(false)
10 | , _connectReturnCode(0) {
11 | }
12 |
13 | ConnAckPacket::~ConnAckPacket() {
14 | }
15 |
16 | void ConnAckPacket::parseVariableHeader(char* data, size_t len, size_t* currentBytePosition) {
17 | char currentByte = data[(*currentBytePosition)++];
18 | if (_bytePosition++ == 0) {
19 | _sessionPresent = (currentByte << 7) >> 7;
20 | } else {
21 | _connectReturnCode = currentByte;
22 | _parsingInformation->bufferState = BufferState::NONE;
23 | _callback(_sessionPresent, _connectReturnCode);
24 | }
25 | }
26 |
27 | void ConnAckPacket::parsePayload(char* data, size_t len, size_t* currentBytePosition) {
28 | (void)data;
29 | (void)currentBytePosition;
30 | }
31 |
--------------------------------------------------------------------------------
/usermods/SN_Photoresistor/platformio_override.ini:
--------------------------------------------------------------------------------
1 | ; Options
2 | ; -------
3 | ; USERMOD_SN_PHOTORESISTOR - define this to have this user mod included wled00\usermods_list.cpp
4 | ; USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL - the number of milliseconds between measurements, defaults to 60 seconds
5 | ; USERMOD_SN_PHOTORESISTOR_FIRST_MEASUREMENT_AT - the number of milliseconds after boot to take first measurement, defaults to 20 seconds
6 | ; USERMOD_SN_PHOTORESISTOR_REFERENCE_VOLTAGE - the voltage supplied to the sensor, defaults to 5v
7 | ; USERMOD_SN_PHOTORESISTOR_ADC_PRECISION - the ADC precision is the number of distinguishable ADC inputs, defaults to 1024.0 (10 bits)
8 | ; USERMOD_SN_PHOTORESISTOR_RESISTOR_VALUE - the resistor size, defaults to 10000.0 (10K hms)
9 | ; USERMOD_SN_PHOTORESISTOR_OFFSET_VALUE - the offset value to report on, defaults to 25
10 | ;
11 | [env:usermod_sn_photoresistor_d1_mini]
12 | extends = env:d1_mini
13 | build_flags =
14 | ${common.build_flags_esp8266}
15 | -D USERMOD_SN_PHOTORESISTOR
16 | lib_deps = ${env.lib_deps}
17 |
--------------------------------------------------------------------------------
/usermods/UserModv2_SunRiseAndSet/README.md:
--------------------------------------------------------------------------------
1 | WLED v2 UserMod for running macros at sunrise and sunset.
2 |
3 | At the time of this text, this user mod requires code to be changed to set certain variables:
4 | 1. To reflect the user's graphical location (latitude/longitude) used for calculating apparent sunrise/sunset
5 | 2. To specify which macros will be run at sunrise and/or sunset. (defaults to 15 at sunrise and 16 at sunset)
6 | 3. To optionally provide an offset from sunrise/sunset, in minutes (max of +/- 2 hours), when the macro will be run.
7 |
8 | In addition, WLED must be configured to get time from NTP (and the time must be retrieved via NTP.)
9 |
10 | Please open the UserMod_SunRiseAndSet.h file for instructions on what needs to be changed, where to copy files, etc.
11 |
12 | If this usermod proves useful enough, the code might eventually be updated to allow prompting for the required information
13 | via the web interface and to store settings in EEPROM instead of hard-coding in the .h file.
14 |
15 | This usermod has only been tested on the esp32dev platform, but there's no reason it wouldn't work on other platforms.
16 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Christian Schwinne
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/usermods/ST7789_display/Setup_ST7789_Display.h:
--------------------------------------------------------------------------------
1 | // Setup for the ESP32 board with 1.5" 240x240 display
2 |
3 | // See SetupX_Template.h for all options available
4 |
5 | #define ST7789_DRIVER
6 | #define TFT_SDA_READ // Display has a bidirectionsl SDA pin
7 |
8 | #define TFT_WIDTH 240
9 | #define TFT_HEIGHT 240
10 |
11 | #define CGRAM_OFFSET // Library will add offsets required
12 |
13 | //#define TFT_MISO -1
14 |
15 | #define TFT_MOSI 21
16 | #define TFT_SCLK 22
17 | //#define TFT_CS 5
18 | #define TFT_DC 18
19 | #define TFT_RST 5
20 |
21 | #define TFT_BL 26 // Display backlight control pin
22 |
23 | #define TFT_BACKLIGHT_ON HIGH // HIGH or LOW are options
24 |
25 | #define LOAD_GLCD
26 | #define LOAD_FONT2
27 | #define LOAD_FONT4
28 | #define LOAD_FONT6
29 | #define LOAD_FONT7
30 | #define LOAD_FONT8
31 | #define LOAD_GFXFF
32 |
33 | //#define SMOOTH_FONT
34 |
35 | //#define SPI_FREQUENCY 27000000
36 | #define SPI_FREQUENCY 40000000 // Maximum for ILI9341
37 |
38 |
39 | #define SPI_READ_FREQUENCY 6000000 // 6 MHz is the maximum SPI read speed for the ST7789V
--------------------------------------------------------------------------------
/wled00/src/dependencies/async-mqtt-client/AsyncMqttClient/Helpers.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace AsyncMqttClientInternals {
4 | class Helpers {
5 | public:
6 | static uint32_t decodeRemainingLength(char* bytes) {
7 | uint32_t multiplier = 1;
8 | uint32_t value = 0;
9 | uint8_t currentByte = 0;
10 | uint8_t encodedByte;
11 | do {
12 | encodedByte = bytes[currentByte++];
13 | value += (encodedByte & 127) * multiplier;
14 | multiplier *= 128;
15 | } while ((encodedByte & 128) != 0);
16 |
17 | return value;
18 | }
19 |
20 | static uint8_t encodeRemainingLength(uint32_t remainingLength, char* destination) {
21 | uint8_t currentByte = 0;
22 | uint8_t bytesNeeded = 0;
23 |
24 | do {
25 | uint8_t encodedByte = remainingLength % 128;
26 | remainingLength /= 128;
27 | if (remainingLength > 0) {
28 | encodedByte = encodedByte | 128;
29 | }
30 |
31 | destination[currentByte++] = encodedByte;
32 | bytesNeeded++;
33 | } while (remainingLength > 0);
34 |
35 | return bytesNeeded;
36 | }
37 | };
38 | } // namespace AsyncMqttClientInternals
39 |
--------------------------------------------------------------------------------
/usermods/blynk_relay_control/README.md:
--------------------------------------------------------------------------------
1 | # Blynk controllable relay
2 | This usermod allows controlling a relay state from the user variables. It also allows the user variables to be set over Blynk.
3 |
4 | Optionally, the servo can have a reset timer to go back to it's default state after an interval. This interval is set through userVar1.
5 |
6 | ## Instalation
7 |
8 | Replace the WLED06_usermod.ino file in Aircoookies WLED folder with the one here.
9 |
10 | ## Customizations
11 |
12 | Update the following parameters in WLED06_usermod.ino to configure the mod's behavior:
13 |
14 | ```cpp
15 | //Which pin is the relay connected to
16 | #define RELAY_PIN 5
17 | //Which pin state should the relay default to
18 | #define RELAY_PIN_DEFAULT LOW
19 | //If >0 The controller returns to RELAY_PIN_DEFAULT after this time in milliseconds
20 | #define RELAY_PIN_TIMER_DEFAULT 3000
21 |
22 | //Blynk virtual pin for controlling relay
23 | #define BLYNK_USER_VAR0_PIN V9
24 | //Blynk virtual pin for controlling relay timer
25 | #define BLYNK_USER_VAR1_PIN V10
26 | //Number of milliseconds between updating blynk
27 | #define BLYNK_RELAY_UPDATE_INTERVAL 5000
28 | ```
29 |
--------------------------------------------------------------------------------
/wled00.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28010.2046
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wled00", "wled00\wled00.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x86 = Debug|x86
11 | Release|x86 = Release|x86
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32
15 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32
16 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32
17 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {9A679C2B-61D3-400B-B96F-06E604E9CED2}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/wled00/NodeStruct.h:
--------------------------------------------------------------------------------
1 | #ifndef WLED_NODESTRUCT_H
2 | #define WLED_NODESTRUCT_H
3 |
4 | /*********************************************************************************************\
5 | * NodeStruct from the ESP Easy project (https://github.com/letscontrolit/ESPEasy)
6 | \*********************************************************************************************/
7 |
8 | #include