mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
@@ -11,10 +11,15 @@
|
|||||||
- enum_controlmode for RC310 (new enum list)
|
- enum_controlmode for RC310 (new enum list)
|
||||||
- nofrostmode, reducemode, reducetemp & noreducetemp for RC310
|
- nofrostmode, reducemode, reducetemp & noreducetemp for RC310
|
||||||
- emergencyops and emergencytemp, wwmaxtemp, wwflowtempoffset and wwcomfort1 for RC310
|
- emergencyops and emergencytemp, wwmaxtemp, wwflowtempoffset and wwcomfort1 for RC310
|
||||||
|
- HM200 hybrid module [#500](https://github.com/emsesp/EMS-ESP32/issues/500)
|
||||||
|
- AM200 alternative heatsource module [#573](https://github.com/emsesp/EMS-ESP32/issues/573)
|
||||||
|
- EM10 error module as gateway [#575](https://github.com/emsesp/EMS-ESP32/issues/575)
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
- fix Table resizing in WebUI [#519](https://github.com/emsesp/EMS-ESP32/issues/519)
|
- fix Table resizing in WebUI [#519](https://github.com/emsesp/EMS-ESP32/issues/519)
|
||||||
|
- allow larger customization files [#570](https://github.com/emsesp/EMS-ESP32/issues/570)
|
||||||
|
- losing entitiy wwcomfort [#581](https://github.com/emsesp/EMS-ESP32/issues/581)
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
@@ -22,5 +27,6 @@
|
|||||||
|
|
||||||
- platformio 2.3.0 (IDF 4, Arduino 2)
|
- platformio 2.3.0 (IDF 4, Arduino 2)
|
||||||
- remove master-thermostat, support multiple thermostats
|
- remove master-thermostat, support multiple thermostats
|
||||||
|
- merge up- and download in webui [#577](https://github.com/emsesp/EMS-ESP32/issues/577)
|
||||||
|
|
||||||
## **BREAKING CHANGES:**
|
## **BREAKING CHANGES:**
|
||||||
|
|||||||
3424
interface/package-lock.json
generated
3424
interface/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -4,14 +4,14 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"proxy": "http://localhost:3080",
|
"proxy": "http://localhost:3080",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.9.3",
|
"@emotion/react": "^11.10.0",
|
||||||
"@emotion/styled": "^11.9.3",
|
"@emotion/styled": "^11.10.0",
|
||||||
"@msgpack/msgpack": "^2.7.2",
|
"@msgpack/msgpack": "^2.7.2",
|
||||||
"@mui/icons-material": "^5.8.4",
|
"@mui/icons-material": "^5.8.4",
|
||||||
"@mui/material": "^5.9.2",
|
"@mui/material": "^5.9.3",
|
||||||
"@table-library/react-table-library": "4.0.10",
|
"@table-library/react-table-library": "4.0.10",
|
||||||
"@types/lodash": "^4.14.182",
|
"@types/lodash": "^4.14.182",
|
||||||
"@types/node": "^18.6.1",
|
"@types/node": "^18.6.3",
|
||||||
"@types/react": "^18.0.15",
|
"@types/react": "^18.0.15",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.6",
|
||||||
"@types/react-router-dom": "^5.3.3",
|
"@types/react-router-dom": "^5.3.3",
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ const DashboardData: FC = () => {
|
|||||||
|
|
||||||
const { enqueueSnackbar } = useSnackbar();
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
const [coreData, setCoreData] = useState<CoreData>({ devices: [], active_sensors: 0, analog_enabled: false });
|
const [coreData, setCoreData] = useState<CoreData>({ connected: true, devices: [], active_sensors: 0, analog_enabled: false });
|
||||||
const [deviceData, setDeviceData] = useState<DeviceData>({ label: '', data: [] });
|
const [deviceData, setDeviceData] = useState<DeviceData>({ label: '', data: [] });
|
||||||
const [sensorData, setSensorData] = useState<SensorData>({ sensors: [], analogs: [] });
|
const [sensorData, setSensorData] = useState<SensorData>({ sensors: [], analogs: [] });
|
||||||
const [deviceValue, setDeviceValue] = useState<DeviceValue>();
|
const [deviceValue, setDeviceValue] = useState<DeviceValue>();
|
||||||
@@ -640,7 +640,8 @@ const DashboardData: FC = () => {
|
|||||||
|
|
||||||
const renderCoreData = () => (
|
const renderCoreData = () => (
|
||||||
<IconContext.Provider value={{ color: 'lightblue', size: '24', style: { verticalAlign: 'middle' } }}>
|
<IconContext.Provider value={{ color: 'lightblue', size: '24', style: { verticalAlign: 'middle' } }}>
|
||||||
{coreData.devices.length === 0 && <MessageBox my={2} level="warning" message="Scanning for EMS devices..." />}
|
{!coreData.connected && <MessageBox my={2} level="error" message="EMSbus disconnected, check settings and board profile" />}
|
||||||
|
{coreData.connected && coreData.devices.length === 0 && <MessageBox my={2} level="warning" message="Scanning for EMS devices..." />}
|
||||||
<Table data={{ nodes: coreData.devices }} select={device_select} theme={device_theme} layout={{ custom: true }}>
|
<Table data={{ nodes: coreData.devices }} select={device_select} theme={device_theme} layout={{ custom: true }}>
|
||||||
{(tableList: any) => (
|
{(tableList: any) => (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ export interface SensorData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface CoreData {
|
export interface CoreData {
|
||||||
|
connected: boolean;
|
||||||
devices: Device[];
|
devices: Device[];
|
||||||
active_sensors: number;
|
active_sensors: number;
|
||||||
analog_enabled: boolean;
|
analog_enabled: boolean;
|
||||||
|
|||||||
@@ -112,6 +112,9 @@
|
|||||||
{191, DeviceType::THERMOSTAT, F("FR120"), DeviceFlags::EMS_DEVICE_FLAG_JUNKERS | DeviceFlags::EMS_DEVICE_FLAG_JUNKERS_OLD}, // older model
|
{191, DeviceType::THERMOSTAT, F("FR120"), DeviceFlags::EMS_DEVICE_FLAG_JUNKERS | DeviceFlags::EMS_DEVICE_FLAG_JUNKERS_OLD}, // older model
|
||||||
{192, DeviceType::THERMOSTAT, F("FW120"), DeviceFlags::EMS_DEVICE_FLAG_JUNKERS},
|
{192, DeviceType::THERMOSTAT, F("FW120"), DeviceFlags::EMS_DEVICE_FLAG_JUNKERS},
|
||||||
|
|
||||||
|
// Thermostat remote - 0x38
|
||||||
|
{200, DeviceType::THERMOSTAT, F("RC100H"), DeviceFlags::EMS_DEVICE_FLAG_RC100H},
|
||||||
|
|
||||||
// Solar Modules - 0x30 (for solar), 0x2A, 0x41 (for ww)
|
// Solar Modules - 0x30 (for solar), 0x2A, 0x41 (for ww)
|
||||||
{ 73, DeviceType::SOLAR, F("SM10"), DeviceFlags::EMS_DEVICE_FLAG_SM10},
|
{ 73, DeviceType::SOLAR, F("SM10"), DeviceFlags::EMS_DEVICE_FLAG_SM10},
|
||||||
{101, DeviceType::SOLAR, F("ISM1"), DeviceFlags::EMS_DEVICE_FLAG_ISM},
|
{101, DeviceType::SOLAR, F("ISM1"), DeviceFlags::EMS_DEVICE_FLAG_ISM},
|
||||||
@@ -129,11 +132,12 @@
|
|||||||
{161, DeviceType::MIXER, F("MM200"), DeviceFlags::EMS_DEVICE_FLAG_MMPLUS},
|
{161, DeviceType::MIXER, F("MM200"), DeviceFlags::EMS_DEVICE_FLAG_MMPLUS},
|
||||||
{204, DeviceType::MIXER, F("MP100"), DeviceFlags::EMS_DEVICE_FLAG_MP}, // pool
|
{204, DeviceType::MIXER, F("MP100"), DeviceFlags::EMS_DEVICE_FLAG_MP}, // pool
|
||||||
|
|
||||||
// Heat Pumps - 0x38
|
// Heat Pumps - 0x38?
|
||||||
{200, DeviceType::HEATPUMP, F("HP Module"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
|
||||||
{248, DeviceType::HEATPUMP, F("Hybrid Manager HM200"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
|
||||||
{252, DeviceType::HEATPUMP, F("HP Module"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{252, DeviceType::HEATPUMP, F("HP Module"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
|
|
||||||
|
// Heat Pumps - 0x53
|
||||||
|
{248, DeviceType::HEATPUMP, F("Hybrid Manager HM200"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
|
|
||||||
// Connect devices - 0x02
|
// Connect devices - 0x02
|
||||||
{171, DeviceType::CONNECT, F("OpenTherm Converter"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{171, DeviceType::CONNECT, F("OpenTherm Converter"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
{205, DeviceType::CONNECT, F("Moduline Easy Connect"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
{205, DeviceType::CONNECT, F("Moduline Easy Connect"), DeviceFlags::EMS_DEVICE_FLAG_NONE},
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
if (device_id == EMSdevice::EMS_DEVICE_ID_AM200) {
|
if (device_id == EMSdevice::EMS_DEVICE_ID_AM200) {
|
||||||
register_telegram_type(0x54D, F("AmTemperatures"), false, MAKE_PF_CB(process_amTempMessage));
|
register_telegram_type(0x54D, F("AmTemperatures"), false, MAKE_PF_CB(process_amTempMessage));
|
||||||
register_telegram_type(0x54E, F("AmStatus"), false, MAKE_PF_CB(process_amStatusMessage));
|
register_telegram_type(0x54E, F("AmStatus"), false, MAKE_PF_CB(process_amStatusMessage));
|
||||||
register_telegram_type(0x550, F("AmSettings"), false, MAKE_PF_CB(process_amSettingMessage));
|
register_telegram_type(0x54F, F("AmCommand"), false, MAKE_PF_CB(process_amCommandMessage)); // not broadcasted, but actually not used
|
||||||
|
register_telegram_type(0x550, F("AmExtra"), false, MAKE_PF_CB(process_amExtraMessage));
|
||||||
|
register_telegram_type(0x54C, F("AmSettings"), true, MAKE_PF_CB(process_amSettingMessage)); // not broadcasted
|
||||||
|
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &curFlowTemp_, DeviceValueType::SHORT, FL_(div10), FL_(sysFlowTemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_AHS, &curFlowTemp_, DeviceValueType::SHORT, FL_(div10), FL_(sysFlowTemp), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &retTemp_, DeviceValueType::SHORT, FL_(div10), FL_(sysRetTemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_AHS, &retTemp_, DeviceValueType::SHORT, FL_(div10), FL_(sysRetTemp), DeviceValueUOM::DEGREES);
|
||||||
@@ -39,15 +41,80 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
register_device_value(DeviceValueTAG::TAG_AHS, &cylTopTemp_, DeviceValueType::SHORT, FL_(div10), FL_(aCylTopTemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_AHS, &cylTopTemp_, DeviceValueType::SHORT, FL_(div10), FL_(aCylTopTemp), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &cylCenterTemp_, DeviceValueType::SHORT, FL_(div10), FL_(aCylCenterTemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_AHS, &cylCenterTemp_, DeviceValueType::SHORT, FL_(div10), FL_(aCylCenterTemp), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &cylBottomTemp_, DeviceValueType::SHORT, FL_(div10), FL_(aCylBottomTemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_AHS, &cylBottomTemp_, DeviceValueType::SHORT, FL_(div10), FL_(aCylBottomTemp), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &valveByPass_, DeviceValueType::BOOL, nullptr, FL_(valveByPass), DeviceValueUOM::NONE);
|
// register_device_value(DeviceValueTAG::TAG_AHS, &valveByPass_, DeviceValueType::BOOL, nullptr, FL_(valveByPass), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &valveBuffer_, DeviceValueType::BOOL, nullptr, FL_(valveBuffer), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_AHS, &valveBuffer_, DeviceValueType::UINT, nullptr, FL_(valveBuffer), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &valveReturn_, DeviceValueType::BOOL, nullptr, FL_(valveReturn), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_AHS, &valveReturn_, DeviceValueType::UINT, nullptr, FL_(valveReturn), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &aPump_, DeviceValueType::UINT, nullptr, FL_(aPump), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_AHS, &aPumpMod_, DeviceValueType::UINT, nullptr, FL_(aPumpMod), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_AHS, &heatSource_, DeviceValueType::BOOL, nullptr, FL_(heatSource), DeviceValueUOM::NONE);
|
// register_device_value(DeviceValueTAG::TAG_AHS, &heatSource_, DeviceValueType::BOOL, nullptr, FL_(heatSource), DeviceValueUOM::NONE);
|
||||||
|
// Settings:
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &vr2Config_, DeviceValueType::ENUM, FL_(enum_vr2Config), FL_(vr2Config), DeviceValueUOM::NONE, MAKE_CF_CB(set_vr2Config));
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &ahsActivated_, DeviceValueType::BOOL, nullptr, FL_(ahsActivated), DeviceValueUOM::NONE, MAKE_CF_CB(set_ahsActivated));
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &aPumpConfig_, DeviceValueType::BOOL, nullptr, FL_(aPumpConfig), DeviceValueUOM::NONE, MAKE_CF_CB(set_aPumpConfig));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS,
|
||||||
|
&aPumpSignal_,
|
||||||
|
DeviceValueType::ENUM,
|
||||||
|
FL_(enum_aPumpSignal),
|
||||||
|
FL_(aPumpSignal),
|
||||||
|
DeviceValueUOM::NONE,
|
||||||
|
MAKE_CF_CB(set_aPumpSignal));
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &aPumpMin_, DeviceValueType::UINT, nullptr, FL_(aPumpMin), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_aPumpMin), 12, 50);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS, &tempRise_, DeviceValueType::BOOL, nullptr, FL_(tempRise), DeviceValueUOM::NONE, MAKE_CF_CB(set_tempRise));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS,
|
||||||
|
&setReturnTemp_,
|
||||||
|
DeviceValueType::UINT,
|
||||||
|
nullptr,
|
||||||
|
FL_(setReturnTemp),
|
||||||
|
DeviceValueUOM::DEGREES,
|
||||||
|
MAKE_CF_CB(set_setReturnTemp),
|
||||||
|
40,
|
||||||
|
75);
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &mixRuntime_, DeviceValueType::USHORT, nullptr, FL_(mixRuntime), DeviceValueUOM::SECONDS, MAKE_CF_CB(set_mixRuntime), 0, 600);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS,
|
||||||
|
&setFlowTemp_,
|
||||||
|
DeviceValueType::UINT,
|
||||||
|
nullptr,
|
||||||
|
FL_(setFlowTemp),
|
||||||
|
DeviceValueUOM::DEGREES,
|
||||||
|
MAKE_CF_CB(set_setFlowTemp),
|
||||||
|
40,
|
||||||
|
75);
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &bufBypass_, DeviceValueType::ENUM, FL_(enum_bufBypass), FL_(bufBypass), DeviceValueUOM::NONE, MAKE_CF_CB(set_bufBypass));
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS,
|
||||||
|
&bufMixRuntime_,
|
||||||
|
DeviceValueType::USHORT,
|
||||||
|
nullptr,
|
||||||
|
FL_(bufMixRuntime),
|
||||||
|
DeviceValueUOM::SECONDS,
|
||||||
|
MAKE_CF_CB(set_bufMixRuntime),
|
||||||
|
0,
|
||||||
|
600);
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &bufConfig_, DeviceValueType::ENUM, FL_(enum_bufConfig), FL_(bufConfig), DeviceValueUOM::NONE, MAKE_CF_CB(set_bufConfig));
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &blockMode_, DeviceValueType::ENUM, FL_(enum_blockMode), FL_(blockMode), DeviceValueUOM::NONE, MAKE_CF_CB(set_blockMode));
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &blockTerm_, DeviceValueType::ENUM, FL_(enum_blockTerm), FL_(blockTerm), DeviceValueUOM::NONE, MAKE_CF_CB(set_blockTerm));
|
||||||
|
register_device_value(
|
||||||
|
DeviceValueTAG::TAG_AHS, &blockHyst_, DeviceValueType::INT, nullptr, FL_(blockHyst), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_blockHyst), 0, 50);
|
||||||
|
register_device_value(DeviceValueTAG::TAG_AHS,
|
||||||
|
&releaseWait_,
|
||||||
|
DeviceValueType::UINT,
|
||||||
|
nullptr,
|
||||||
|
FL_(releaseWait),
|
||||||
|
DeviceValueUOM::MINUTES,
|
||||||
|
MAKE_CF_CB(set_releaseWait),
|
||||||
|
0,
|
||||||
|
240);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// cascaded heatingsources, only some values per individual heatsource (hs)
|
// cascaded heatingsources, only some values per individual heatsource (hs)
|
||||||
if (device_id != EMSdevice::EMS_DEVICE_ID_BOILER) {
|
if (device_id >= EMSdevice::EMS_DEVICE_ID_BOILER_1) {
|
||||||
uint8_t hs = device_id - EMSdevice::EMS_DEVICE_ID_BOILER_1; // heating source id, count from 0
|
uint8_t hs = device_id - EMSdevice::EMS_DEVICE_ID_BOILER_1; // heating source id, count from 0
|
||||||
// Runtime of each heatingsource in 0x06DC, ff
|
// Runtime of each heatingsource in 0x06DC, ff
|
||||||
register_telegram_type(0x6DC + hs, F("CascadeMessage"), false, MAKE_PF_CB(process_CascadeMessage));
|
register_telegram_type(0x6DC + hs, F("CascadeMessage"), false, MAKE_PF_CB(process_CascadeMessage));
|
||||||
@@ -323,7 +390,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &totalCompStarts_, DeviceValueType::ULONG, nullptr, FL_(totalCompStarts), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &totalCompStarts_, DeviceValueType::ULONG, nullptr, FL_(totalCompStarts), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatingStarts_, DeviceValueType::ULONG, nullptr, FL_(heatingStarts), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &heatingStarts_, DeviceValueType::ULONG, nullptr, FL_(heatingStarts), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &coolingStarts_, DeviceValueType::ULONG, nullptr, FL_(coolingStarts), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &coolingStarts_, DeviceValueType::ULONG, nullptr, FL_(coolingStarts), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &wwStarts2_, DeviceValueType::ULONG, nullptr, FL_(wwStarts2), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW, &wwStarts2_, DeviceValueType::ULONG, nullptr, FL_(wwStarts2), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &poolStarts_, DeviceValueType::ULONG, nullptr, FL_(poolStarts), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &poolStarts_, DeviceValueType::ULONG, nullptr, FL_(poolStarts), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgConsTotal_, DeviceValueType::ULONG, nullptr, FL_(nrgConsTotal), DeviceValueUOM::KWH);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgConsTotal_, DeviceValueType::ULONG, nullptr, FL_(nrgConsTotal), DeviceValueUOM::KWH);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgConsCompTotal_, DeviceValueType::ULONG, nullptr, FL_(nrgConsCompTotal), DeviceValueUOM::KWH);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &nrgConsCompTotal_, DeviceValueType::ULONG, nullptr, FL_(nrgConsCompTotal), DeviceValueUOM::KWH);
|
||||||
@@ -444,7 +511,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
|
|||||||
DeviceValueUOM::DEGREES_R,
|
DeviceValueUOM::DEGREES_R,
|
||||||
MAKE_CF_CB(set_ww_flowTempOffset),
|
MAKE_CF_CB(set_ww_flowTempOffset),
|
||||||
0,
|
0,
|
||||||
45);
|
100);
|
||||||
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
register_device_value(DeviceValueTAG::TAG_BOILER_DATA_WW,
|
||||||
&wwChargeOptimization_,
|
&wwChargeOptimization_,
|
||||||
DeviceValueType::BOOL,
|
DeviceValueType::BOOL,
|
||||||
@@ -1172,19 +1239,223 @@ void Boiler::process_amTempMessage(std::shared_ptr<const Telegram> telegram) {
|
|||||||
// 0x054E AM200 status (6 bytes long)
|
// 0x054E AM200 status (6 bytes long)
|
||||||
// Rx: 60 00 FF 00 04 4E 00 00 00 00 00 00 86
|
// Rx: 60 00 FF 00 04 4E 00 00 00 00 00 00 86
|
||||||
void Boiler::process_amStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
void Boiler::process_amStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
has_update(telegram, aPump_, 0);
|
has_update(telegram, aPumpMod_, 0); // PR1
|
||||||
// actually we dont know the offset of the valves
|
// offset 1: bitfield 01-pump on, 02-VR1 opening, 04-VR1 closing, 08-VB1 opening, 10-VB1 closing
|
||||||
// has_update(telegram, valveByPass_, 1);
|
// uint8_t stat = aPump_ | setValveBuffer_ << 3 | setValveReturn_ << 1;
|
||||||
// has_update(telegram, valveBuffer_, 2);
|
// if (telegram->read_value(stat, 1)) {
|
||||||
// has_update(telegram, valveReturn_, 3);
|
// has_update(aPump_, stat & 0x01);
|
||||||
|
// has_update(valveBuffer_, (stat >> 3) & 0x03);
|
||||||
|
// has_update(valveReturn_, (stat >> 1) & 0x03);
|
||||||
|
// }
|
||||||
|
// actually we dont know the offset of VR2
|
||||||
|
// has_update(telegram, valveByPass_, ?); // VR2
|
||||||
|
has_update(telegram, valveReturn_, 4); // VR1, percent
|
||||||
|
has_update(telegram, valveBuffer_, 5); // VB1, percent
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0x054C AM200 not broadcasted message, 23 bytes long
|
||||||
|
// data: 00 01 01 00 01 00 41 4B 00 5A 00 5A 00 01 05 3C 00 00 5A 00 01 23 00
|
||||||
|
void Boiler::process_amSettingMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, vr2Config_, 12); // pos 12: off(00)/bypass(01)
|
||||||
|
has_update(telegram, ahsActivated_, 0); // pos 00: Alternate heat source activation: No(00),Yes(01)
|
||||||
|
has_update(telegram, aPumpConfig_, 4); // pos 04: Buffer primary pump->Config pump: No(00),Yes(01)
|
||||||
|
has_update(telegram, aPumpSignal_, 3); // pos 03: Output for PR1 pump: On/Off(00),PWM(01),PWM invers(02)
|
||||||
|
has_update(telegram, aPumpMin_, 21); // pos 21: Min output pump PR1 (%)
|
||||||
|
has_update(telegram, tempRise_, 1); // pos 01: AHS return temp rise: No(00),Yes(01) (mixer VR1)
|
||||||
|
has_update(telegram, setReturnTemp_, 6); // pos 06: Set temp return (°C) (VR1)
|
||||||
|
has_update(telegram, mixRuntime_, 8); // pos 8/9: Mixer run time (s) (VR1)
|
||||||
|
has_update(telegram, setFlowTemp_, 7); // pos 07: Set flow temp AHS (°C) (Buffer)
|
||||||
|
has_update(telegram, bufBypass_, 2); // pos 02: Puffer bypass: No(00), Mischer(01), Ventil(02) (Buffer)
|
||||||
|
has_update(telegram, bufMixRuntime_, 10); // pos 10/11: Bypass mixer run time: [time] (s) (Buffer)
|
||||||
|
has_update(telegram, bufConfig_, 20); // pos 20: Konfig WW-Speicher Monovalent(01), Bivalent(02) (buffer)
|
||||||
|
has_update(telegram, blockMode_, 16); // pos 16: Config htg. blocking mode: No(00),Automatic(01),Always block02) (blocking)
|
||||||
|
has_update(telegram, blockTerm_, 17); // pos 17: Config of block terminal: NO(00), NC(01)
|
||||||
|
has_update(telegram, blockHyst_, 14); // pos 14?: Hyst. for bolier block (K)
|
||||||
|
has_update(telegram, releaseWait_, 15); // pos 15: Boiler release wait time (min)
|
||||||
|
}
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
|
||||||
|
// 0x054F AM200 not broadcasted message, 7 bytes long
|
||||||
|
// Boiler(0x60) -> Me(0x0B), amCommand(0x054F), data: 00 00 00 00 00 00 00
|
||||||
|
void Boiler::process_amCommandMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
// pos 0: return pump in percent
|
||||||
|
// pos 3: setValveBuffer VB1 0-off, 1-open, 2-close
|
||||||
|
// pos 2: setValveReturn VR1 0-off, 1-open, 2-close
|
||||||
|
// pos 6: boiler blocking 0-off, 1-on
|
||||||
}
|
}
|
||||||
|
|
||||||
// 0x0550 AM200 broadcasted message, all 27 bytes unkown
|
// 0x0550 AM200 broadcasted message, all 27 bytes unkown
|
||||||
// Rx: 60 00 FF 00 04 50 00 FF 00 FF FF 00 0D 00 01 00 00 00 00 01 03 01 00 03 00 2D 19 C8 02 94 00 4A
|
// Rx: 60 00 FF 00 04 50 00 FF 00 FF FF 00 0D 00 01 00 00 00 00 01 03 01 00 03 00 2D 19 C8 02 94 00 4A
|
||||||
// Rx: 60 00 FF 19 04 50 00 FF FF 39
|
// Rx: 60 00 FF 19 04 50 00 FF FF 39
|
||||||
void Boiler::process_amSettingMessage(std::shared_ptr<const Telegram> telegram) {
|
void Boiler::process_amExtraMessage(std::shared_ptr<const Telegram> telegram) {
|
||||||
// has_update(telegram, setRetTemp_, ?);
|
}
|
||||||
// has_update(telegram, setFlowTemp_, ?);
|
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
|
// Settings AM200
|
||||||
|
|
||||||
|
// pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
|
||||||
|
bool Boiler::set_vr2Config(const char * value, const int8_t id) {
|
||||||
|
uint8_t v;
|
||||||
|
if (!Helpers::value2enum(value, v, FL_(enum_vr2Config))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 12, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 00: Alternate heat source activation: No(00),Yes(01)
|
||||||
|
bool Boiler::set_ahsActivated(const char * value, const int8_t id) {
|
||||||
|
bool v;
|
||||||
|
if (!Helpers::value2bool(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 0, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 04: Buffer primary pump->Config pump: No(00),Yes(01)
|
||||||
|
bool Boiler::set_aPumpConfig(const char * value, const int8_t id) {
|
||||||
|
bool v;
|
||||||
|
if (!Helpers::value2bool(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 4, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 03: Output for PR1 pump: On/Off(00),PWM(01),PWM invers(02)
|
||||||
|
bool Boiler::set_aPumpSignal(const char * value, const int8_t id) {
|
||||||
|
uint8_t v;
|
||||||
|
if (!Helpers::value2enum(value, v, FL_(enum_aPumpSignal))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 3, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 21: Min output pump PR1 (%)
|
||||||
|
bool Boiler::set_aPumpMin(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2number(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 21, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 01: AHS return temp rise: No(00),Yes(01) (mixer VR1)
|
||||||
|
bool Boiler::set_tempRise(const char * value, const int8_t id) {
|
||||||
|
bool v;
|
||||||
|
if (!Helpers::value2bool(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 1, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 06: Set temp return (°C) (VR1)
|
||||||
|
bool Boiler::set_setReturnTemp(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2temperature(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 6, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 10/11?: Mixer run time (s) (VR1)
|
||||||
|
bool Boiler::set_mixRuntime(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2number(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
|
||||||
|
write_command(0x54C, 8, data, 2, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 07: Set flow temp AHS (°C) (Buffer)
|
||||||
|
bool Boiler::set_setFlowTemp(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2number(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 7, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 02: Puffer bypass: No(00), Mischer(01), Ventil(02) (Buffer)
|
||||||
|
bool Boiler::set_bufBypass(const char * value, const int8_t id) {
|
||||||
|
uint8_t v;
|
||||||
|
if (!Helpers::value2enum(value, v, FL_(enum_bufBypass))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 2, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 8/9: Bypass mixer run time: [time] (s) (Buffer)
|
||||||
|
bool Boiler::set_bufMixRuntime(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2number(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
uint8_t data[2] = {(uint8_t)(v >> 8), (uint8_t)v};
|
||||||
|
write_command(0x54C, 10, data, 2, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 20: Konfig WW-Speicher Monovalent(01), Bivalent(02) (buffer)
|
||||||
|
bool Boiler::set_bufConfig(const char * value, const int8_t id) {
|
||||||
|
uint8_t v;
|
||||||
|
if (!Helpers::value2enum(value, v, FL_(enum_bufConfig))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 20, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 16: Config htg. blocking mode: No(00),Automatic(01),Always block02) (blocking)
|
||||||
|
bool Boiler::set_blockMode(const char * value, const int8_t id) {
|
||||||
|
uint8_t v;
|
||||||
|
if (!Helpers::value2enum(value, v, FL_(enum_blockMode))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 16, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 17: Config of block terminal: NO(00), NC(01)
|
||||||
|
bool Boiler::set_blockTerm(const char * value, const int8_t id) {
|
||||||
|
uint8_t v;
|
||||||
|
if (!Helpers::value2enum(value, v, FL_(enum_blockTerm))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 17, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 14?: Hyst. for bolier block (K)
|
||||||
|
bool Boiler::set_blockHyst(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2temperature(value, v, true)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 14, v, 0x54C);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// pos 15: Boiler release wait time (min)
|
||||||
|
bool Boiler::set_releaseWait(const char * value, const int8_t id) {
|
||||||
|
int v;
|
||||||
|
if (!Helpers::value2number(value, v)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
write_command(0x54C, 15, v, 0x54C);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -204,12 +204,30 @@ class Boiler : public EMSdevice {
|
|||||||
int16_t cylBottomTemp_; // TB3
|
int16_t cylBottomTemp_; // TB3
|
||||||
int16_t aFlowTemp_; // TA1
|
int16_t aFlowTemp_; // TA1
|
||||||
int16_t aRetTemp_; // TR1
|
int16_t aRetTemp_; // TR1
|
||||||
uint8_t aPump_; // PR1 - percent
|
uint8_t aPumpMod_; // PR1 - percent
|
||||||
uint8_t valveByPass_; // VR2
|
// uint8_t valveByPass_; // VR2
|
||||||
uint8_t valveBuffer_; // VB1
|
uint8_t valveBuffer_; // VB1
|
||||||
uint8_t valveReturn_; // VR1
|
uint8_t valveReturn_; // VR1
|
||||||
uint8_t heatSource_; // OEV
|
// uint8_t heatSource_; // OEV
|
||||||
// int8_t setRetTemp_;
|
// Settings:
|
||||||
|
uint8_t vr2Config_; // pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
|
||||||
|
uint8_t ahsActivated_; // pos 00: Alternate heat source activation: No(00),Yes(01)
|
||||||
|
uint8_t aPumpConfig_; // pos 04: Buffer primary pump->Config pump: No(00),Yes(01)
|
||||||
|
uint8_t aPumpSignal_; // pos 03: Output for PR1 pump: On/Off(00),PWM(01),PWM invers(02)
|
||||||
|
uint8_t aPumpMin_; // pos 21: Min output pump PR1 (%)
|
||||||
|
uint8_t tempRise_; // pos 01: AHS return temp rise: No(00),Yes(01) (mixer VR1)
|
||||||
|
uint8_t setReturnTemp_; // pos 06: Set temp return (°C) (VR1)
|
||||||
|
uint16_t mixRuntime_; // pos 10/11?: Mixer run time (s) (VR1)
|
||||||
|
// uint8_t setFlowTemp_; // pos 07: Set flow temp AHS (°C) (Buffer)
|
||||||
|
uint8_t bufBypass_; // pos 02: Puffer bypass: No(00), Mischer(01), Ventil(02) (Buffer)
|
||||||
|
uint16_t bufMixRuntime_; // pos 8/9: Bypass mixer run time: [time] (s) (Buffer)
|
||||||
|
uint8_t bufConfig_; // pos 20: Konfig WW-Speicher Monovalent(01), Bivalent(02) (buffer)
|
||||||
|
uint8_t blockMode_; // pos 16: Config htg. blocking mode: No(00),Automatic(01),Always block02) (blocking)
|
||||||
|
uint8_t blockTerm_; // pos 17: Config of block terminal: NO(00), NC(01)
|
||||||
|
int8_t blockHyst_; // pos 14?: Hyst. for bolier block (K)
|
||||||
|
uint8_t releaseWait_; // pos 15: Boiler release wait time (min)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -259,6 +277,8 @@ class Boiler : public EMSdevice {
|
|||||||
void process_amTempMessage(std::shared_ptr<const Telegram> telegram);
|
void process_amTempMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_amStatusMessage(std::shared_ptr<const Telegram> telegram);
|
void process_amStatusMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_amSettingMessage(std::shared_ptr<const Telegram> telegram);
|
void process_amSettingMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_amCommandMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_amExtraMessage(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|
||||||
// commands - none of these use the additional id parameter
|
// commands - none of these use the additional id parameter
|
||||||
bool set_ww_mode(const char * value, const int8_t id);
|
bool set_ww_mode(const char * value, const int8_t id);
|
||||||
@@ -298,6 +318,24 @@ class Boiler : public EMSdevice {
|
|||||||
bool set_pool_temp(const char * value, const int8_t id);
|
bool set_pool_temp(const char * value, const int8_t id);
|
||||||
bool set_emergency_temp(const char * value, const int8_t id);
|
bool set_emergency_temp(const char * value, const int8_t id);
|
||||||
bool set_emergency_ops(const char * value, const int8_t id);
|
bool set_emergency_ops(const char * value, const int8_t id);
|
||||||
|
|
||||||
|
bool set_vr2Config(const char * value, const int8_t id); // pos 12: off(00)/Keelbypass(01)/(hc1pump(02) only standalone)
|
||||||
|
bool set_ahsActivated(const char * value, const int8_t id); // pos 00: Alternate heat source activation: No(00),Yes(01)
|
||||||
|
bool set_aPumpConfig(const char * value, const int8_t id); // pos 04: Buffer primary pump->Config pump: No(00),Yes(01)
|
||||||
|
bool set_aPumpSignal(const char * value, const int8_t id); // pos 03: Output for PR1 pump: On/Off(00),PWM(01),PWM invers(02)
|
||||||
|
bool set_aPumpMin(const char * value, const int8_t id); // pos 21: Min output pump PR1 (%)
|
||||||
|
bool set_tempRise(const char * value, const int8_t id); // pos 01: AHS return temp rise: No(00),Yes(01) (mixer VR1)
|
||||||
|
bool set_setReturnTemp(const char * value, const int8_t id); // pos 06: Set temp return (°C) (VR1)
|
||||||
|
bool set_mixRuntime(const char * value, const int8_t id); // pos 10/11?: Mixer run time (s) (VR1)
|
||||||
|
bool set_setFlowTemp(const char * value, const int8_t id); // pos 07: Set flow temp AHS (°C) (Buffer)
|
||||||
|
bool set_bufBypass(const char * value, const int8_t id); // pos 02: Puffer bypass: No(00), Mischer(01), Ventil(02) (Buffer)
|
||||||
|
bool set_bufMixRuntime(const char * value, const int8_t id); // pos 8/9: Bypass mixer run time: [time] (s) (Buffer)
|
||||||
|
bool set_bufConfig(const char * value, const int8_t id); // pos 20: Konfig WW-Speicher Monovalent(01), Bivalent(02) (buffer)
|
||||||
|
bool set_blockMode(const char * value, const int8_t id); // pos 16: Config htg. blocking mode: No(00),Automatic(01),Always block02) (blocking)
|
||||||
|
bool set_blockTerm(const char * value, const int8_t id); // pos 17: Config of block terminal: NO(00), NC(01)
|
||||||
|
bool set_blockHyst(const char * value, const int8_t id); // pos 14?: Hyst. for bolier block (K)
|
||||||
|
bool set_releaseWait(const char * value, const int8_t id); // pos 15: Boiler release wait time (min)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bool set_hybridStrategy(const char * value, const int8_t id);
|
bool set_hybridStrategy(const char * value, const int8_t id);
|
||||||
bool set_switchOverTemp(const char * value, const int8_t id);
|
bool set_switchOverTemp(const char * value, const int8_t id);
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ REGISTER_FACTORY(Heatpump, EMSdevice::DeviceType::HEATPUMP);
|
|||||||
Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const std::string & name, uint8_t flags, uint8_t brand)
|
Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, const char * version, const std::string & name, uint8_t flags, uint8_t brand)
|
||||||
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||||
// telegram handlers
|
// telegram handlers
|
||||||
register_telegram_type(0x042B, F("HP1"), true, MAKE_PF_CB(process_HPMonitor1));
|
register_telegram_type(0x042B, F("HP1"), false, MAKE_PF_CB(process_HPMonitor1));
|
||||||
register_telegram_type(0x047B, F("HP2"), true, MAKE_PF_CB(process_HPMonitor2));
|
register_telegram_type(0x047B, F("HP2"), false, MAKE_PF_CB(process_HPMonitor2));
|
||||||
|
|
||||||
// device values
|
// device values
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT, FL_(div2), FL_(airHumidity), DeviceValueUOM::PERCENT);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &airHumidity_, DeviceValueType::UINT, nullptr, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dewTemperature_, DeviceValueType::UINT, nullptr, FL_(dewTemperature), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dewTemperature_, DeviceValueType::UINT, nullptr, FL_(dewTemperature), DeviceValueUOM::DEGREES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ Thermostat::Thermostat(uint8_t device_type, uint8_t device_id, uint8_t product_i
|
|||||||
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
: EMSdevice(device_type, device_id, product_id, version, name, flags, brand) {
|
||||||
uint8_t model = this->model();
|
uint8_t model = this->model();
|
||||||
|
|
||||||
|
// remote thermostats with humidity
|
||||||
|
if (device_id >= 0x38 && device_id <= 0x3F) { // RC100H remote
|
||||||
|
register_telegram_type(0x042B, F("RemoteTemp"), false, MAKE_PF_CB(process_RemoteTemp));
|
||||||
|
register_telegram_type(0x047B, F("RemoteHumidity"), false, MAKE_PF_CB(process_RemoteHumidity));
|
||||||
|
register_telegram_type(0x0273, F("RemoteCorrection"), true, MAKE_PF_CB(process_RemoteCorrection));
|
||||||
|
register_device_values(); // register device values for common values (not heating circuit)
|
||||||
|
return; // no values to add
|
||||||
|
}
|
||||||
// common telegram handlers
|
// common telegram handlers
|
||||||
register_telegram_type(EMS_TYPE_RCOutdoorTemp, F("RCOutdoorTemp"), false, MAKE_PF_CB(process_RCOutdoorTemp));
|
register_telegram_type(EMS_TYPE_RCOutdoorTemp, F("RCOutdoorTemp"), false, MAKE_PF_CB(process_RCOutdoorTemp));
|
||||||
register_telegram_type(EMS_TYPE_RCTime, F("RCTime"), false, MAKE_PF_CB(process_RCTime));
|
register_telegram_type(EMS_TYPE_RCTime, F("RCTime"), false, MAKE_PF_CB(process_RCTime));
|
||||||
@@ -288,13 +296,13 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::sha
|
|||||||
}
|
}
|
||||||
|
|
||||||
// not found, search device-id types for remote thermostats
|
// not found, search device-id types for remote thermostats
|
||||||
if (telegram->src >= 0x18 && telegram->src <= 0x1B) {
|
if (hc_num == 0 && telegram->src >= 0x18 && telegram->src <= 0x1F) {
|
||||||
hc_num = telegram->src - 0x17;
|
hc_num = telegram->src - 0x17;
|
||||||
toggle_ = true;
|
toggle_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// not found, search device-id types for remote thermostats
|
// not found, search device-id types for remote thermostats
|
||||||
if (telegram->dest >= 0x20 && telegram->dest <= 0x27) {
|
if (hc_num == 0 && telegram->dest >= 0x20 && telegram->dest <= 0x27) {
|
||||||
hc_num = telegram->dest - 0x20;
|
hc_num = telegram->dest - 0x20;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,8 +347,9 @@ std::shared_ptr<Thermostat::HeatingCircuit> Thermostat::heating_circuit(std::sha
|
|||||||
|
|
||||||
// set the flag saying we want its data during the next auto fetch
|
// set the flag saying we want its data during the next auto fetch
|
||||||
// monitor is broadcasted, but not frequently in some thermostats (IVT, #356)
|
// monitor is broadcasted, but not frequently in some thermostats (IVT, #356)
|
||||||
toggle_fetch(monitor_typeids[hc_num - 1], toggle_);
|
if (monitor_typeids.size()) {
|
||||||
|
toggle_fetch(monitor_typeids[hc_num - 1], toggle_);
|
||||||
|
}
|
||||||
if (set_typeids.size()) {
|
if (set_typeids.size()) {
|
||||||
toggle_fetch(set_typeids[hc_num - 1], toggle_);
|
toggle_fetch(set_typeids[hc_num - 1], toggle_);
|
||||||
}
|
}
|
||||||
@@ -682,6 +691,24 @@ void Thermostat::process_RC20Remote(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_update(telegram, hc->remotetemp, 0);
|
has_update(telegram, hc->remotetemp, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 0x42B - for reading the roomtemperature from the RC100H remote thermostat (0x38, 0x39, ..)
|
||||||
|
// e.g. "38 10 FF 00 03 2B 00 D1 08 2A 01"
|
||||||
|
void Thermostat::process_RemoteTemp(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, tempsensor1_, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0x47B - for reading humidity from the RC100H remote thermostat (0x38, 0x39, ..)
|
||||||
|
// e.g. "38 10 FF 00 03 7B 08 24 00 4B"
|
||||||
|
void Thermostat::process_RemoteHumidity(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, dewtemperature_, 0);
|
||||||
|
has_update(telegram, humidity_, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 0x273 - for reading temperaturcorrection from the RC100H remote thermostat (0x38, 0x39, ..)
|
||||||
|
void Thermostat::process_RemoteCorrection(std::shared_ptr<const Telegram> telegram) {
|
||||||
|
has_update(telegram, ibaCalIntTemperature_, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// type 0x0165, ff
|
// type 0x0165, ff
|
||||||
void Thermostat::process_JunkersSet(std::shared_ptr<const Telegram> telegram) {
|
void Thermostat::process_JunkersSet(std::shared_ptr<const Telegram> telegram) {
|
||||||
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(telegram);
|
||||||
@@ -986,6 +1013,7 @@ void Thermostat::process_RC300Set(std::shared_ptr<const Telegram> telegram) {
|
|||||||
has_enumupdate(telegram, hc->reducemode, 5, 1); // 1-outdoor temp threshold, 2-room temp threshold, 3-reduced mode
|
has_enumupdate(telegram, hc->reducemode, 5, 1); // 1-outdoor temp threshold, 2-room temp threshold, 3-reduced mode
|
||||||
has_update(telegram, hc->reducetemp, 9);
|
has_update(telegram, hc->reducetemp, 9);
|
||||||
has_update(telegram, hc->noreducetemp, 12);
|
has_update(telegram, hc->noreducetemp, 12);
|
||||||
|
has_update(telegram, hc->remoteseltemp, 17); // see https://github.com/emsesp/EMS-ESP32/issues/590
|
||||||
}
|
}
|
||||||
|
|
||||||
// types 0x2AF ff
|
// types 0x2AF ff
|
||||||
@@ -1597,6 +1625,8 @@ bool Thermostat::set_calinttemp(const char * value, const int8_t id) {
|
|||||||
write_command(0xB0, 0, t, 0xB0);
|
write_command(0xB0, 0, t, 0xB0);
|
||||||
} else if (model() == EMS_DEVICE_FLAG_RC30) {
|
} else if (model() == EMS_DEVICE_FLAG_RC30) {
|
||||||
write_command(EMS_TYPE_RC30Settings, 1, t, EMS_TYPE_RC30Settings);
|
write_command(EMS_TYPE_RC30Settings, 1, t, EMS_TYPE_RC30Settings);
|
||||||
|
} else if (model() == EMS_DEVICE_FLAG_RC100H) {
|
||||||
|
write_command(0x273, 0, t, 0x273);
|
||||||
} else {
|
} else {
|
||||||
write_command(EMS_TYPE_IBASettings, 2, t, EMS_TYPE_IBASettings);
|
write_command(EMS_TYPE_IBASettings, 2, t, EMS_TYPE_IBASettings);
|
||||||
}
|
}
|
||||||
@@ -2950,6 +2980,9 @@ bool Thermostat::set_temperature(const float temperature, const uint8_t mode, co
|
|||||||
factor = 1; // to write 0xFF
|
factor = 1; // to write 0xFF
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case HeatingCircuit::Mode::REMOTESELTEMP:
|
||||||
|
offset = 0x11;
|
||||||
|
break;
|
||||||
case HeatingCircuit::Mode::COMFORT:
|
case HeatingCircuit::Mode::COMFORT:
|
||||||
offset = 0x02; // comfort offset level 2
|
offset = 0x02; // comfort offset level 2
|
||||||
break;
|
break;
|
||||||
@@ -3334,9 +3367,25 @@ bool Thermostat::set_roominfluence(const char * value, const int8_t id) {
|
|||||||
return set_temperature_value(value, id, HeatingCircuit::Mode::ROOMINFLUENCE, true);
|
return set_temperature_value(value, id, HeatingCircuit::Mode::ROOMINFLUENCE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Thermostat::set_remoteseltemp(const char * value, const int8_t id) {
|
||||||
|
return set_temperature_value(value, id, HeatingCircuit::Mode::REMOTESELTEMP);
|
||||||
|
}
|
||||||
|
|
||||||
// register main device values, top level for all thermostats (excluding heating circuits)
|
// register main device values, top level for all thermostats (excluding heating circuits)
|
||||||
// as these are done in void Thermostat::register_device_values_hc()
|
// as these are done in void Thermostat::register_device_values_hc()
|
||||||
void Thermostat::register_device_values() {
|
void Thermostat::register_device_values() {
|
||||||
|
// RC100H remote with humidity, this is also EMS_DEVICE_FLAG_RC100 for set_calinttemp
|
||||||
|
if (device_id() >= 0x38 && device_id() <= 0x3F) {
|
||||||
|
// each device controls only one hc, so we tag the values
|
||||||
|
uint8_t tag = DeviceValueTAG::TAG_HC1 + device_id() - 0x38;
|
||||||
|
register_device_value(tag, &tempsensor1_, DeviceValueType::SHORT, FL_(div10), FL_(remotetemp), DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(tag, &dewtemperature_, DeviceValueType::INT, nullptr, FL_(dewTemperature), DeviceValueUOM::DEGREES);
|
||||||
|
register_device_value(tag, &humidity_, DeviceValueType::INT, nullptr, FL_(airHumidity), DeviceValueUOM::PERCENT);
|
||||||
|
register_device_value(
|
||||||
|
tag, &ibaCalIntTemperature_, DeviceValueType::INT, FL_(div10), FL_(ibaCalIntTemperature), DeviceValueUOM::DEGREES_R, MAKE_CF_CB(set_calinttemp));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Common for all thermostats
|
// Common for all thermostats
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &errorCode_, DeviceValueType::STRING, nullptr, FL_(errorCode), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &errorCode_, DeviceValueType::STRING, nullptr, FL_(errorCode), DeviceValueUOM::NONE);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &lastCode_, DeviceValueType::STRING, nullptr, FL_(lastCode), DeviceValueUOM::NONE);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &lastCode_, DeviceValueType::STRING, nullptr, FL_(lastCode), DeviceValueUOM::NONE);
|
||||||
@@ -3732,8 +3781,8 @@ void Thermostat::register_device_values() {
|
|||||||
FL_(ibaMinExtTemperature),
|
FL_(ibaMinExtTemperature),
|
||||||
DeviceValueUOM::DEGREES,
|
DeviceValueUOM::DEGREES,
|
||||||
MAKE_CF_CB(set_minexttemp));
|
MAKE_CF_CB(set_minexttemp));
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tempsensor1_, DeviceValueType::USHORT, FL_(div10), FL_(tempsensor1), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tempsensor1_, DeviceValueType::SHORT, FL_(div10), FL_(tempsensor1), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tempsensor2_, DeviceValueType::USHORT, FL_(div10), FL_(tempsensor2), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &tempsensor2_, DeviceValueType::SHORT, FL_(div10), FL_(tempsensor2), DeviceValueUOM::DEGREES);
|
||||||
register_device_value(
|
register_device_value(
|
||||||
DeviceValueTAG::TAG_DEVICE_DATA, &ibaDamping_, DeviceValueType::BOOL, nullptr, FL_(damping), DeviceValueUOM::NONE, MAKE_CF_CB(set_damping));
|
DeviceValueTAG::TAG_DEVICE_DATA, &ibaDamping_, DeviceValueType::BOOL, nullptr, FL_(damping), DeviceValueUOM::NONE, MAKE_CF_CB(set_damping));
|
||||||
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dampedoutdoortemp_, DeviceValueType::INT, nullptr, FL_(dampedoutdoortemp), DeviceValueUOM::DEGREES);
|
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA, &dampedoutdoortemp_, DeviceValueType::INT, nullptr, FL_(dampedoutdoortemp), DeviceValueUOM::DEGREES);
|
||||||
@@ -3994,6 +4043,8 @@ void Thermostat::register_device_values_hc(std::shared_ptr<Thermostat::HeatingCi
|
|||||||
register_device_value(tag, &hc->program, DeviceValueType::ENUM, FL_(enum_progMode), FL_(program), DeviceValueUOM::NONE, MAKE_CF_CB(set_program));
|
register_device_value(tag, &hc->program, DeviceValueType::ENUM, FL_(enum_progMode), FL_(program), DeviceValueUOM::NONE, MAKE_CF_CB(set_program));
|
||||||
register_device_value(
|
register_device_value(
|
||||||
tag, &hc->tempautotemp, DeviceValueType::INT, FL_(div2), FL_(tempautotemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_tempautotemp), -1, 30);
|
tag, &hc->tempautotemp, DeviceValueType::INT, FL_(div2), FL_(tempautotemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_tempautotemp), -1, 30);
|
||||||
|
register_device_value(
|
||||||
|
tag, &hc->remoteseltemp, DeviceValueType::INT, FL_(div2), FL_(remoteseltemp), DeviceValueUOM::DEGREES, MAKE_CF_CB(set_remoteseltemp), -1, 30);
|
||||||
register_device_value(tag, &hc->fastHeatup, DeviceValueType::UINT, nullptr, FL_(fastheatup), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_fastheatup));
|
register_device_value(tag, &hc->fastHeatup, DeviceValueType::UINT, nullptr, FL_(fastheatup), DeviceValueUOM::PERCENT, MAKE_CF_CB(set_fastheatup));
|
||||||
register_device_value(tag,
|
register_device_value(tag,
|
||||||
&hc->switchonoptimization,
|
&hc->switchonoptimization,
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class Thermostat : public EMSdevice {
|
|||||||
int16_t roomTemp;
|
int16_t roomTemp;
|
||||||
int16_t remotetemp; // for readback
|
int16_t remotetemp; // for readback
|
||||||
uint8_t tempautotemp;
|
uint8_t tempautotemp;
|
||||||
|
int8_t remoteseltemp;
|
||||||
uint8_t mode;
|
uint8_t mode;
|
||||||
uint8_t modetype;
|
uint8_t modetype;
|
||||||
uint8_t summermode;
|
uint8_t summermode;
|
||||||
@@ -133,6 +134,7 @@ class Thermostat : public EMSdevice {
|
|||||||
ON,
|
ON,
|
||||||
DAYLOW,
|
DAYLOW,
|
||||||
DAYMID,
|
DAYMID,
|
||||||
|
REMOTESELTEMP,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -193,12 +195,14 @@ class Thermostat : public EMSdevice {
|
|||||||
uint8_t offtemp_; // Set Temperature when mode is Off / 10 (e.g.: 0x0F = 7.5 degrees Celsius)
|
uint8_t offtemp_; // Set Temperature when mode is Off / 10 (e.g.: 0x0F = 7.5 degrees Celsius)
|
||||||
uint8_t mixingvalves_; // Number of Mixing Valves: (0x00=0, 0x01=1, 0x02=2)
|
uint8_t mixingvalves_; // Number of Mixing Valves: (0x00=0, 0x01=1, 0x02=2)
|
||||||
|
|
||||||
int8_t dampedoutdoortemp_;
|
int8_t dampedoutdoortemp_;
|
||||||
uint16_t tempsensor1_;
|
int16_t tempsensor1_;
|
||||||
uint16_t tempsensor2_;
|
int16_t tempsensor2_;
|
||||||
int16_t dampedoutdoortemp2_;
|
int16_t dampedoutdoortemp2_;
|
||||||
uint8_t floordrystatus_;
|
uint8_t floordrystatus_;
|
||||||
uint8_t floordrytemp_;
|
uint8_t floordrytemp_;
|
||||||
|
uint8_t dewtemperature_;
|
||||||
|
uint8_t humidity_;
|
||||||
|
|
||||||
uint8_t wwExtra1_; // wwExtra active for wwSystem 1
|
uint8_t wwExtra1_; // wwExtra active for wwSystem 1
|
||||||
uint8_t wwExtra2_;
|
uint8_t wwExtra2_;
|
||||||
@@ -380,6 +384,9 @@ class Thermostat : public EMSdevice {
|
|||||||
void process_JunkersRemoteMonitor(std::shared_ptr<const Telegram> telegram);
|
void process_JunkersRemoteMonitor(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_JunkersHybridSettings(std::shared_ptr<const Telegram> telegram);
|
void process_JunkersHybridSettings(std::shared_ptr<const Telegram> telegram);
|
||||||
void process_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
|
void process_JunkersSetMixer(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_RemoteTemp(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_RemoteHumidity(std::shared_ptr<const Telegram> telegram);
|
||||||
|
void process_RemoteCorrection(std::shared_ptr<const Telegram> telegram);
|
||||||
|
|
||||||
// internal helper functions
|
// internal helper functions
|
||||||
bool set_mode_n(const uint8_t mode, const uint8_t hc_num);
|
bool set_mode_n(const uint8_t mode, const uint8_t hc_num);
|
||||||
@@ -433,6 +440,7 @@ class Thermostat : public EMSdevice {
|
|||||||
bool set_wwprio(const char * value, const int8_t id);
|
bool set_wwprio(const char * value, const int8_t id);
|
||||||
bool set_fastheatup(const char * value, const int8_t id);
|
bool set_fastheatup(const char * value, const int8_t id);
|
||||||
bool set_switchonoptimization(const char * value, const int8_t id);
|
bool set_switchonoptimization(const char * value, const int8_t id);
|
||||||
|
bool set_remoteseltemp(const char * value, const int8_t id);
|
||||||
|
|
||||||
// set functions - these don't use the id/hc, the parameters are ignored
|
// set functions - these don't use the id/hc, the parameters are ignored
|
||||||
bool set_wwmode(const char * value, const int8_t id);
|
bool set_wwmode(const char * value, const int8_t id);
|
||||||
|
|||||||
@@ -355,6 +355,7 @@ class EMSdevice {
|
|||||||
static constexpr uint8_t EMS_DEVICE_FLAG_RC100 = 10;
|
static constexpr uint8_t EMS_DEVICE_FLAG_RC100 = 10;
|
||||||
static constexpr uint8_t EMS_DEVICE_FLAG_JUNKERS = 11;
|
static constexpr uint8_t EMS_DEVICE_FLAG_JUNKERS = 11;
|
||||||
static constexpr uint8_t EMS_DEVICE_FLAG_CRF = 12; // CRF200 only monitor
|
static constexpr uint8_t EMS_DEVICE_FLAG_CRF = 12; // CRF200 only monitor
|
||||||
|
static constexpr uint8_t EMS_DEVICE_FLAG_RC100H = 13; // with humidity
|
||||||
|
|
||||||
uint8_t count_entities();
|
uint8_t count_entities();
|
||||||
bool has_entities() const;
|
bool has_entities() const;
|
||||||
|
|||||||
@@ -826,16 +826,13 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
|
|||||||
// match device_id and type_id
|
// match device_id and type_id
|
||||||
// calls the associated process function for that EMS device
|
// calls the associated process function for that EMS device
|
||||||
// returns false if the device_id doesn't recognize it
|
// returns false if the device_id doesn't recognize it
|
||||||
// after the telegram has been processed, call see if there have been values changed and we need to do a MQTT publish
|
// after the telegram has been processed, see if there have been values changed and we need to do a MQTT publish
|
||||||
bool found = false;
|
bool found = false;
|
||||||
bool knowndevice = false;
|
bool knowndevice = false;
|
||||||
for (const auto & emsdevice : emsdevices) {
|
for (const auto & emsdevice : emsdevices) {
|
||||||
if (emsdevice->is_device_id(telegram->src) || emsdevice->is_device_id(telegram->dest)) {
|
if (emsdevice->is_device_id(telegram->src)) {
|
||||||
knowndevice = true;
|
knowndevice = true;
|
||||||
found = emsdevice->handle_telegram(telegram);
|
found = emsdevice->handle_telegram(telegram);
|
||||||
if (found && emsdevice->is_device_id(telegram->dest)) {
|
|
||||||
LOG_DEBUG(F("Process setting 0x%02X for device 0x%02X"), telegram->type_id, telegram->dest);
|
|
||||||
}
|
|
||||||
// if we correctly processed the telegram then follow up with sending it via MQTT (if enabled)
|
// if we correctly processed the telegram then follow up with sending it via MQTT (if enabled)
|
||||||
if (found && Mqtt::connected()) {
|
if (found && Mqtt::connected()) {
|
||||||
if ((mqtt_.get_publish_onchange(emsdevice->device_type()) && emsdevice->has_update())
|
if ((mqtt_.get_publish_onchange(emsdevice->device_type()) && emsdevice->has_update())
|
||||||
@@ -852,7 +849,7 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
|
|||||||
if (wait_validate_ == telegram->type_id) {
|
if (wait_validate_ == telegram->type_id) {
|
||||||
wait_validate_ = 0;
|
wait_validate_ = 0;
|
||||||
}
|
}
|
||||||
if (!found && emsdevice->is_device_id(telegram->src) && telegram->message_length > 0) {
|
if (!found && telegram->message_length > 0) {
|
||||||
emsdevice->add_handlers_ignored(telegram->type_id);
|
emsdevice->add_handlers_ignored(telegram->type_id);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -931,6 +928,9 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
|
|||||||
// first check to see if we already have it, if so update the record
|
// first check to see if we already have it, if so update the record
|
||||||
for (const auto & emsdevice : emsdevices) {
|
for (const auto & emsdevice : emsdevices) {
|
||||||
if (emsdevice && emsdevice->is_device_id(device_id)) {
|
if (emsdevice && emsdevice->is_device_id(device_id)) {
|
||||||
|
if (product_id == 0) { // update only with valid product_id
|
||||||
|
return true;
|
||||||
|
}
|
||||||
LOG_DEBUG(F("Updating details for already active deviceID 0x%02X"), device_id);
|
LOG_DEBUG(F("Updating details for already active deviceID 0x%02X"), device_id);
|
||||||
emsdevice->product_id(product_id);
|
emsdevice->product_id(product_id);
|
||||||
emsdevice->version(version);
|
emsdevice->version(version);
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ MAKE_PSTR(tag_wwc7, "wwc7")
|
|||||||
MAKE_PSTR(tag_wwc8, "wwc8")
|
MAKE_PSTR(tag_wwc8, "wwc8")
|
||||||
MAKE_PSTR(tag_wwc9, "wwc9")
|
MAKE_PSTR(tag_wwc9, "wwc9")
|
||||||
MAKE_PSTR(tag_wwc10, "wwc10")
|
MAKE_PSTR(tag_wwc10, "wwc10")
|
||||||
|
MAKE_PSTR(tag_ahs, "ahs")
|
||||||
MAKE_PSTR(tag_hs1, "hs1")
|
MAKE_PSTR(tag_hs1, "hs1")
|
||||||
MAKE_PSTR(tag_hs2, "hs2")
|
MAKE_PSTR(tag_hs2, "hs2")
|
||||||
MAKE_PSTR(tag_hs3, "hs3")
|
MAKE_PSTR(tag_hs3, "hs3")
|
||||||
@@ -243,6 +244,7 @@ MAKE_PSTR(tag_hs16, "hs16")
|
|||||||
|
|
||||||
// MQTT topic names
|
// MQTT topic names
|
||||||
// MAKE_PSTR(tag_heartbeat_mqtt, "heartbeat")
|
// MAKE_PSTR(tag_heartbeat_mqtt, "heartbeat")
|
||||||
|
// MAKE_PSTR(tag_boiler_data_mqtt, "")
|
||||||
MAKE_PSTR(tag_boiler_data_ww_mqtt, "ww")
|
MAKE_PSTR(tag_boiler_data_ww_mqtt, "ww")
|
||||||
MAKE_PSTR(tag_device_data_ww_mqtt, "")
|
MAKE_PSTR(tag_device_data_ww_mqtt, "")
|
||||||
|
|
||||||
@@ -282,6 +284,14 @@ MAKE_PSTR_LIST(enum_flow, F_(off), F_(flow), F_(bufferedflow), F_(buffer), F_(la
|
|||||||
MAKE_PSTR_LIST(enum_reset, F("-"), F_(maintenance), F_(error))
|
MAKE_PSTR_LIST(enum_reset, F("-"), F_(maintenance), F_(error))
|
||||||
// MAKE_PSTR_LIST(enum_bool, F_(off), F_(on))
|
// MAKE_PSTR_LIST(enum_bool, F_(off), F_(on))
|
||||||
|
|
||||||
|
// AM200 lists
|
||||||
|
MAKE_PSTR_LIST(enum_vr2Config, F_(off), F("bypass"));
|
||||||
|
MAKE_PSTR_LIST(enum_aPumpSignal, F_(off), F("pwm"), F("pwm_invers"));
|
||||||
|
MAKE_PSTR_LIST(enum_bufBypass, F("no"), F_(mixer), F("valve"));
|
||||||
|
MAKE_PSTR_LIST(enum_bufConfig, F("monovalent"), F("bivalent"));
|
||||||
|
MAKE_PSTR_LIST(enum_blockMode, F_(off), F_(auto), F("blocking"));
|
||||||
|
MAKE_PSTR_LIST(enum_blockTerm, F("n_o"), F("n_c"));
|
||||||
|
|
||||||
//heatpump
|
//heatpump
|
||||||
MAKE_PSTR_LIST(enum_hpactivity, F("Kein"), F("Heizen"), F("Kühlen"), F("Warmwasser"), F("Pool"))
|
MAKE_PSTR_LIST(enum_hpactivity, F("Kein"), F("Heizen"), F("Kühlen"), F("Warmwasser"), F("Pool"))
|
||||||
|
|
||||||
@@ -360,7 +370,7 @@ MAKE_PSTR_LIST(enum_ibaLanguage_RC30, F_(german), F_(dutch))
|
|||||||
MAKE_PSTR_LIST(enum_floordrystatus, F_(off), F_(start), F_(heat), F_(hold), F_(cool), F_(end))
|
MAKE_PSTR_LIST(enum_floordrystatus, F_(off), F_(start), F_(heat), F_(hold), F_(cool), F_(end))
|
||||||
MAKE_PSTR_LIST(enum_ibaBuildingType, F_(light), F_(medium), F_(heavy)) // RC300
|
MAKE_PSTR_LIST(enum_ibaBuildingType, F_(light), F_(medium), F_(heavy)) // RC300
|
||||||
MAKE_PSTR_LIST(enum_PID, F("fast"), F_(medium), F("slow"))
|
MAKE_PSTR_LIST(enum_PID, F("fast"), F_(medium), F("slow"))
|
||||||
MAKE_PSTR_LIST(enum_wwMode, F_(off), F_(low), F_(high), F_(auto), F_(own_prog))
|
MAKE_PSTR_LIST(enum_wwMode, F_(off), F("normal"), F_(comfort), F_(auto), F_(own_prog), F_(eco))
|
||||||
MAKE_PSTR_LIST(enum_wwCircMode, F_(off), F_(on), F_(auto), F_(own_prog))
|
MAKE_PSTR_LIST(enum_wwCircMode, F_(off), F_(on), F_(auto), F_(own_prog))
|
||||||
MAKE_PSTR_LIST(enum_wwMode2, F_(off), F_(on), F_(auto))
|
MAKE_PSTR_LIST(enum_wwMode2, F_(off), F_(on), F_(auto))
|
||||||
MAKE_PSTR_LIST(enum_wwMode3, F_(on), F_(off), F_(auto))
|
MAKE_PSTR_LIST(enum_wwMode3, F_(on), F_(off), F_(auto))
|
||||||
@@ -546,6 +556,37 @@ MAKE_PSTR_LIST(electricFactor, F("electricfactor"), F("electric energy factor"))
|
|||||||
MAKE_PSTR_LIST(delayBoiler, F("delayboiler"), F("delay boiler support"))
|
MAKE_PSTR_LIST(delayBoiler, F("delayboiler"), F("delay boiler support"))
|
||||||
MAKE_PSTR_LIST(tempDiffBoiler, F("tempdiffboiler"), F("tempediff boiler support"))
|
MAKE_PSTR_LIST(tempDiffBoiler, F("tempdiffboiler"), F("tempediff boiler support"))
|
||||||
|
|
||||||
|
// alternative heatsource AM200
|
||||||
|
MAKE_PSTR_LIST(aCylTopTemp, F("cyltoptemp"), F("Zylinder oben Temperatur"))
|
||||||
|
MAKE_PSTR_LIST(aCylCenterTemp, F("cylcentertemp"), F("Zylinder mitte Temperatur"))
|
||||||
|
MAKE_PSTR_LIST(aCylBottomTemp, F("cylbottomtemp"), F("Zylinder unten Temperatur"))
|
||||||
|
MAKE_PSTR_LIST(aFlowTemp, F("altflowtemp"), F("Alternativ hs Flusstemperatur"))
|
||||||
|
MAKE_PSTR_LIST(aRetTemp, F("altrettemp"), F("Alternativ hs Rücktemperatur"))
|
||||||
|
MAKE_PSTR_LIST(sysFlowTemp, F("sysflowtemp"), F("System Flusstemperature"))
|
||||||
|
MAKE_PSTR_LIST(sysRetTemp, F("sysrettemp"), F("System Rücktemperature"))
|
||||||
|
MAKE_PSTR_LIST(valveByPass, F("valvebypass"), F("bypass Ventil"))
|
||||||
|
MAKE_PSTR_LIST(valveBuffer, F("valvebuffer"), F("Puffer Ventil"))
|
||||||
|
MAKE_PSTR_LIST(valveReturn, F("valvereturn"), F("Rückfluss Ventil"))
|
||||||
|
MAKE_PSTR_LIST(aPumpMod, F("altpumpmod"), F("Alternativ hs Pumpenmodulation"))
|
||||||
|
MAKE_PSTR_LIST(heatSource, F("heatsource"), F("Alternativ Heizung"))
|
||||||
|
|
||||||
|
MAKE_PSTR_LIST(vr2Config, F("vr2config"), F("vr2 configuration"))
|
||||||
|
MAKE_PSTR_LIST(ahsActivated, F("ahsactivated"), F("alternate heat source activation"))
|
||||||
|
MAKE_PSTR_LIST(aPumpConfig, F("apumpconfig"), F("primary pump config"))
|
||||||
|
MAKE_PSTR_LIST(aPumpSignal, F("apumpsignal"), F("output for pr1 pump"))
|
||||||
|
MAKE_PSTR_LIST(aPumpMin, F("apumpmin"), F("min output pump pr1"))
|
||||||
|
MAKE_PSTR_LIST(tempRise, F("temprise"), F("ahs return temp rise"))
|
||||||
|
MAKE_PSTR_LIST(setReturnTemp, F("setreturntemp"), F("set temp return"))
|
||||||
|
MAKE_PSTR_LIST(mixRuntime, F("mixruntime"), F("mixer run time"))
|
||||||
|
// MAKE_PSTR_LIST(setFlowTemp, F("setflowtemp"), F("set flow temp"))
|
||||||
|
MAKE_PSTR_LIST(bufBypass, F("bufbypass"), F("buffer bypass config"))
|
||||||
|
MAKE_PSTR_LIST(bufMixRuntime, F("bufmixruntime"), F("bypass mixer run time"))
|
||||||
|
MAKE_PSTR_LIST(bufConfig, F("bufconfig"), F("dhw buffer config"))
|
||||||
|
MAKE_PSTR_LIST(blockMode, F("blockmode"), F("config htg. blocking mode"))
|
||||||
|
MAKE_PSTR_LIST(blockTerm, F("blockterm"), F("config of block terminal"))
|
||||||
|
MAKE_PSTR_LIST(blockHyst, F("blockhyst"), F("hyst. for bolier block"))
|
||||||
|
MAKE_PSTR_LIST(releaseWait, F("releasewait"), F("boiler release wait time"))
|
||||||
|
|
||||||
// the following are dhw for the boiler and automatically tagged with 'ww'
|
// the following are dhw for the boiler and automatically tagged with 'ww'
|
||||||
MAKE_PSTR_LIST(wWSelTemp, F("wwseltemp"), F("gewählte Temperatur"))
|
MAKE_PSTR_LIST(wWSelTemp, F("wwseltemp"), F("gewählte Temperatur"))
|
||||||
MAKE_PSTR_LIST(wwSelTempLow, F("wwseltemplow"), F("selected lower temperature"))
|
MAKE_PSTR_LIST(wwSelTempLow, F("wwseltemplow"), F("selected lower temperature"))
|
||||||
|
|||||||
@@ -284,6 +284,14 @@ MAKE_PSTR_LIST(enum_flow, F_(off), F_(flow), F_(bufferedflow), F_(buffer), F_(la
|
|||||||
MAKE_PSTR_LIST(enum_reset, F("-"), F_(maintenance), F_(error))
|
MAKE_PSTR_LIST(enum_reset, F("-"), F_(maintenance), F_(error))
|
||||||
// MAKE_PSTR_LIST(enum_bool, F_(off), F_(on))
|
// MAKE_PSTR_LIST(enum_bool, F_(off), F_(on))
|
||||||
|
|
||||||
|
// AM200 lists
|
||||||
|
MAKE_PSTR_LIST(enum_vr2Config, F_(off), F("bypass"));
|
||||||
|
MAKE_PSTR_LIST(enum_aPumpSignal, F_(off), F("pwm"), F("pwm_invers"));
|
||||||
|
MAKE_PSTR_LIST(enum_bufBypass, F("no"), F_(mixer), F("valve"));
|
||||||
|
MAKE_PSTR_LIST(enum_bufConfig, F("monovalent"), F("bivalent"));
|
||||||
|
MAKE_PSTR_LIST(enum_blockMode, F_(off), F_(auto), F("blocking"));
|
||||||
|
MAKE_PSTR_LIST(enum_blockTerm, F("n_o"), F("n_c"));
|
||||||
|
|
||||||
//heatpump
|
//heatpump
|
||||||
MAKE_PSTR_LIST(enum_hpactivity, F("none"), F_(heating), F_(cooling), F("hot_water"), F("pool"))
|
MAKE_PSTR_LIST(enum_hpactivity, F("none"), F_(heating), F_(cooling), F("hot_water"), F("pool"))
|
||||||
|
|
||||||
@@ -362,7 +370,7 @@ MAKE_PSTR_LIST(enum_ibaLanguage_RC30, F_(german), F_(dutch))
|
|||||||
MAKE_PSTR_LIST(enum_floordrystatus, F_(off), F_(start), F_(heat), F_(hold), F_(cool), F_(end))
|
MAKE_PSTR_LIST(enum_floordrystatus, F_(off), F_(start), F_(heat), F_(hold), F_(cool), F_(end))
|
||||||
MAKE_PSTR_LIST(enum_ibaBuildingType, F_(light), F_(medium), F_(heavy))
|
MAKE_PSTR_LIST(enum_ibaBuildingType, F_(light), F_(medium), F_(heavy))
|
||||||
MAKE_PSTR_LIST(enum_PID, F("fast"), F_(medium), F("slow"))
|
MAKE_PSTR_LIST(enum_PID, F("fast"), F_(medium), F("slow"))
|
||||||
MAKE_PSTR_LIST(enum_wwMode, F_(off), F_(low), F_(high), F_(auto), F_(own_prog))
|
MAKE_PSTR_LIST(enum_wwMode, F_(off), F("normal"), F_(comfort), F_(auto), F_(own_prog), F_(eco))
|
||||||
MAKE_PSTR_LIST(enum_wwCircMode, F_(off), F_(on), F_(auto), F_(own_prog))
|
MAKE_PSTR_LIST(enum_wwCircMode, F_(off), F_(on), F_(auto), F_(own_prog))
|
||||||
MAKE_PSTR_LIST(enum_wwMode2, F_(off), F_(on), F_(auto))
|
MAKE_PSTR_LIST(enum_wwMode2, F_(off), F_(on), F_(auto))
|
||||||
MAKE_PSTR_LIST(enum_wwMode3, F_(on), F_(off), F_(auto))
|
MAKE_PSTR_LIST(enum_wwMode3, F_(on), F_(off), F_(auto))
|
||||||
@@ -548,9 +556,26 @@ MAKE_PSTR_LIST(sysRetTemp, F("sysrettemp"), F("system return temperature"))
|
|||||||
MAKE_PSTR_LIST(valveByPass, F("valvebypass"), F("bypass valve"))
|
MAKE_PSTR_LIST(valveByPass, F("valvebypass"), F("bypass valve"))
|
||||||
MAKE_PSTR_LIST(valveBuffer, F("valvebuffer"), F("buffer valve"))
|
MAKE_PSTR_LIST(valveBuffer, F("valvebuffer"), F("buffer valve"))
|
||||||
MAKE_PSTR_LIST(valveReturn, F("valvereturn"), F("return valve"))
|
MAKE_PSTR_LIST(valveReturn, F("valvereturn"), F("return valve"))
|
||||||
MAKE_PSTR_LIST(aPump, F("altpump"), F("alternative hs pump"))
|
MAKE_PSTR_LIST(aPumpMod, F("altpumpmod"), F("alternative hs pump modulation"))
|
||||||
MAKE_PSTR_LIST(heatSource, F("heatsource"), F("alternative heating active"))
|
MAKE_PSTR_LIST(heatSource, F("heatsource"), F("alternative heating active"))
|
||||||
|
|
||||||
|
MAKE_PSTR_LIST(vr2Config, F("vr2config"), F("vr2 configuration"))
|
||||||
|
MAKE_PSTR_LIST(ahsActivated, F("ahsactivated"), F("alternate heat source activation"))
|
||||||
|
MAKE_PSTR_LIST(aPumpConfig, F("apumpconfig"), F("primary pump config"))
|
||||||
|
MAKE_PSTR_LIST(aPumpSignal, F("apumpsignal"), F("output for pr1 pump"))
|
||||||
|
MAKE_PSTR_LIST(aPumpMin, F("apumpmin"), F("min output pump pr1"))
|
||||||
|
MAKE_PSTR_LIST(tempRise, F("temprise"), F("ahs return temp rise"))
|
||||||
|
MAKE_PSTR_LIST(setReturnTemp, F("setreturntemp"), F("set temp return"))
|
||||||
|
MAKE_PSTR_LIST(mixRuntime, F("mixruntime"), F("mixer run time"))
|
||||||
|
// MAKE_PSTR_LIST(setFlowTemp, F("setflowtemp"), F("set flow temp"))
|
||||||
|
MAKE_PSTR_LIST(bufBypass, F("bufbypass"), F("buffer bypass config"))
|
||||||
|
MAKE_PSTR_LIST(bufMixRuntime, F("bufmixruntime"), F("bypass mixer run time"))
|
||||||
|
MAKE_PSTR_LIST(bufConfig, F("bufconfig"), F("dhw buffer config"))
|
||||||
|
MAKE_PSTR_LIST(blockMode, F("blockmode"), F("config htg. blocking mode"))
|
||||||
|
MAKE_PSTR_LIST(blockTerm, F("blockterm"), F("config of block terminal"))
|
||||||
|
MAKE_PSTR_LIST(blockHyst, F("blockhyst"), F("hyst. for bolier block"))
|
||||||
|
MAKE_PSTR_LIST(releaseWait, F("releasewait"), F("boiler release wait time"))
|
||||||
|
|
||||||
// the following are dhw for the boiler and automatically tagged with 'ww'
|
// the following are dhw for the boiler and automatically tagged with 'ww'
|
||||||
MAKE_PSTR_LIST(wwSelTemp, F("wwseltemp"), F("selected temperature"))
|
MAKE_PSTR_LIST(wwSelTemp, F("wwseltemp"), F("selected temperature"))
|
||||||
MAKE_PSTR_LIST(wwSelTempLow, F("wwseltemplow"), F("selected lower temperature"))
|
MAKE_PSTR_LIST(wwSelTempLow, F("wwseltemplow"), F("selected lower temperature"))
|
||||||
@@ -652,6 +677,7 @@ MAKE_PSTR_LIST(nighttemp2, F("nighttemp"), F("night temperature T1"))
|
|||||||
MAKE_PSTR_LIST(ecotemp, F("ecotemp"), F("eco temperature"))
|
MAKE_PSTR_LIST(ecotemp, F("ecotemp"), F("eco temperature"))
|
||||||
MAKE_PSTR_LIST(manualtemp, F("manualtemp"), F("manual temperature"))
|
MAKE_PSTR_LIST(manualtemp, F("manualtemp"), F("manual temperature"))
|
||||||
MAKE_PSTR_LIST(tempautotemp, F("tempautotemp"), F("temporary set temperature automode"))
|
MAKE_PSTR_LIST(tempautotemp, F("tempautotemp"), F("temporary set temperature automode"))
|
||||||
|
MAKE_PSTR_LIST(remoteseltemp, F("remoteseltemp"), F("temporary set temperature from remote"))
|
||||||
MAKE_PSTR_LIST(comforttemp, F("comforttemp"), F("comfort temperature"))
|
MAKE_PSTR_LIST(comforttemp, F("comforttemp"), F("comfort temperature"))
|
||||||
MAKE_PSTR_LIST(summertemp, F("summertemp"), F("summer temperature"))
|
MAKE_PSTR_LIST(summertemp, F("summertemp"), F("summer temperature"))
|
||||||
MAKE_PSTR_LIST(designtemp, F("designtemp"), F("design temperature"))
|
MAKE_PSTR_LIST(designtemp, F("designtemp"), F("design temperature"))
|
||||||
|
|||||||
@@ -233,8 +233,8 @@ void RxService::add(uint8_t * data, uint8_t length) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add empty telegram to rx-queue
|
// add empty telegram to rx-queue
|
||||||
void RxService::add_empty(const uint8_t src, const uint8_t dest, const uint16_t type_id) {
|
void RxService::add_empty(const uint8_t src, const uint8_t dest, const uint16_t type_id, uint8_t offset) {
|
||||||
auto telegram = std::make_shared<Telegram>(Telegram::Operation::RX, src, dest, type_id, 0, nullptr, 0);
|
auto telegram = std::make_shared<Telegram>(Telegram::Operation::RX, src, dest, type_id, offset, nullptr, 0);
|
||||||
// only if queue is not full
|
// only if queue is not full
|
||||||
if (rx_telegrams_.size() < MAX_RX_TELEGRAMS) {
|
if (rx_telegrams_.size() < MAX_RX_TELEGRAMS) {
|
||||||
rx_telegrams_.emplace_back(rx_telegram_id_++, std::move(telegram)); // add to queue
|
rx_telegrams_.emplace_back(rx_telegram_id_++, std::move(telegram)); // add to queue
|
||||||
@@ -585,20 +585,23 @@ void TxService::send_raw(const char * telegram_data) {
|
|||||||
void TxService::retry_tx(const uint8_t operation, const uint8_t * data, const uint8_t length) {
|
void TxService::retry_tx(const uint8_t operation, const uint8_t * data, const uint8_t length) {
|
||||||
// have we reached the limit? if so, reset count and give up
|
// have we reached the limit? if so, reset count and give up
|
||||||
if (++retry_count_ > MAXIMUM_TX_RETRIES) {
|
if (++retry_count_ > MAXIMUM_TX_RETRIES) {
|
||||||
reset_retry_count(); // give up
|
reset_retry_count(); // give up
|
||||||
|
EMSESP::wait_validate(0); // do not wait for validation
|
||||||
if (operation == Telegram::Operation::TX_READ) {
|
if (operation == Telegram::Operation::TX_READ) {
|
||||||
|
if (telegram_last_->offset > 0) { // ignore errors for higher offsets
|
||||||
|
LOG_DEBUG(F("Last Tx Read operation failed after %d retries. Ignoring request: %s"), MAXIMUM_TX_RETRIES, telegram_last_->to_string().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
increment_telegram_read_fail_count(); // another Tx fail
|
increment_telegram_read_fail_count(); // another Tx fail
|
||||||
} else {
|
} else {
|
||||||
increment_telegram_write_fail_count(); // another Tx fail
|
increment_telegram_write_fail_count(); // another Tx fail
|
||||||
}
|
}
|
||||||
EMSESP::wait_validate(0); // do not wait for validation
|
|
||||||
|
|
||||||
LOG_ERROR(F("Last Tx %s operation failed after %d retries. Ignoring request: %s"),
|
LOG_ERROR(F("Last Tx %s operation failed after %d retries. Ignoring request: %s"),
|
||||||
(operation == Telegram::Operation::TX_WRITE) ? F("Write") : F("Read"),
|
(operation == Telegram::Operation::TX_WRITE) ? F("Write") : F("Read"),
|
||||||
MAXIMUM_TX_RETRIES,
|
MAXIMUM_TX_RETRIES,
|
||||||
telegram_last_->to_string().c_str());
|
telegram_last_->to_string().c_str());
|
||||||
if (operation == Telegram::Operation::TX_READ) {
|
if (operation == Telegram::Operation::TX_READ) {
|
||||||
EMSESP::rxservice_.add_empty(telegram_last_->dest, telegram_last_->src, telegram_last_->type_id);
|
EMSESP::rxservice_.add_empty(telegram_last_->dest, telegram_last_->src, telegram_last_->type_id, telegram_last_->offset);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ class RxService : public EMSbus {
|
|||||||
|
|
||||||
void loop();
|
void loop();
|
||||||
void add(uint8_t * data, uint8_t length);
|
void add(uint8_t * data, uint8_t length);
|
||||||
void add_empty(const uint8_t src, const uint8_t dst, const uint16_t type_id);
|
void add_empty(const uint8_t src, const uint8_t dst, const uint16_t type_id, uint8_t offset);
|
||||||
|
|
||||||
uint32_t telegram_count() const {
|
uint32_t telegram_count() const {
|
||||||
return telegram_count_;
|
return telegram_count_;
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
#define EMSESP_APP_VERSION "3.4.2b4"
|
#define EMSESP_APP_VERSION "3.4.2b5"
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ void WebDataService::core_data(AsyncWebServerRequest * request) {
|
|||||||
// sensors stuff
|
// sensors stuff
|
||||||
root["active_sensors"] = EMSESP::dallassensor_.no_sensors() + (EMSESP::analogsensor_.analog_enabled() ? EMSESP::analogsensor_.no_sensors() : 0);
|
root["active_sensors"] = EMSESP::dallassensor_.no_sensors() + (EMSESP::analogsensor_.analog_enabled() ? EMSESP::analogsensor_.no_sensors() : 0);
|
||||||
root["analog_enabled"] = EMSESP::analogsensor_.analog_enabled();
|
root["analog_enabled"] = EMSESP::analogsensor_.analog_enabled();
|
||||||
|
root["connected"] = EMSESP::bus_status() != 2;
|
||||||
|
|
||||||
response->setLength();
|
response->setLength();
|
||||||
request->send(response);
|
request->send(response);
|
||||||
|
|||||||
@@ -107,10 +107,10 @@ StateUpdateResult WebSettings::update(JsonObject & root, WebSettings & settings)
|
|||||||
check_flag(prev, settings.tx_mode, ChangeFlags::UART);
|
check_flag(prev, settings.tx_mode, ChangeFlags::UART);
|
||||||
prev = settings.rx_gpio;
|
prev = settings.rx_gpio;
|
||||||
settings.rx_gpio = root["rx_gpio"] | default_rx_gpio;
|
settings.rx_gpio = root["rx_gpio"] | default_rx_gpio;
|
||||||
check_flag(prev, settings.rx_gpio, ChangeFlags::UART);
|
check_flag(prev, settings.rx_gpio, ChangeFlags::RESTART);
|
||||||
prev = settings.tx_gpio;
|
prev = settings.tx_gpio;
|
||||||
settings.tx_gpio = root["tx_gpio"] | default_tx_gpio;
|
settings.tx_gpio = root["tx_gpio"] | default_tx_gpio;
|
||||||
check_flag(prev, settings.tx_gpio, ChangeFlags::UART);
|
check_flag(prev, settings.tx_gpio, ChangeFlags::RESTART);
|
||||||
|
|
||||||
// syslog
|
// syslog
|
||||||
prev = settings.syslog_enabled;
|
prev = settings.syslog_enabled;
|
||||||
|
|||||||
Reference in New Issue
Block a user