Browse Source

Merge branch 'master' into dev

fastled
Xose Pérez 7 years ago
parent
commit
1f0961eae2
5 changed files with 78 additions and 5 deletions
  1. +5
    -4
      README.md
  2. +1
    -1
      code/espurna/config/general.h
  3. +34
    -0
      code/espurna/config/hardware.h
  4. +15
    -0
      code/espurna/hardware.ino
  5. +23
    -0
      code/platformio.ini

+ 5
- 4
README.md View File

@ -12,6 +12,7 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari
## Features
* *KRACK* vulnerability free
* Support for **multiple ESP8266-based boards** ([check list](https://bitbucket.org/xoseperez/espurna/wiki/Hardware))
* Wifi **AP Mode** or **STA mode**
* Up to 5 different networks can be defined
@ -35,7 +36,7 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari
* [**Google Assistant**](http://tinkerman.cat/using-google-assistant-control-your-esp8266-devices/) integration using IFTTT and Webhooks (Google Home, Allo)
* [**Domoticz**](https://domoticz.com/) integration via MQTT
* [**Home Assistant**](https://home-assistant.io/) integration via MQTT
* Supports MQTT auto-discover feature
* Supports MQTT auto-discover feature (switches and lights)
* [**InfluxDB**](https://www.influxdata.com/) integration via HTTP API
* Support for different **sensors**
* DHT11 / DHT22 / DHT21 / AM2301 (supports celsius & fahrenheit reporting)
@ -68,7 +69,7 @@ It uses the Arduino Core for ESP8266 framework and a number of 3rd party librari
* Change configuration
* Run special commands
* **Telnet support**
* Available only if connected to the AP interface
* Enable/disable via the web UI
* Show debug info and allows to run terminal commands
* **Unstable system check**
* Detects unstable system (crashes on boot continuously) and defaults to a stable system
@ -103,8 +104,8 @@ Here is the list of supported hardware. For more information please refer to the
|**IteadStudio Sonoff Touch**|**IteadStudio Sonoff T1**||
|![IteadStudio Slampher](images/devices/itead-slampher.jpg)|![AI-Thinker Wifi Light / Noduino OpenLight](images/devices/aithinker-ai-light.jpg)|![Itead Sonoff B1](images/devices/itead-sonoff-b1.jpg)|
|**IteadStudio Slampher**|**AI-Thinker Wifi Light / Noduino OpenLight**|**IteadStudio Sonoff B1**|
|![MagicHome LED Controller](images/devices/magichome-led-controller.jpg)|![Huacanxing H801](images/devices/huacanxing-h801.jpg)|![Itead BN-SZ01](images/devices/itead-bn-sz01.jpg)|
|**MagicHome LED Controller**|**Huacanxing H801**|**Itead BN-SZ01**|
|![MagicHome LED Controller (1.0 and 2.0)](images/devices/magichome-led-controller.jpg)|![Huacanxing H801](images/devices/huacanxing-h801.jpg)|![Itead BN-SZ01](images/devices/itead-bn-sz01.jpg)|
|**MagicHome LED Controller (1.0 and 2.0)**|**Huacanxing H801**|**Itead BN-SZ01**|
|![IteadStudio Sonoff SV](images/devices/itead-sonoff-sv.jpg)|![IteadStudio 1CH Inching](images/devices/itead-1ch-inching.jpg)|![IteadStudio Motor Clockwise/Anticlockwise](images/devices/itead-motor.jpg)|
|**IteadStudio Sonoff SV**|**IteadStudio 1CH Inching**|**IteadStudio Motor Clockwise/Anticlockwise**|
|![Wemos D1 Mini Relay Shield](images/devices/wemos-d1-mini-relayshield.jpg)|![Jan Goedeke Wifi Relay (NO/NC)](images/devices/jangoe-wifi-relay.png)|![Jorge García Wifi + Relays Board Kit](images/devices/jorgegarcia-wifi-relays.jpg)|


+ 1
- 1
code/espurna/config/general.h View File

@ -246,7 +246,7 @@ PROGMEM const char* const custom_reset_string[] = {
// All defined LEDs in the board can be managed through MQTT
// except the first one when LED_AUTO is set to 1.
// If LED_AUTO is set to 1 the board will a defined LED to show wifi status.
// If LED_AUTO is set to 1 the board will use a defined LED to show wifi status.
#define LED_AUTO 1
// LED # to use as WIFI status indicator


+ 34
- 0
code/espurna/config/hardware.h View File

@ -602,6 +602,40 @@
#define LED1_PIN 13
#define LED1_PIN_INVERSE 1
// -----------------------------------------------------------------------------
// YJZK
// -----------------------------------------------------------------------------
#elif defined(YJZK_SWITCH_2CH)
// Info
#define MANUFACTURER "YJZK"
#define DEVICE "SWITCH_2CH"
// Buttons
#define BUTTON1_PIN 0
#define BUTTON2_PIN 9
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
#define BUTTON2_RELAY 2
// Relays
#define RELAY1_PIN 12
#define RELAY2_PIN 5
#define RELAY1_TYPE RELAY_TYPE_NORMAL
#define RELAY2_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 13
#define LED1_PIN_INVERSE 0
#define LED_WIFI 0
// -----------------------------------------------------------------------------
// Electrodragon boards
// -----------------------------------------------------------------------------


+ 15
- 0
code/espurna/hardware.ino View File

@ -566,6 +566,21 @@ void hwUpwardsCompatibility() {
setSetting("myDCKIGPIO", 15);
setSetting("relays", 1);
#elif defined(YJZK_SWITCH_2CH)
setSetting("board", 47);
setSetting("ledGPIO", 1, 13);
setSetting("ledLogic", 1, 0);
setSetting("ledWifi", 0);
setSetting("btnGPIO", 1, 0);
setSetting("btnGPIO", 2, 9);
setSetting("btnRelay", 1, 1);
setSetting("btnRelay", 2, 2);
setSetting("relayGPIO", 1, 12);
setSetting("relayGPIO", 2, 5);
setSetting("relayType", 1, RELAY_TYPE_NORMAL);
setSetting("relayType", 2, RELAY_TYPE_NORMAL);
#else
#error "UNSUPPORTED HARDWARE!"


+ 23
- 0
code/platformio.ini View File

@ -1093,6 +1093,29 @@ upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200
[env:yjzk-switch-2ch]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DYJZK_SWITCH_2CH
monitor_baud = 115200
[env:yjzk-switch-2ch-ota]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DYJZK_SWITCH_2CH
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
monitor_baud = 115200
# ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------


Loading…
Cancel
Save