Browse Source

ESPurna base image for Tuya Convert

pull/1909/merge
Xose Pérez 4 years ago
parent
commit
8b7eea6c72
22 changed files with 19075 additions and 19018 deletions
  1. +13
    -1
      code/espurna/button.ino
  2. +1
    -0
      code/espurna/config/arduino.h
  3. +35
    -1
      code/espurna/config/hardware.h
  4. BIN
      code/espurna/data/index.all.html.gz
  5. BIN
      code/espurna/data/index.light.html.gz
  6. BIN
      code/espurna/data/index.lightfox.html.gz
  7. BIN
      code/espurna/data/index.rfbridge.html.gz
  8. BIN
      code/espurna/data/index.rfm69.html.gz
  9. BIN
      code/espurna/data/index.sensor.html.gz
  10. BIN
      code/espurna/data/index.small.html.gz
  11. BIN
      code/espurna/data/index.thermostat.html.gz
  12. +3
    -1
      code/espurna/led.ino
  13. +2466
    -2466
      code/espurna/static/index.all.html.gz.h
  14. +2295
    -2295
      code/espurna/static/index.light.html.gz.h
  15. +2345
    -2345
      code/espurna/static/index.lightfox.html.gz.h
  16. +1924
    -1924
      code/espurna/static/index.rfbridge.html.gz.h
  17. +3277
    -3277
      code/espurna/static/index.rfm69.html.gz.h
  18. +1980
    -1980
      code/espurna/static/index.sensor.html.gz.h
  19. +2345
    -2345
      code/espurna/static/index.small.html.gz.h
  20. +2382
    -2382
      code/espurna/static/index.thermostat.html.gz.h
  21. +1
    -1
      code/html/index.html
  22. +8
    -0
      code/platformio.ini

+ 13
- 1
code/espurna/button.ino View File

@ -38,6 +38,16 @@ void buttonMQTT(unsigned char id, uint8_t event) {
#if WEB_SUPPORT
unsigned char _buttonCount() {
return _buttons.size();
}
void _buttonWebSocketOnVisible(JsonObject& root) {
if (_buttonCount() > 0) {
root["btnVisible"] = 1;
}
}
bool _buttonWebSocketOnKeyCheck(const char * key, JsonVariant& value) {
return (strncmp(key, "btn", 3) == 0);
}
@ -245,7 +255,9 @@ void buttonSetup() {
// Websocket Callbacks
#if WEB_SUPPORT
wsRegister().onKeyCheck(_buttonWebSocketOnKeyCheck);
wsRegister()
.onVisible(_buttonWebSocketOnVisible)
.onKeyCheck(_buttonWebSocketOnKeyCheck);
#endif
// Register loop


+ 1
- 0
code/espurna/config/arduino.h View File

@ -27,6 +27,7 @@
//#define BLITZWOLF_BWSHPX_V23
//#define DIGOO_NX_SP202
//#define ELECTRODRAGON_WIFI_IOT
//#define ESPURNA_BASE
//#define ESPURNA_CORE
//#define EUROMATE_WIFI_STECKER_SCHUKO
//#define EUROMATE_WIFI_STECKER_SCHUKO_V2


+ 35
- 1
code/espurna/config/hardware.h View File

@ -39,7 +39,7 @@
// https://github.com/xoseperez/espurna/wiki/TwoStepUpdates
// Info
#define MANUFACTURER "ESPRESSIF"
#define MANUFACTURER "ESPURNA"
#define DEVICE "ESPURNA_CORE"
// Disable non-core modules
@ -66,6 +66,39 @@
//#define TELNET_SUPPORT 0
//#define TERMINAL_SUPPORT 0
#elif defined(ESPURNA_BASE)
// This is a special device with no specific hardware
// with the basics to easily upgrade it to a device-specific image
// Info
#define MANUFACTURER "ESPURNA"
#define DEVICE "ESPURNA_BASE"
// Disable non-core modules
#define ALEXA_SUPPORT 0
#define API_SUPPORT 0
#define BROKER_SUPPORT 0
#define DOMOTICZ_SUPPORT 0
#define DEBUG_SERIAL_SUPPORT 0
//#define DEBUG_TELNET_SUPPORT 0
//#define DEBUG_WEB_SUPPORT 0
#define HOMEASSISTANT_SUPPORT 0
#define I2C_SUPPORT 0
#define MQTT_SUPPORT 0
#define NTP_SUPPORT 0
#define SCHEDULER_SUPPORT 0
#define SENSOR_SUPPORT 0
#define THINGSPEAK_SUPPORT 0
//#define WEB_SUPPORT 0
// Extra light-weight image
#define BUTTON_SUPPORT 0
#define LED_SUPPORT 0
//#define MDNS_SERVER_SUPPORT 0
//#define TELNET_SUPPORT 0
//#define TERMINAL_SUPPORT 0
// -----------------------------------------------------------------------------
// Development boards
// -----------------------------------------------------------------------------
@ -2831,6 +2864,7 @@
// * Coosa (https://www.amazon.com/COOSA-Monitoring-Function-Campatible-Assiatant/dp/B0788W9TDR)
// * Gosund (http://www.gosund.com/?m=content&c=index&a=show&catid=6&id=5)
// * Ablue (https://www.amazon.de/Intelligente-Steckdose-Ablue-Funktioniert-Assistant/dp/B076DRFRZC)
// * DIY Tech Smart Home (https://www.amazon.es/gp/product/B07HHKXYS9)
// -----------------------------------------------------------------------------
#elif defined(BLITZWOLF_BWSHPX)


BIN
code/espurna/data/index.all.html.gz View File


BIN
code/espurna/data/index.light.html.gz View File


BIN
code/espurna/data/index.lightfox.html.gz View File


BIN
code/espurna/data/index.rfbridge.html.gz View File


BIN
code/espurna/data/index.rfm69.html.gz View File


BIN
code/espurna/data/index.sensor.html.gz View File


BIN
code/espurna/data/index.small.html.gz View File


BIN
code/espurna/data/index.thermostat.html.gz View File


+ 3
- 1
code/espurna/led.ino View File

@ -76,7 +76,9 @@ bool _ledWebSocketOnKeyCheck(const char * key, JsonVariant& value) {
}
void _ledWebSocketOnVisible(JsonObject& root) {
root["ledVisible"] = 1;
if (_ledCount() > 0) {
root["ledVisible"] = 1;
}
}
void _ledWebSocketOnConnected(JsonObject& root) {


+ 2466
- 2466
code/espurna/static/index.all.html.gz.h
File diff suppressed because it is too large
View File


+ 2295
- 2295
code/espurna/static/index.light.html.gz.h
File diff suppressed because it is too large
View File


+ 2345
- 2345
code/espurna/static/index.lightfox.html.gz.h
File diff suppressed because it is too large
View File


+ 1924
- 1924
code/espurna/static/index.rfbridge.html.gz.h
File diff suppressed because it is too large
View File


+ 3277
- 3277
code/espurna/static/index.rfm69.html.gz.h
File diff suppressed because it is too large
View File


+ 1980
- 1980
code/espurna/static/index.sensor.html.gz.h
File diff suppressed because it is too large
View File


+ 2345
- 2345
code/espurna/static/index.small.html.gz.h
File diff suppressed because it is too large
View File


+ 2382
- 2382
code/espurna/static/index.thermostat.html.gz.h
File diff suppressed because it is too large
View File


+ 1
- 1
code/html/index.html View File

@ -369,7 +369,7 @@
</div>
</div>
<div class="pure-g">
<div class="pure-g module module-btn">
<label class="pure-u-1 pure-u-lg-1-4">Double click delay</label>
<input name="btnDelay" class="pure-u-1 pure-u-lg-1-4" type="number" action="reboot" min="0" step="100" max="1000" tabindex="6" />
<div class="pure-u-0 pure-u-lg-1-2"></div>


+ 8
- 0
code/platformio.ini View File

@ -170,6 +170,14 @@ build_flags = ${common.build_flags_2m1m} -DESPURNA_CORE -DJUSTWIFI_ENABLE_WPS=1
board = ${common.board_4m}
build_flags = ${common.build_flags_4m1m} -DESPURNA_CORE -DJUSTWIFI_ENABLE_WPS=1
# ------------------------------------------------------------------------------
# ESPURNA BASE BUILDS
# ------------------------------------------------------------------------------
[env:espurna-base-1MB]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DESPURNA_BASE
# ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------


Loading…
Cancel
Save