added @PhillyGilly SM200 PR - #267

This commit is contained in:
Paul
2020-02-26 12:14:16 +01:00
parent c8c95eeadc
commit 42d6cb1c9d
4 changed files with 40 additions and 26 deletions

View File

@@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- improved MQTT publishing to stop flooding. `publish_time` must be at least 1 (second) - improved MQTT publishing to stop flooding. `publish_time` must be at least 1 (second)
- External sensors (like dallas) are sent as a nested MQTT topic including their unqiue identifier - External sensors (like dallas) are sent as a nested MQTT topic including their unqiue identifier
- `mqttlog` console command renamed to `mqttqueue`
### Removed ### Removed
- `autodetect scan` - `autodetect scan`

View File

@@ -195,8 +195,10 @@ void ems_init() {
// Solar Module values // Solar Module values
EMS_SolarModule.collectorTemp = EMS_VALUE_SHORT_NOTSET; // collector temp from SM10/SM100/SM200 EMS_SolarModule.collectorTemp = EMS_VALUE_SHORT_NOTSET; // collector temp from SM10/SM100/SM200
EMS_SolarModule.bottomTemp = EMS_VALUE_SHORT_NOTSET; // bottom temp from SM10/SM100/SM200 EMS_SolarModule.bottomTemp = EMS_VALUE_SHORT_NOTSET; // bottom temp from SM10/SM100/SM200
EMS_SolarModule.bottomTemp2 = EMS_VALUE_SHORT_NOTSET; // bottom temp 2 from SM200
EMS_SolarModule.pumpModulation = EMS_VALUE_INT_NOTSET; // modulation solar pump SM10/SM100/SM200 EMS_SolarModule.pumpModulation = EMS_VALUE_INT_NOTSET; // modulation solar pump SM10/SM100/SM200
EMS_SolarModule.pump = EMS_VALUE_BOOL_NOTSET; // pump active EMS_SolarModule.pump = EMS_VALUE_BOOL_NOTSET; // pump active
EMS_SolarModule.valveStatus = EMS_VALUE_BOOL_NOTSET; // valve status from SM200
EMS_SolarModule.EnergyLastHour = EMS_VALUE_USHORT_NOTSET; EMS_SolarModule.EnergyLastHour = EMS_VALUE_USHORT_NOTSET;
EMS_SolarModule.EnergyToday = EMS_VALUE_USHORT_NOTSET; EMS_SolarModule.EnergyToday = EMS_VALUE_USHORT_NOTSET;
EMS_SolarModule.EnergyTotal = EMS_VALUE_USHORT_NOTSET; EMS_SolarModule.EnergyTotal = EMS_VALUE_USHORT_NOTSET;
@@ -1494,18 +1496,23 @@ void _process_SM10Monitor(_EMS_RxTelegram * EMS_RxTelegram) {
} }
/* /*
* SM100Monitor - type 0x0262 EMS+ * SM100Monitor - type 0x0262 EMS+ - for SM100 and SM200
* e.g. B0 0B FF 00 02 62 00 44 02 7A 80 00 80 00 80 00 80 00 80 00 80 00 00 7C 80 00 80 00 80 00 80
* e.g, 30 00 FF 00 02 62 01 AC * e.g, 30 00 FF 00 02 62 01 AC
* 30 00 FF 18 02 62 80 00 * 30 00 FF 18 02 62 80 00
* 30 00 FF 00 02 62 01 A1 - for bottom temps * 30 00 FF 00 02 62 01 A1 - for bottom temps
* bytes 0+1 = TS1 Temperature sensor for collector
* bytes 2+3 = TS2 Temperature sensor bottom cylinder 1
* bytes 16+17 = TS5 Temperature sensor bottom cylinder 2
*/ */
void _process_SM100Monitor(_EMS_RxTelegram * EMS_RxTelegram) { void _process_SM100Monitor(_EMS_RxTelegram * EMS_RxTelegram) {
_setValue(EMS_RxTelegram, &EMS_SolarModule.collectorTemp, 0); // is *10 _setValue(EMS_RxTelegram, &EMS_SolarModule.collectorTemp, 0); // is *10
_setValue(EMS_RxTelegram, &EMS_SolarModule.bottomTemp, 2); // is *10 _setValue(EMS_RxTelegram, &EMS_SolarModule.bottomTemp, 2); // is *10
_setValue(EMS_RxTelegram, &EMS_SolarModule.bottomTemp2, 16); // is *10
} }
/* /*
* SM100Status - type 0x0264 EMS+ for pump modulation * SM100Status - type 0x0264 EMS+ for pump modulation - for SM100 and SM200
* e.g. 30 00 FF 09 02 64 64 = 100% * e.g. 30 00 FF 09 02 64 64 = 100%
* 30 00 FF 09 02 64 1E = 30% * 30 00 FF 09 02 64 1E = 30%
*/ */
@@ -1514,10 +1521,14 @@ void _process_SM100Status(_EMS_RxTelegram * EMS_RxTelegram) {
} }
/* /*
* SM100Status2 - type 0x026A EMS+ for pump on/off at offset 0x0A * SM100Status2 - type 0x026A EMS+ for pump on/off at offset 0x0A - for SM100 and SM200
* e.g. B0 00 FF 00 02 6A 03 03 03 03 01 03 03 03 03 03 01 03
* byte 4 = VS2 3-way valve for cylinder 2 : test=01, on=04 and off=03
* byte 10 = PS1 Solar circuit pump for collector array 1: test=01, on=04 and off=03
*/ */
void _process_SM100Status2(_EMS_RxTelegram * EMS_RxTelegram) { void _process_SM100Status2(_EMS_RxTelegram * EMS_RxTelegram) {
_setValue(EMS_RxTelegram, &EMS_SolarModule.pump, 10, 2); // 03=off 04=on _setValue(EMS_RxTelegram, &EMS_SolarModule.valveStatus, 4, 2); // 03=off 04=on
_setValue(EMS_RxTelegram, &EMS_SolarModule.pump, 10, 2); // 03=off 04=on
} }
/* /*
@@ -1998,7 +2009,7 @@ void ems_getSolarModuleValues() {
if (EMS_SolarModule.device_flags == EMS_DEVICE_FLAG_SM10) { if (EMS_SolarModule.device_flags == EMS_DEVICE_FLAG_SM10) {
ems_doReadCommand(EMS_TYPE_SM10Monitor, EMS_SolarModule.device_id); // fetch all from SM10Monitor ems_doReadCommand(EMS_TYPE_SM10Monitor, EMS_SolarModule.device_id); // fetch all from SM10Monitor
} else if (EMS_SolarModule.device_flags == EMS_DEVICE_FLAG_SM100) { } else if (EMS_SolarModule.device_flags == EMS_DEVICE_FLAG_SM100) {
ems_doReadCommand(EMS_TYPE_SM100Monitor, EMS_SolarModule.device_id); // fetch all from SM100Monitor ems_doReadCommand(EMS_TYPE_SM100Monitor, EMS_SolarModule.device_id); // fetch all from SM100Monitor (also for SM200)
} }
} }
} }
@@ -2823,7 +2834,7 @@ const _EMS_Type EMS_Types[] = {
{EMS_DEVICE_UPDATE_FLAG_BOILER, EMS_TYPE_UBAMonitorFast2, "UBAMonitorFast2", _process_UBAMonitorFast2}, {EMS_DEVICE_UPDATE_FLAG_BOILER, EMS_TYPE_UBAMonitorFast2, "UBAMonitorFast2", _process_UBAMonitorFast2},
{EMS_DEVICE_UPDATE_FLAG_BOILER, EMS_TYPE_UBAMonitorSlow2, "UBAMonitorSlow2", _process_UBAMonitorSlow2}, {EMS_DEVICE_UPDATE_FLAG_BOILER, EMS_TYPE_UBAMonitorSlow2, "UBAMonitorSlow2", _process_UBAMonitorSlow2},
// Solar Module devices // Solar Module devices. Note SM100 also covers SM200
{EMS_DEVICE_UPDATE_FLAG_SOLAR, EMS_TYPE_SM10Monitor, "SM10Monitor", _process_SM10Monitor}, {EMS_DEVICE_UPDATE_FLAG_SOLAR, EMS_TYPE_SM10Monitor, "SM10Monitor", _process_SM10Monitor},
{EMS_DEVICE_UPDATE_FLAG_SOLAR, EMS_TYPE_SM100Monitor, "SM100Monitor", _process_SM100Monitor}, {EMS_DEVICE_UPDATE_FLAG_SOLAR, EMS_TYPE_SM100Monitor, "SM100Monitor", _process_SM100Monitor},
{EMS_DEVICE_UPDATE_FLAG_SOLAR, EMS_TYPE_SM100Status, "SM100Status", _process_SM100Status}, {EMS_DEVICE_UPDATE_FLAG_SOLAR, EMS_TYPE_SM100Status, "SM100Status", _process_SM100Status},

View File

@@ -46,22 +46,23 @@
#define EMS_MIXING_MAXWWC 2 // max number of warm water circuits #define EMS_MIXING_MAXWWC 2 // max number of warm water circuits
// Device Flags // Device Flags
#define EMS_DEVICE_FLAG_NONE 0 // no flags set // They are unique to the model type (mixing, solar, thermostat etc)
#define EMS_DEVICE_FLAG_SM10 10 // solar module1 enum EMS_DEVICE_FLAG_TYPES : uint8_t {
#define EMS_DEVICE_FLAG_SM100 11 // solar module2 EMS_DEVICE_FLAG_NONE = 0,
#define EMS_DEVICE_FLAG_MMPLUS 12 // mixing module EMS+ EMS_DEVICE_FLAG_MMPLUS = 20, // mixing EMS+
#define EMS_DEVICE_FLAG_MM10 13 // mixing modules MM10 and MM50 EMS_DEVICE_FLAG_MM10 = 21, // mixing MM10, MM50
EMS_DEVICE_FLAG_SM10 = 10,
// device flags specific for thermostats EMS_DEVICE_FLAG_SM100 = 11, // for SM100 and SM200
#define EMS_DEVICE_FLAG_NO_WRITE 0x80 // top bit set if write not supported EMS_DEVICE_FLAG_EASY = 1,
#define EMS_DEVICE_FLAG_EASY 1 EMS_DEVICE_FLAG_RC10 = 2,
#define EMS_DEVICE_FLAG_RC10 2 EMS_DEVICE_FLAG_RC20 = 3,
#define EMS_DEVICE_FLAG_RC20 3 EMS_DEVICE_FLAG_RC30 = 4,
#define EMS_DEVICE_FLAG_RC30 4 EMS_DEVICE_FLAG_RC30N = 5, // newer type of RC30 with RC35 circuit
#define EMS_DEVICE_FLAG_RC30N 5 // newer type of RC30 with RC35 circuit EMS_DEVICE_FLAG_RC35 = 6,
#define EMS_DEVICE_FLAG_RC35 6 EMS_DEVICE_FLAG_RC300 = 7,
#define EMS_DEVICE_FLAG_RC300 7 EMS_DEVICE_FLAG_JUNKERS = (1 << 6), // 6th bit set if its junkers HT3
#define EMS_DEVICE_FLAG_JUNKERS 8 EMS_DEVICE_FLAG_NO_WRITE = (1 << 7) // top bit set if thermostat write not supported
};
typedef enum { typedef enum {
EMS_THERMOSTAT_MODE_UNKNOWN, EMS_THERMOSTAT_MODE_UNKNOWN,
@@ -335,7 +336,6 @@ typedef struct {
// calculated values // calculated values
uint8_t tapwaterActive; // Hot tap water is on/off uint8_t tapwaterActive; // Hot tap water is on/off
uint8_t heatingActive; // Central heating is on/off uint8_t heatingActive; // Central heating is on/off
} _EMS_Boiler; } _EMS_Boiler;
/* /*
@@ -388,10 +388,12 @@ typedef struct {
const char * device_desc_p; const char * device_desc_p;
uint8_t product_id; uint8_t product_id;
char version[10]; char version[10];
int16_t collectorTemp; // collector temp int16_t collectorTemp; // collector temp (TS1)
int16_t bottomTemp; // bottom temp int16_t bottomTemp; // bottom temp (TS2)
int16_t bottomTemp2; // bottom temp cylinder 2 (TS5)
uint8_t pumpModulation; // modulation solar pump uint8_t pumpModulation; // modulation solar pump
uint8_t pump; // pump active uint8_t pump; // pump active
uint8_t valveStatus; // valve status (VS2)
int16_t setpoint_maxBottomTemp; // setpoint for maximum collector temp int16_t setpoint_maxBottomTemp; // setpoint for maximum collector temp
uint16_t EnergyLastHour; uint16_t EnergyLastHour;
uint16_t EnergyToday; uint16_t EnergyToday;

View File

@@ -1 +1 @@
#define APP_VERSION "1.9.5b43" #define APP_VERSION "1.9.5b44"