From 2fdc91f1b4b671b8d1af45354073e3fed1b66a02 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 6 Sep 2018 18:08:10 +0200 Subject: [PATCH] Housekeeping --- sonoff/support.ino | 19 ++++++++++++++++++- sonoff/user_config.h | 2 +- tools/decode-status.py | 8 +++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/sonoff/support.ino b/sonoff/support.ino index 51b59c554..57cb6d9f4 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -609,6 +609,10 @@ boolean GetUsedInModule(byte val, uint8_t *arr) if (GPIO_PZEM_TX == val) { return true; } if (GPIO_PZEM_RX == val) { return true; } #endif +#ifndef USE_PZEM2 + if (GPIO_PZEM2_TX == val) { return true; } + if (GPIO_PZEM2_RX == val) { return true; } +#endif #ifndef USE_SENSEAIR if (GPIO_SAIR_TX == val) { return true; } if (GPIO_SAIR_RX == val) { return true; } @@ -965,7 +969,7 @@ void GetFeatures() feature_sns1 |= 0x00000004; // xdrv_03_energy.ino #endif #ifdef USE_PZEM004T - feature_sns1 |= 0x00000008; // xdrv_03_energy.ino + feature_sns1 |= 0x00000008; // xnrg_03_pzem004t.ino #endif #ifdef USE_DS18B20 feature_sns1 |= 0x00000010; // xsns_05_ds18b20.ino @@ -1074,6 +1078,19 @@ void GetFeatures() #ifdef USE_MCP230xx_DISPLAYOUTPUT feature_sns2 |= 0x00000020; // xsns_29_mcp230xx.ino #endif +#ifdef USE_HLW8012 + feature_sns2 |= 0x00000040; // xnrg_01_hlw8012.ino +#endif +#ifdef USE_CSE7766 + feature_sns2 |= 0x00000080; // xnrg_02_cse7766.ino +#endif +#ifdef USE_MCP39F501 + feature_sns2 |= 0x00000100; // xnrg_04_mcp39f501.ino +#endif +#ifdef USE_PZEM2 + feature_sns2 |= 0x00000200; // xnrg_05_pzem2.ino +#endif + } /*********************************************************************************************\ diff --git a/sonoff/user_config.h b/sonoff/user_config.h index b742196a8..81928f1e7 100644 --- a/sonoff/user_config.h +++ b/sonoff/user_config.h @@ -343,7 +343,7 @@ // Power monitoring sensors ----------------------- #define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) -#define USE_PZEM2 // Add support for PZEM003,014,016,017 Energy monitor (+2k code) +#define USE_PZEM2 // Add support for PZEM003,014,016,017 Energy monitor (+1k1 code) // -- Low level interface devices ----------------- #define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram) diff --git a/tools/decode-status.py b/tools/decode-status.py index 7f06b674b..b26be9df0 100644 --- a/tools/decode-status.py +++ b/tools/decode-status.py @@ -83,7 +83,9 @@ a_setoption = [[ "Do not show Wifi and Mqtt state using Led" ],[ "Timers enabled", - "","","", + "Generic ESP8285 GPIO enabled", + "Add UTC time offset to JSON message", + "", "","","","", "","","","", "","","","", @@ -122,8 +124,8 @@ a_features = [[ "USE_SDM630","USE_LM75AD","USE_APDS9960","USE_TM1638" ],[ "USE_MCP230xx","USE_MPR121","USE_CCS811","USE_MPU6050", - "USE_MCP230xx_OUTPUT","USE_MCP230xx_DISPLAYOUTPUT","","", - "","","","", + "USE_MCP230xx_OUTPUT","USE_MCP230xx_DISPLAYOUTPUT","USE_HLW8012","USE_CSE7766", + "USE_MCP39F501","USE_PZEM2","","", "","","","", "","","","", "","","","",