* 'dev' of https://github.com/proddy/EMS-ESP-Boiler:
  heatpump minor changes
This commit is contained in:
Susis Strolch
2019-05-27 10:53:07 +02:00
4 changed files with 40 additions and 76 deletions

View File

@@ -1,46 +0,0 @@
;
; PlatformIO Project Configuration File for EMS-ESP
; Uses PlatformIO 4.0 (pio upgrade --dev)
;
[platformio]
;env_default = release
env_default = debug
[common]
; hard code if you prefer. Recommendation is to set from within the app when in Serial or AP mode
; wifi_settings = '-DWIFI_SSID="XXXX"' '-DWIFI_PASSWORD="XXXX"'
wifi_settings =
[env]
board = d1_mini
; board = nodemcuv2
; board = d1_mini_pro
framework = arduino
platform = espressif8266
lib_deps =
CRC32
CircularBuffer
JustWifi
AsyncMqttClient
ArduinoJson
OneWire
EEPROM_rotate
upload_speed = 921600
monitor_speed = 115200
upload_protocol = espota
upload_port = ems-esp.local
[env:debug]
build_flags = -g -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -DCRASH -DTESTS ${common.wifi_settings}
[env:clean]
extra_scripts = pre:scripts/clean_fw.py
[env:release]
build_flags = -g -w
extra_scripts = pre:scripts/rename_fw.py
[env:checkcode]
build_flags = -g -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -DCRASH -DTESTS
extra_scripts = scripts/checkcode.py

View File

@@ -1,19 +1,23 @@
;
; PlatformIO Project Configuration File for EMS-ESP
; Uses PlatformIO 4.0 (pio upgrade --dev)
;
[platformio] [platformio]
; add here your board, e.g. nodemcuv2, d1_mini, d1_mini_pro env_default = release
env_default = d1_mini ;env_default = debug
[common] [common]
flash_mode = dout
build_flags = -g -w
; for debug use these...
; build_flags = -g -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -DCRASH -DTESTS
wifi_settings =
; hard code if you prefer. Recommendation is to set from within the app when in Serial or AP mode ; hard code if you prefer. Recommendation is to set from within the app when in Serial or AP mode
; wifi_settings = '-DWIFI_SSID="XXXX"' '-DWIFI_PASSWORD="XXXX"' ; wifi_settings = '-DWIFI_SSID="XXXX"' '-DWIFI_PASSWORD="XXXX"'
wifi_settings =
[env]
board = d1_mini
; board = nodemcuv2
; board = d1_mini_pro
framework = arduino
platform = espressif8266
lib_deps = lib_deps =
CRC32 CRC32
CircularBuffer CircularBuffer
@@ -22,17 +26,21 @@ lib_deps =
ArduinoJson ArduinoJson
OneWire OneWire
EEPROM_rotate EEPROM_rotate
[env:d1_mini]
board = d1_mini
platform = espressif8266
framework = arduino
lib_deps = ${common.lib_deps}
build_flags = ${common.build_flags} ${common.wifi_settings}
board_build.flash_mode = ${common.flash_mode}
upload_speed = 921600 upload_speed = 921600
monitor_speed = 115200 monitor_speed = 115200
; for OTA comment out these sections upload_protocol = espota
;upload_protocol = espota upload_port = ems-esp.local
;upload_port = ems-esp.local
;upload_port = <or add here the IP of the ESP8266> [env:debug]
build_flags = -g -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -DCRASH -DTESTS ${common.wifi_settings}
[env:clean]
extra_scripts = pre:scripts/clean_fw.py
[env:release]
build_flags = -g -w
extra_scripts = pre:scripts/rename_fw.py
[env:checkcode]
build_flags = -g -Wall -Wextra -Werror -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-variable -DCRASH -DTESTS
extra_scripts = scripts/checkcode.py

View File

@@ -828,6 +828,8 @@ void _printMessage(_EMS_RxTelegram * EMS_RxTelegram) {
strlcpy(output_str, "Thermostat", sizeof(output_str)); strlcpy(output_str, "Thermostat", sizeof(output_str));
} else if (src == EMS_ID_SM) { } else if (src == EMS_ID_SM) {
strlcpy(output_str, "SM", sizeof(output_str)); strlcpy(output_str, "SM", sizeof(output_str));
} else if (src == EMS_ID_HP) {
strlcpy(output_str, "HP", sizeof(output_str));
} else if (src == EMS_ID_GATEWAY) { } else if (src == EMS_ID_GATEWAY) {
strlcpy(output_str, "Gateway", sizeof(output_str)); strlcpy(output_str, "Gateway", sizeof(output_str));
} else { } else {
@@ -850,6 +852,9 @@ void _printMessage(_EMS_RxTelegram * EMS_RxTelegram) {
} else if (dest == EMS_ID_SM) { } else if (dest == EMS_ID_SM) {
strlcat(output_str, "SM", sizeof(output_str)); strlcat(output_str, "SM", sizeof(output_str));
strlcpy(color_s, COLOR_MAGENTA, sizeof(color_s)); strlcpy(color_s, COLOR_MAGENTA, sizeof(color_s));
} else if (dest == EMS_ID_HP) {
strlcat(output_str, "HP", sizeof(output_str));
strlcpy(color_s, COLOR_MAGENTA, sizeof(color_s));
} else if (dest == EMS_ID_GATEWAY) { } else if (dest == EMS_ID_GATEWAY) {
strlcat(output_str, "Gateway", sizeof(output_str)); strlcat(output_str, "Gateway", sizeof(output_str));
strlcpy(color_s, COLOR_MAGENTA, sizeof(color_s)); strlcpy(color_s, COLOR_MAGENTA, sizeof(color_s));
@@ -914,13 +919,6 @@ void _ems_processTelegram(_EMS_RxTelegram * EMS_RxTelegram) {
typeFound = true; typeFound = true;
break; break;
} }
/*
if ((EMS_Types[i].model_id == EMS_MODEL_ALL) || ((src == EMS_Boiler.device_id) || (src == EMS_Thermostat.device_id) || (src == EMS_ID_SM))) {
typeFound = true;
break;
}
*/
} }
i++; i++;
} }
@@ -1687,6 +1685,9 @@ void ems_discoverModels() {
// solar module // solar module
ems_doReadCommand(EMS_TYPE_Version, EMS_ID_SM); // check if there is Solar Module available ems_doReadCommand(EMS_TYPE_Version, EMS_ID_SM); // check if there is Solar Module available
// heatpump module
ems_doReadCommand(EMS_TYPE_Version, EMS_ID_HP); // check if there is HeatPump Module available
// thermostat // thermostat
// if it hasn't been set, auto discover it // if it hasn't been set, auto discover it
if (EMS_Thermostat.device_id == EMS_ID_NONE) { if (EMS_Thermostat.device_id == EMS_ID_NONE) {
@@ -1799,7 +1800,7 @@ void ems_getBoilerValues() {
*/ */
void ems_getOtherValues() { void ems_getOtherValues() {
if (EMS_Other.SM) { if (EMS_Other.SM) {
ems_doReadCommand(EMS_TYPE_SM10Monitor, EMS_ID_SM); // fetch all from SM10Monitor, e.g. 0B B0 97 00 16 ems_doReadCommand(EMS_TYPE_SM10Monitor, EMS_ID_SM); // fetch all from SM10Monitor
} }
} }

View File

@@ -178,6 +178,7 @@ const _Other_Type Other_Types[] = {
{EMS_MODEL_OTHER, 73, EMS_ID_SM, "SM10 Solar Module"}, {EMS_MODEL_OTHER, 73, EMS_ID_SM, "SM10 Solar Module"},
{EMS_MODEL_OTHER, 163, EMS_ID_SM, "SM100 Solar Module"}, {EMS_MODEL_OTHER, 163, EMS_ID_SM, "SM100 Solar Module"},
{EMS_MODEL_OTHER, 171, 0x02, "EMS-OT OpenTherm converter"}, {EMS_MODEL_OTHER, 171, 0x02, "EMS-OT OpenTherm converter"},
{EMS_MODEL_OTHER, 252, EMS_ID_HP, "HeatPump Module"}, // warning, fake product id!
{EMS_MODEL_OTHER, 189, EMS_ID_GATEWAY, "Web Gateway KM200"} {EMS_MODEL_OTHER, 189, EMS_ID_GATEWAY, "Web Gateway KM200"}
}; };