mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 09:19:51 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
@@ -672,12 +672,12 @@ void Solar::process_SM100Status(std::shared_ptr<const Telegram> telegram) {
|
||||
* byte 10 = PS1 Solar circuit pump for collector array 1: test=b0001(1), on=b0100(4) and off=b0011(3)
|
||||
*/
|
||||
void Solar::process_SM100Status2(std::shared_ptr<const Telegram> telegram) {
|
||||
has_bitupdate(telegram, vs1Status_, 0, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, valveStatus_, 4, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, solarPump_, 10, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, solarPump2_, 1, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, m1Valve_, 7, 2); // values 8/4 seen
|
||||
has_bitupdate(telegram, transferPump_, 11, 2); // #2212
|
||||
has_bitupdate(telegram, vs1Status_, 0, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, valveStatus_, 4, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, solarPump_, 10, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, solarPump2_, 1, 2); // on if bit 2 set
|
||||
has_bitupdate(telegram, m1Valve_, 7, 2); // values 8/4 seen
|
||||
has_bitupdate(telegram, transferPump_, 11, 2); // #2212
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1438,13 +1438,13 @@ void EMSdevice::dump_devicevalue_info() {
|
||||
Serial.print(",");
|
||||
|
||||
// modbus specific infos
|
||||
Serial.print(device_type());
|
||||
Serial.print(device_type()); // modbus unit identifier
|
||||
Serial.print(',');
|
||||
|
||||
Serial.print(dv.tag);
|
||||
Serial.print(dv.tag); // modbus block
|
||||
Serial.print(',');
|
||||
|
||||
// numeric operator -> scale factor
|
||||
// numeric operator -> modbus scale factor
|
||||
if (dv.numeric_operator == 0)
|
||||
Serial.print("1");
|
||||
else if (dv.numeric_operator > 0)
|
||||
@@ -1453,10 +1453,10 @@ void EMSdevice::dump_devicevalue_info() {
|
||||
Serial.print(-dv.numeric_operator);
|
||||
Serial.print(",");
|
||||
|
||||
Serial.printf("%d", EMSESP::modbus_->getRegisterOffset(dv));
|
||||
Serial.printf("%d", EMSESP::modbus_->getRegisterOffset(dv)); // modbus offset
|
||||
Serial.print(",");
|
||||
|
||||
Serial.printf("%d", EMSESP::modbus_->getRegisterCount(dv));
|
||||
Serial.printf("%d", EMSESP::modbus_->getRegisterCount(dv)); // modbus count
|
||||
|
||||
// /modbus specific infos
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ class DeviceValue {
|
||||
CONNECTIVITY // 27 - used in HA
|
||||
};
|
||||
|
||||
// TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp
|
||||
// TAG mapping - maps to DeviceValueTAG_s in emsdevicevalue.cpp
|
||||
enum DeviceValueTAG : int8_t {
|
||||
TAG_NONE = -1, // wild card
|
||||
TAG_DEVICE_DATA = 0,
|
||||
|
||||
@@ -354,6 +354,11 @@ void EMSESP::dump_all_entities(uuid::console::Shell & shell) {
|
||||
}
|
||||
}
|
||||
|
||||
// For a Mixer, fix device_id to 0x20 to give us all the settings
|
||||
if (device.device_type == DeviceType::MIXER) {
|
||||
device_id = 0x20; // hc
|
||||
}
|
||||
|
||||
// add the device and print out all the entities
|
||||
// for testing the mixer use ... if (device.product_id == 69) {
|
||||
emsdevices.push_back(
|
||||
@@ -393,6 +398,11 @@ void EMSESP::dump_all_telegrams(uuid::console::Shell & shell) {
|
||||
}
|
||||
}
|
||||
|
||||
// For a Mixer, fix device_id to 0x20 to give us all the settings
|
||||
if (device.device_type == DeviceType::MIXER) {
|
||||
device_id = 0x20; // hc
|
||||
}
|
||||
|
||||
// add the device and print out all the entities
|
||||
emsdevices.push_back(
|
||||
EMSFactory::add(device.device_type, device_id, device.product_id, "1.0", device.default_name, device.flags, EMSdevice::Brand::NO_BRAND));
|
||||
|
||||
@@ -231,7 +231,7 @@ MAKE_NOTRANSLATION(tpl_input4, "<inv>[<comp><aux><cool><heat><dhw><pv>]")
|
||||
MAKE_NOTRANSLATION(test_cmd, "run a test")
|
||||
#endif
|
||||
|
||||
// TAG mapping - maps to DeviceValueTAG_s in emsdevice.cpp
|
||||
// TAG mapping - maps to DeviceValueTAG_s in emsdevicevalue.cpp
|
||||
// use empty string if want to suppress showing tags
|
||||
// mqtt tags must not have spaces
|
||||
MAKE_NOTRANSLATION(tag_none, "")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "emsdevice.h"
|
||||
|
||||
/*
|
||||
* This file is auto-generated by the update_modbus_registers.sh script. Do not modify.
|
||||
* This file is auto-generated. Do not modify.
|
||||
*/
|
||||
|
||||
// clang-format off
|
||||
@@ -400,13 +400,6 @@ const std::initializer_list<Modbus::EntityModbusInfo> Modbus::modbus_register_ma
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_HC, FL_(mixerSetTime), 5, 1), // valvesettime
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_HC, FL_(flowTempVf), 6, 1), // flowtempvf
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_HC, FL_(flowtempoffset), 7, 1), // flowtempoffset
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(flowTempHc), 0, 1), // flowtemphc
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(valveStatus), 1, 1), // valvestatus
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(flowSetTemp), 2, 1), // flowsettemp
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(wwPumpStatus), 3, 1), // pumpstatus
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(activated), 4, 1), // activated
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(mixerSetTime), 5, 1), // valvesettime
|
||||
REGISTER_MAPPING(dt::MIXER, TAG_TYPE_DHW, FL_(flowtempoffset), 6, 1), // flowtempoffset
|
||||
REGISTER_MAPPING(dt::SOLAR, TAG_TYPE_DEVICE_DATA, FL_(collectorTemp), 0, 1), // collectortemp
|
||||
REGISTER_MAPPING(dt::SOLAR, TAG_TYPE_DEVICE_DATA, FL_(cylBottomTemp), 1, 1), // cylbottomtemp
|
||||
REGISTER_MAPPING(dt::SOLAR, TAG_TYPE_DEVICE_DATA, FL_(solarPump), 2, 1), // solarpump
|
||||
@@ -536,6 +529,44 @@ const std::initializer_list<Modbus::EntityModbusInfo> Modbus::modbus_register_ma
|
||||
REGISTER_MAPPING(dt::VENTILATION, TAG_TYPE_DEVICE_DATA, FL_(ventMode), 6, 1), // ventmode
|
||||
REGISTER_MAPPING(dt::VENTILATION, TAG_TYPE_DEVICE_DATA, FL_(airquality), 7, 1), // airquality
|
||||
REGISTER_MAPPING(dt::VENTILATION, TAG_TYPE_DEVICE_DATA, FL_(airHumidity), 8, 1), // airhumidity
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(selRoomTemp), 0, 1), // seltemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwTemp), 1, 1), // temp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwCurTemp2), 2, 1), // curtemp2
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(hydrTemp), 3, 1), // hydrTemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwPump), 4, 1), // pump
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(flowtempoffset), 5, 1), // flowtempoffset
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwHystOn), 6, 1), // hyston
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwHystOff), 7, 1), // hystoff
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwDisinfectionTemp), 8, 1), // disinfectiontemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwCirc), 9, 1), // circ
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwCircMode), 10, 1), // circmode
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwTempStatus), 11, 1), // tempstatus
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwMaxTemp), 12, 1), // maxtemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwDiffTemp), 13, 1), // difftemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwRedTemp), 14, 1), // redtemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwRequiredTemp), 15, 1), // requiredtemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwTemp), 0, 1), // temp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwStorageTemp1), 1, 1), // storagetemp1
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwColdTemp), 2, 1), // coldtemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwTemp5), 3, 1), // temp5
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(retTemp), 4, 1), // rettemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwPump), 5, 1), // pump
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwMaxTemp), 6, 1), // maxtemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(selRoomTemp), 7, 1), // seltemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwRedTemp), 8, 1), // redtemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwHotTemp), 9, 1), // hottemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwDailyTemp), 10, 1), // dailytemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwDisinfectionTemp), 11, 1), // disinfectiontemp
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwCirc), 12, 1), // circ
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwCircMode), 13, 1), // circmode
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwCircTc), 14, 1), // circtc
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwKeepWarm), 15, 1), // keepwarm
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwStatus2), 16, 1), // status2
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwPumpMod), 17, 1), // pumpmod
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(wwFlow), 18, 1), // flow
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(valveReturn), 19, 1), // valvereturn
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(deltaTRet), 20, 1), // deltatret
|
||||
REGISTER_MAPPING(dt::WATER, TAG_TYPE_DHW, FL_(errorDisp), 21, 1), // errordisp
|
||||
};
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define EMSESP_APP_VERSION "3.7.1-dev.9"
|
||||
#define EMSESP_APP_VERSION "3.7.1-dev.10"
|
||||
@@ -33,7 +33,7 @@ WebAPIService::WebAPIService(AsyncWebServer * server, SecurityManager * security
|
||||
// POST|GET api/{device}/{entity}
|
||||
void WebAPIService::webAPIService(AsyncWebServerRequest * request, JsonVariant json) {
|
||||
JsonDocument input_doc; // has no body JSON so create dummy as empty input object
|
||||
JsonObject input;
|
||||
JsonObject input;
|
||||
// if no body then treat it as a secure GET
|
||||
if ((request->method() == HTTP_GET) || (!json.is<JsonObject>())) {
|
||||
// HTTP GET
|
||||
|
||||
Reference in New Issue
Block a user