diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index ba41d1f6d..2600039cf 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,9 @@ /*********************************************************************************************\ + * 6.6.0.19 20191018 + * Replace obsolete xsns_23_sdm120 with xnrg_08_sdm120 and consolidate define USE_SDM120 + * Replace obsolete xsns_25_sdm630 with xnrg_10_sdm630 and consolidate define USE_SDM630 + * Replace obsolete xsns_49_solaxX1 with xnrg_12_solaxX1 (#6677) + * * 6.6.0.18 20191010 * Add command DimmerRange in Light module to support 2 byte dimming ranges from Tuya * Add Zigbee additional commands and sending messages to control devices (#6095) diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index 6df2203bc..ad25e3b3a 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -449,9 +449,9 @@ #define USE_PZEM_AC // Add support for PZEM014,016 Energy monitor (+1k1 code) #define USE_PZEM_DC // Add support for PZEM003,017 Energy monitor (+1k1 code) #define USE_MCP39F501 // Add support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code) -//#define USE_SDM120_2 // Add support for Eastron SDM120-Modbus energy monitor (+1k1 code) +//#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy monitor (+1k1 code) #define SDM120_SPEED 2400 // SDM120-Modbus RS485 serial speed (default: 2400 baud) -//#define USE_SDM630_2 // Add support for Eastron SDM630-Modbus energy monitor (+0k6 code) +//#define USE_SDM630 // Add support for Eastron SDM630-Modbus energy monitor (+0k6 code) #define SDM630_SPEED 9600 // SDM630-Modbus RS485 serial speed (default: 9600 baud) //#define USE_DDS2382 // Add support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #define DDS2382_SPEED 9600 // Hiking DDS2382 Modbus RS485 serial speed (default: 9600 baud) @@ -461,12 +461,6 @@ #define SOLAXX1_SPEED 9600 // Solax X1 Modbus RS485 serial speed (default: 9600 baud) #define SOLAXX1_PV2 // Solax X1 using second PV -//#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy meter (+2k4 code) -// #define SDM120_SPEED 2400 // SDM120-Modbus RS485 serial speed (default: 2400 baud) - #define USE_SDM220 // Add extra parameters for SDM220 (+0k1 code) -//#define USE_SDM630 // Add support for Eastron SDM630-Modbus energy meter (+2k code) -// #define SDM630_SPEED 9600 // SDM630-Modbus RS485 serial speed (default: 9600 baud) - // -- Low level interface devices ----------------- #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor (1k6 code) diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index 7e9df3143..1446d8946 100644 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -185,16 +185,15 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c #define USE_PZEM_AC // Add support for PZEM014,016 Energy monitor (+1k1 code) #define USE_PZEM_DC // Add support for PZEM003,017 Energy monitor (+1k1 code) #define USE_MCP39F501 // Add support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code) -#define USE_SDM120_2 // Add support for Eastron SDM120-Modbus energy monitor (+1k1 code) -#define USE_SDM630_2 // Add support for Eastron SDM630-Modbus energy monitor (+0k6 code) +#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy monitor (+1k1 code) +#define USE_SDM630 // Add support for Eastron SDM630-Modbus energy monitor (+0k6 code) #define USE_DDS2382 // Add support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #define USE_DDSU666 // Add support for Chint DDSU666 Modbus energy monitor (+0k6 code) //#define USE_SOLAX_X1 // Add support for Solax X1 series Modbus log info (+3k1 code) -//#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy meter (+1k7 code) -//#define USE_SDM630 // Add support for Eastron SDM630-Modbus energy meter (+2k code) #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #define USE_MAX31855 // Add support for MAX31855 K-Type thermocouple sensor using softSPI +//#define USE_MAX31865 // Add support for MAX31865 RTD sensors using softSPI #define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram) #define USE_IR_HVAC // Support for HVAC system using IR (+2k code) #define USE_IR_RECEIVE // Support for IR receiver (+5k5 code, 264 iram) @@ -290,16 +289,15 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c #undef USE_PZEM_AC // Disable PZEM014,016 Energy monitor #undef USE_PZEM_DC // Disable PZEM003,017 Energy monitor #undef USE_MCP39F501 // Disable support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code) -#undef USE_SDM120_2 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630_2 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) +#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter +#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy meter #define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI +#undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI #undef USE_IR_REMOTE // Disable IR remote commands using library IRremoteESP8266 and ArduinoJson #undef USE_IR_RECEIVE // Disable support for IR receiver @@ -372,13 +370,11 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c #undef USE_PZEM_AC // Disable PZEM014,016 Energy monitor #undef USE_PZEM_DC // Disable PZEM003,017 Energy monitor #undef USE_MCP39F501 // Disable MCP39F501 Energy monitor as used in Shelly 2 - #undef USE_SDM120_2 // Disable support for Eastron SDM120-Modbus energy meter - #undef USE_SDM630_2 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) + #undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter + #undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy meter #define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram) #define USE_DISPLAY // Add I2C Display Support (+2k code) @@ -453,13 +449,11 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c #undef USE_PZEM_AC // Disable PZEM014,016 Energy monitor #undef USE_PZEM_DC // Disable PZEM003,017 Energy monitor #undef USE_MCP39F501 // Disable MCP39F501 Energy monitor as used in Shelly 2 - #undef USE_SDM120_2 // Disable support for Eastron SDM120-Modbus energy meter - #undef USE_SDM630_2 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) + #undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter + #undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy meter #undef USE_DS18x20 // Disable support for DS18x20 sensors with id sort, single scan and read retry (+1k3 code) @@ -479,6 +473,7 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c //#define USE_DHT // Add support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI +#undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI #undef USE_SR04 // Disable support for for HC-SR04 ultrasonic devices #undef USE_TM1638 // Disable support for TM1638 switches copying Switch1 .. Switch8 #undef USE_HX711 // Disable support for HX711 load cell @@ -568,16 +563,15 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c #undef USE_PZEM_AC // Disable PZEM014,016 Energy monitor #undef USE_PZEM_DC // Disable PZEM003,017 Energy monitor //#undef USE_MCP39F501 // Disable MCP39F501 Energy monitor as used in Shelly 2 -#undef USE_SDM120_2 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630_2 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) +#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter +#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy meter #undef USE_DHT // Disable support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI +#undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI #undef USE_IR_REMOTE // Disable IR driver #undef USE_ZIGBEE // Disable serial communication with Zigbee CC2530 flashed with ZNP @@ -670,16 +664,15 @@ char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, c #undef USE_PZEM_AC // Disable PZEM014,016 Energy monitor #undef USE_PZEM_DC // Disable PZEM003,017 Energy monitor #undef USE_MCP39F501 // Disable MCP39F501 Energy monitor as used in Shelly 2 -#undef USE_SDM120_2 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630_2 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) +#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter +#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy monitor (+0k6 code) #undef USE_DDS2382 // Disable support for Hiking DDS2382 Modbus energy monitor (+0k6 code) #undef USE_DDSU666 // Disable support for Chint DDSU666 Modbus energy monitor (+0k6 code) #undef USE_SOLAX_X1 // Disable support for Solax X1 series Modbus log info (+3k1 code) -#undef USE_SDM120 // Disable support for Eastron SDM120-Modbus energy meter -#undef USE_SDM630 // Disable support for Eastron SDM630-Modbus energy meter #undef USE_DHT // Disable support for DHT11, AM2301 (DHT21, DHT22, AM2302, AM2321) and SI7021 Temperature and Humidity sensor #undef USE_MAX31855 // Disable MAX31855 K-Type thermocouple sensor using softSPI +#undef USE_MAX31865 // Disable support for MAX31865 RTD sensors using softSPI #undef USE_IR_REMOTE // Disable IR driver #undef USE_SR04 // Disable support for for HC-SR04 ultrasonic devices #undef USE_TM1638 // Disable support for TM1638 switches copying Switch1 .. Switch8 diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 925b053ee..2a3ddcaca 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -634,11 +634,11 @@ const uint8_t kGpioNiceList[] PROGMEM = { #ifdef USE_PZEM_DC GPIO_PZEM017_RX, // PZEM-003,017 Serial Modbus interface #endif -#ifdef USE_SDM120_2 +#ifdef USE_SDM120 GPIO_SDM120_TX, // SDM120 Serial interface GPIO_SDM120_RX, // SDM120 Serial interface #endif -#ifdef USE_SDM630_2 +#ifdef USE_SDM630 GPIO_SDM630_TX, // SDM630 Serial interface GPIO_SDM630_RX, // SDM630 Serial interface #endif @@ -655,18 +655,6 @@ const uint8_t kGpioNiceList[] PROGMEM = { GPIO_SOLAXX1_RX, // Solax Inverter rx pin #endif // USE_SOLAX_X1 #endif // USE_ENERGY_SENSOR -#ifndef USE_SDM120_2 -#ifdef USE_SDM120 - GPIO_SDM120_TX, // SDM120 Serial interface - GPIO_SDM120_RX, // SDM120 Serial interface -#endif -#endif // USE_SDM120_2 -#ifndef USE_SDM630_2 -#ifdef USE_SDM630 - GPIO_SDM630_TX, // SDM630 Serial interface - GPIO_SDM630_RX, // SDM630 Serial interface -#endif -#endif // USE_SDM630_2 #ifdef USE_SERIAL_BRIDGE GPIO_SBR_TX, // Serial Bridge Serial interface diff --git a/sonoff/support_features.ino b/sonoff/support_features.ino index 9ba69feee..6ee9afe21 100644 --- a/sonoff/support_features.ino +++ b/sonoff/support_features.ino @@ -306,13 +306,13 @@ void GetFeatures(void) feature_sns1 |= 0x02000000; // xsns_22_sr04.ino #endif #ifdef USE_SDM120 - feature_sns1 |= 0x04000000; // xsns_23_sdm120.ino + feature_sns1 |= 0x04000000; // xnrg_08_sdm120.ino #endif #ifdef USE_SI1145 feature_sns1 |= 0x08000000; // xsns_24_si1145.ino #endif #ifdef USE_SDM630 - feature_sns1 |= 0x10000000; // xsns_25_sdm630.ino + feature_sns1 |= 0x10000000; // xnrg_10_sdm630.ino #endif #ifdef USE_LM75AD feature_sns1 |= 0x20000000; // xsns_26_lm75ad.ino @@ -419,7 +419,7 @@ void GetFeatures(void) feature_sns2 |= 0x20000000; // xsns_48_chirp.ino #endif #ifdef USE_SOLAX_X1 - feature_sns2 |= 0x40000000; // xsns_49_solaxX1.ino + feature_sns2 |= 0x40000000; // xnrg_12_solaxX1.ino #endif #ifdef USE_PAJ7620 feature_sns2 |= 0x80000000; // xsns_50_paj7620.ino diff --git a/sonoff/xnrg_08_sdm120.ino b/sonoff/xnrg_08_sdm120.ino index 8b771ba80..c60dd16a7 100644 --- a/sonoff/xnrg_08_sdm120.ino +++ b/sonoff/xnrg_08_sdm120.ino @@ -18,7 +18,7 @@ */ #ifdef USE_ENERGY_SENSOR -#ifdef USE_SDM120_2 +#ifdef USE_SDM120 /*********************************************************************************************\ * Eastron SDM120 or SDM220 Modbus energy meter * @@ -265,5 +265,5 @@ bool Xnrg08(uint8_t function) return result; } -#endif // USE_SDM120_2 +#endif // USE_SDM120 #endif // USE_ENERGY_SENSOR diff --git a/sonoff/xnrg_10_sdm630.ino b/sonoff/xnrg_10_sdm630.ino index 4c048b062..8bf1827f8 100644 --- a/sonoff/xnrg_10_sdm630.ino +++ b/sonoff/xnrg_10_sdm630.ino @@ -18,7 +18,7 @@ */ #ifdef USE_ENERGY_SENSOR -#ifdef USE_SDM630_2 +#ifdef USE_SDM630 /*********************************************************************************************\ * Eastron SDM630-Modbus energy meter * @@ -213,5 +213,5 @@ bool Xnrg10(uint8_t function) return result; } -#endif // USE_SDM630_2 +#endif // USE_SDM630 #endif // USE_ENERGY_SENSOR