diff --git a/README.md b/README.md index 2112fb62..c465dd12 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ ESPurna ("spark" in Catalan) is a custom firmware for ESP8285/ESP8266 based smar It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. [![version](https://img.shields.io/badge/version-1.13.3a-brightgreen.svg)](CHANGELOG.md) -[![branch](https://img.shields.io/badge/branch-dev-orange.svg)](https://github.com/xoseperez/espurna/tree/dev/) -[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna) +[![branch](https://img.shields.io/badge/branch-dev-orange.svg)](https://github.com/ColinShorts/espurna.git/tree/dev/) +[![travis](https://travis-ci.org/ColinShorts/espurna.git.svg?branch=dev)](https://travis-ci.org/ColinShorts/espurna.git) [![codacy](https://api.codacy.com/project/badge/Grade/c9496e25cf07434cba786b462cb15f49)](https://www.codacy.com/app/xoseperez/espurna/dashboard) [![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE)
diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index cc5810d3..0d0c4de8 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -98,6 +98,7 @@ //#define XIAOMI_SMART_DESK_LAMP //#define ALLTERCO_SHELLY2 //#define PHYX_ESP12_RGB +//#define IWOOLE_LED_TABLE_LAMP //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index b1d8df90..256a0f11 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -2765,6 +2765,30 @@ #define LIGHT_CH2_INVERSE 0 #define LIGHT_CH3_INVERSE 0 +// ----------------------------------------------------------------------------- +// iWoole LED Table Lamp +// http://iwoole.com/newst-led-smart-night-light-7w-smart-table-light-rgbw-wifi-app-remote-control-110v-220v-us-eu-plug-smart-lamp-google-home-decore-p00022p1.html +// ----------------------------------------------------------------------------- + +#elif defined(IWOOLE_LED_TABLE_LAMP) + + // Info + #define MANUFACTURER "IWOOLE" + #define DEVICE "LED_TABLE_LAMP" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 4 + #define LIGHT_CH1_PIN 12 // RED + #define LIGHT_CH2_PIN 5 // GREEN + #define LIGHT_CH3_PIN 14 // BLUE + #define LIGHT_CH4_PIN 4 // WHITE + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + #define LIGHT_CH4_INVERSE 0 // ----------------------------------------------------------------------------- // TEST boards (do not use!!) diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index 8426a661..9a05b5ae 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -1189,6 +1189,21 @@ void migrate() { setSetting("chLogic", 1, 0); setSetting("chLogic", 3, 0); + #elif defined(IWOOLE_LED_TABLE_LAMP) + + setSetting("board", 90); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); + setSetting("chGPIO", 0, 12); + setSetting("chGPIO", 1, 5); + setSetting("chGPIO", 2, 14); + setSetting("chGPIO", 3, 4); + setSetting("chLogic", 0, 0); + setSetting("chLogic", 1, 0); + setSetting("chLogic", 2, 0); + setSetting("chLogic", 3, 0); + setSetting("relays", 1); + #else // Allow users to define new settings without migration config diff --git a/code/platformio.ini b/code/platformio.ini index 24cbf693..bdb32319 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2202,6 +2202,32 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} +[env:iwoole-led-table-lamp] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DIWOOLE_LED_TABLE_LAMP +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:iwoole-led-table-lamp-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DIWOOLE_LED_TABLE_LAMP +upload_speed = ${common.upload_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + + # ------------------------------------------------------------------------------ # GENERIC OTA ENVIRONMENTS # ------------------------------------------------------------------------------