Browse Source

Untested support for WiOn 50055 Wifi Wall Outlet & Tap

fastled
Xose Pérez 7 years ago
parent
commit
2511b520b8
5 changed files with 60 additions and 1 deletions
  1. +1
    -0
      code/build.sh
  2. +1
    -1
      code/esp8266.flash.1m0.ld
  3. +27
    -0
      code/espurna/config/hardware.h
  4. +10
    -0
      code/espurna/hardware.ino
  5. +21
    -0
      code/platformio.ini

+ 1
- 0
code/build.sh View File

@ -18,6 +18,7 @@ ALL_ENVIRONMENTS="
aithinker-ai-light
magichome-led-controller
huacanxing-h801
wion-50055
"
if [ $# -eq 0 ]; then
environments=$ALL_ENVIRONMENTS


+ 1
- 1
code/esp8266.flash.1m0.ld View File

@ -1,5 +1,5 @@
/* Flash Split for 1M chips */
/* sketch 1004KB */
/* sketch 999KB */
/* eeprom 20KB */
MEMORY


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

@ -758,6 +758,33 @@
#define LED1_PIN 16
#define LED1_PIN_INVERSE 0
// -----------------------------------------------------------------------------
// WiOn 50055 Indoor Wi-Fi Wall Outlet & Tap
// https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338044841&mpre=http%3A%2F%2Fwww.ebay.com%2Fitm%2FWiOn-50050-Indoor-Wi-Fi-Outlet-Wireless-Switch-Programmable-Timer-%2F263112281551
// https://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_id=114&ipn=icep&toolid=20004&campid=5338044841&mpre=http%3A%2F%2Fwww.ebay.com%2Fitm%2FWiOn-50055-Indoor-Wi-Fi-Wall-Tap-Monitor-Energy-Usage-Wireless-Smart-Switch-%2F263020837777
// -----------------------------------------------------------------------------
#elif defined(WION_50055)
// Currently untested, does not support energy monitoring
// Info
#define MANUFACTURER "WION"
#define DEVICE "50055"
// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_RELAY 1
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
// Relays
#define RELAY1_PIN 15
#define RELAY1_PIN_INVERSE 0
// LEDs
#define LED1_PIN 2
#define LED1_PIN_INVERSE 0
// -----------------------------------------------------------------------------
// Unknown hardware
// -----------------------------------------------------------------------------


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

@ -400,6 +400,16 @@ void hwUpwardsCompatibility() {
setSetting("relayGPIO", 1, 12);
setSetting("relayLogic", 1, 0);
#elif defined(WION_50055)
setSetting("board", 34);
setSetting("ledGPIO", 1, 2);
setSetting("ledLogic", 1, 0);
setSetting("btnGPIO", 1, 13);
setSetting("btnRelay", 1,1);
setSetting("relayGPIO", 1, 15);
setSetting("relayLogic", 1, 0);
#else
#error "UNSUPPORTED HARDWARE!"


+ 21
- 0
code/platformio.ini View File

@ -651,3 +651,24 @@ build_flags = ${common.build_flags_1m} -DITEAD_BN_SZ01
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266
[env:wion-50055]
platform = espressif8266
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} -DWION_50055
[env:wion-50055-ota]
platform = espressif8266
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} -DWION_50055
upload_speed = 115200
upload_port = "192.168.4.1"
upload_flags = --auth=fibonacci --port 8266

Loading…
Cancel
Save