diff --git a/CHANGELOG_LATEST.md b/CHANGELOG_LATEST.md index fc54412d7..e25ea5919 100644 --- a/CHANGELOG_LATEST.md +++ b/CHANGELOG_LATEST.md @@ -24,4 +24,6 @@ This release is based on the latest Espressif/Arduino core version 3. It brings - network fallback to AP only after start [#3090](https://github.com/emsesp/EMS-ESP32/issues/3090) - replaced Web async-validator with custom validator and toast with native snackbar to reduce bundle size - Gateway and Connect devices are shown in the Devices page, but disabled [3126](https://github.com/emsesp/EMS-ESP32/discussions/3126) +- show control setting only for master thermostats (0x10) [#3173](https://github.com/emsesp/EMS-ESP32/issues/3173) +- remove devices without entities not listed in 0x07 telegram diff --git a/docs/Modbus-Entity-Registers.md b/docs/Modbus-Entity-Registers.md index 16acac21c..ecd5de715 100644 --- a/docs/Modbus-Entity-Registers.md +++ b/docs/Modbus-Entity-Registers.md @@ -5966,7 +5966,6 @@ uint8 | hc1.roomtempdiff | room temp difference | uint8 (>=0<=0) | K | true | HC | 42 | 1 | 1 | uint8 | hc1.hpminflowtemp | HP min. flow temp. | uint8 (>=0<=0) | C | true | HC | 43 | 1 | 1 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | uint8 | hc1.heatondelay | heat-on delay | uint8 (>=1<=48) | hours | true | HC | 47 | 1 | 1 | uint8 @@ -6116,7 +6115,6 @@ uint8 | hc1.roomtempdiff | room temp difference | uint8 (>=0<=0) | K | true | HC | 42 | 1 | 1 | uint8 | hc1.hpminflowtemp | HP min. flow temp. | uint8 (>=0<=0) | C | true | HC | 43 | 1 | 1 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.remotehum | room humidity from remote | cmd | % | true | HC | 46 | 1 | 1 | uint8 @@ -6283,7 +6281,6 @@ uint8 | hc1.roomtempdiff | room temp difference | uint8 (>=0<=0) | K | true | HC | 42 | 1 | 1 | uint8 | hc1.hpminflowtemp | HP min. flow temp. | uint8 (>=0<=0) | C | true | HC | 43 | 1 | 1 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.remotehum | room humidity from remote | cmd | % | true | HC | 46 | 1 | 1 | uint8 @@ -6806,7 +6803,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -6867,7 +6863,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -6926,7 +6921,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -6985,7 +6979,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7046,7 +7039,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7107,7 +7099,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7166,7 +7157,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7227,7 +7217,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7286,7 +7275,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7345,7 +7333,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | @@ -7406,7 +7393,6 @@ uint8 | hc1.ecotemp | eco temperature | uint8 (>=0<=0) | C | true | HC | 5 | 1 | 1/2 | int8 | hc1.nofrosttemp | nofrost temperature | int8 (>=0<=0) | C | true | HC | 18 | 1 | 1/2 | -| hc1.control | control device | enum | | true | HC | 44 | 1 | 1 | | hc1.program | program | enum | | true | HC | 27 | 1 | 1 | | hc1.remotetemp | room temperature from remote | cmd | C | true | HC | 45 | 1 | 1/10 | | hc1.targetflowtemp | target flow temperature | uint8 | C | false | HC | 19 | 1 | 1 | diff --git a/docs/dump_entities.csv b/docs/dump_entities.csv index dfe195594..1214ea50e 100644 --- a/docs/dump_entities.csv +++ b/docs/dump_entities.csv @@ -4436,7 +4436,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "RC200, CW100, CR120, CR50",thermostat,157,hc1.dewoffset,dew point offset,uint8 (>=2<=10),K,true,number.thermostat_hc1_dew_point_offset,number.thermostat_hc1_dewoffset,7,1,1,41,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.roomtempdiff,room temp difference,uint8 (>=0<=0),K,true,number.thermostat_hc1_room_temp_difference,number.thermostat_hc1_roomtempdiff,7,1,1,42,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.hpminflowtemp,HP min. flow temp.,uint8 (>=0<=0),C,true,number.thermostat_hc1_HP_min._flow_temp.,number.thermostat_hc1_hpminflowtemp,7,1,1,43,1 -"RC200, CW100, CR120, CR50",thermostat,157,hc1.control,control device,enum [RC310\|RC200\|RC100\|RC100H\|TC100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.heatondelay,heat-on delay,uint8 (>=1<=48),hours,true,number.thermostat_hc1_heat-on_delay,number.thermostat_hc1_heatondelay,7,1,1,47,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.heatoffdelay,heat-off delay,uint8 (>=1<=48),hours,true,number.thermostat_hc1_heat-off_delay,number.thermostat_hc1_heatoffdelay,7,1,1,48,1 "RC200, CW100, CR120, CR50",thermostat,157,hc1.coolondelay,cooling on delay,uint8 (>=1<=48),hours,true,number.thermostat_hc1_cooling_on_delay,number.thermostat_hc1_coolondelay,7,1,1,49,1 @@ -4532,7 +4531,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.dewoffset,dew point offset,uint8 (>=2<=10),K,true,number.thermostat_hc1_dew_point_offset,number.thermostat_hc1_dewoffset,7,1,1,41,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.roomtempdiff,room temp difference,uint8 (>=0<=0),K,true,number.thermostat_hc1_room_temp_difference,number.thermostat_hc1_roomtempdiff,7,1,1,42,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.hpminflowtemp,HP min. flow temp.,uint8 (>=0<=0),C,true,number.thermostat_hc1_HP_min._flow_temp.,number.thermostat_hc1_hpminflowtemp,7,1,1,43,1 -"RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.control,control device,enum [RC310\|RC200\|RC100\|RC100H\|TC100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.remotehum,room humidity from remote,cmd [] (>=-1<=101),%,true,sensor.thermostat_hc1_room_humidity_from_remote,sensor.thermostat_hc1_remotehum,7,1,1,46,1 "RC3*0, Moduline 3000/1010H, CW400, Sense II, HPC410",thermostat,158,hc1.heatondelay,heat-on delay,uint8 (>=1<=48),hours,true,number.thermostat_hc1_heat-on_delay,number.thermostat_hc1_heatondelay,7,1,1,47,1 @@ -4639,7 +4637,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "Rego 2000/3000",thermostat,172,hc1.dewoffset,dew point offset,uint8 (>=2<=10),K,true,number.thermostat_hc1_dew_point_offset,number.thermostat_hc1_dewoffset,7,1,1,41,1 "Rego 2000/3000",thermostat,172,hc1.roomtempdiff,room temp difference,uint8 (>=0<=0),K,true,number.thermostat_hc1_room_temp_difference,number.thermostat_hc1_roomtempdiff,7,1,1,42,1 "Rego 2000/3000",thermostat,172,hc1.hpminflowtemp,HP min. flow temp.,uint8 (>=0<=0),C,true,number.thermostat_hc1_HP_min._flow_temp.,number.thermostat_hc1_hpminflowtemp,7,1,1,43,1 -"Rego 2000/3000",thermostat,172,hc1.control,control device,enum [RC310\|RC200\|RC100\|RC100H\|TC100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "Rego 2000/3000",thermostat,172,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "Rego 2000/3000",thermostat,172,hc1.remotehum,room humidity from remote,cmd [] (>=-1<=101),%,true,sensor.thermostat_hc1_room_humidity_from_remote,sensor.thermostat_hc1_remotehum,7,1,1,46,1 "Rego 2000/3000",thermostat,172,hc1.heatondelay,heat-on delay,uint8 (>=1<=48),hours,true,number.thermostat_hc1_heat-on_delay,number.thermostat_hc1_heatondelay,7,1,1,47,1 @@ -4983,7 +4980,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FW100",thermostat,105,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FW100",thermostat,105,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FW100",thermostat,105,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FW100",thermostat,105,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FW100",thermostat,105,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FW100",thermostat,105,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FW100",thermostat,105,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5022,7 +5018,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FW200",thermostat,106,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FW200",thermostat,106,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FW200",thermostat,106,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FW200",thermostat,106,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FW200",thermostat,106,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FW200",thermostat,106,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FW200",thermostat,106,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5059,7 +5054,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FR100",thermostat,107,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FR100",thermostat,107,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FR100",thermostat,107,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FR100",thermostat,107,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FR100",thermostat,107,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FR100",thermostat,107,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FR100",thermostat,107,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5096,7 +5090,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FR110",thermostat,108,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FR110",thermostat,108,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FR110",thermostat,108,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FR110",thermostat,108,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FR110",thermostat,108,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FR110",thermostat,108,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FR110",thermostat,108,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5135,7 +5128,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FB10",thermostat,109,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FB10",thermostat,109,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FB10",thermostat,109,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FB10",thermostat,109,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FB10",thermostat,109,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FB10",thermostat,109,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FB10",thermostat,109,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5174,7 +5166,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FB100",thermostat,110,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FB100",thermostat,110,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FB100",thermostat,110,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FB100",thermostat,110,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FB100",thermostat,110,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FB100",thermostat,110,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FB100",thermostat,110,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5211,7 +5202,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FR10",thermostat,111,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FR10",thermostat,111,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FR10",thermostat,111,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FR10",thermostat,111,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FR10",thermostat,111,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FR10",thermostat,111,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FR10",thermostat,111,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5250,7 +5240,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FW500",thermostat,116,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FW500",thermostat,116,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FW500",thermostat,116,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FW500",thermostat,116,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FW500",thermostat,116,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FW500",thermostat,116,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FW500",thermostat,116,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5287,7 +5276,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FR50",thermostat,147,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FR50",thermostat,147,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FR50",thermostat,147,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FR50",thermostat,147,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FR50",thermostat,147,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FR50",thermostat,147,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FR50",thermostat,147,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5324,7 +5312,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FR120",thermostat,191,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FR120",thermostat,191,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FR120",thermostat,191,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FR120",thermostat,191,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FR120",thermostat,191,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FR120",thermostat,191,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FR120",thermostat,191,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 @@ -5363,7 +5350,6 @@ device name,device type,product id,shortname,fullname,type [options...] \| (min/ "FW120",thermostat,192,hc1.heattemp,heat temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_heat_temperature,number.thermostat_hc1_heattemp,7,1,1/2,205,1 "FW120",thermostat,192,hc1.ecotemp,eco temperature,uint8 (>=0<=0),C,true,number.thermostat_hc1_eco_temperature,number.thermostat_hc1_ecotemp,7,1,1/2,5,1 "FW120",thermostat,192,hc1.nofrosttemp,nofrost temperature,int8 (>=0<=0),C,true,number.thermostat_hc1_nofrost_temperature,number.thermostat_hc1_nofrosttemp,7,1,1/2,18,1 -"FW120",thermostat,192,hc1.control,control device,enum [off\|FB10\|FB100] (>=0<=0), ,true,select.thermostat_hc1_control_device,select.thermostat_hc1_control,7,1,1,44,1 "FW120",thermostat,192,hc1.program,program,enum [prog a\|prog b\|prog c\|prog d\|prog e\|prog f] (>=0<=0), ,true,select.thermostat_hc1_program,select.thermostat_hc1_program,7,1,1,27,1 "FW120",thermostat,192,hc1.remotetemp,room temperature from remote,cmd [] (>=-1<=101),C,true,sensor.thermostat_hc1_room_temperature_from_remote,sensor.thermostat_hc1_remotetemp,7,1,1/10,45,1 "FW120",thermostat,192,hc1.targetflowtemp,target flow temperature,uint8,C,false,sensor.thermostat_hc1_target_flow_temperature,sensor.thermostat_hc1_targetflowtemp,7,1,1,19,1 diff --git a/src/core/emsdevice.cpp b/src/core/emsdevice.cpp index 45ce91ab9..409d26bf5 100644 --- a/src/core/emsdevice.cpp +++ b/src/core/emsdevice.cpp @@ -693,6 +693,10 @@ void EMSdevice::erase_device_values() { } } devicevalues_.clear(); + telegram_functions_.clear(); + handlers_ignored_.clear(); + handlers_config_.clear(); + handlers_broadcasted_.clear(); } // single list of options diff --git a/src/core/emsesp.cpp b/src/core/emsesp.cpp index a117f0cfe..7e7e2461c 100644 --- a/src/core/emsesp.cpp +++ b/src/core/emsesp.cpp @@ -173,12 +173,25 @@ uint8_t EMSESP::device_id_from_cmd(const uint8_t device_type, const char * cmd, return 0; } -// clears list of recognized devices -void EMSESP::clear_all_devices() { - // temporarily removed: clearing the list causes a crash, the associated commands and mqtt should also be removed. - // emsdevices.clear(); // remove entries, but doesn't delete actual devices +// remove a single device with all it's entities, commands, and telegrams +void EMSESP::erase_device(const uint8_t type_id) { + for (auto it = emsdevices.begin(); it < emsdevices.end(); it++) { + if ((*it)->device_id() == type_id) { + (*it)->erase_device_values(); + emsdevices.erase(it); + break; + } + } } + // clears list of recognized devices, entities and telegrams + void EMSESP::clear_all_devices() { + for (auto & emsdevice : emsdevices) { + emsdevice->erase_device_values(); + } + emsdevices.clear(); + } + // called from EMSdevice/Command whenever an entity or telegram handler is registered. // Devices reserve their value/telegram vectors generously (to avoid realloc storms while // heating circuits etc. are discovered incrementally), so once registration settles we @@ -1027,10 +1040,13 @@ void EMSESP::process_UBADevices(const std::shared_ptr & telegram if (next_byte & 0x01) { // if we haven't already detected this device, request it's version details, unless its us (EMS-ESP) // when the version info is received, it will automagically add the device - if ((device_id != EMSbus::ems_bus_id()) && !(EMSESP::device_exists(device_id))) { + if ((device_id != EMSbus::ems_bus_id()) && !(device_exists(device_id))) { LOG_DEBUG("New EMS device detected with ID 0x%02X. Requesting version information.", device_id); send_read_request(EMSdevice::EMS_TYPE_VERSION, device_id); } + } else if (device_exists(device_id) && !device_hasEntities(device_id)) { + LOG_DEBUG("Remove EMS device with ID 0x%02X", device_id); + erase_device(device_id); // } next_byte = next_byte >> 1; // advance 1 bit } @@ -1237,6 +1253,15 @@ bool EMSESP::process_telegram(const std::shared_ptr & telegram) return telegram_found; } +bool EMSESP::device_hasEntities(const uint8_t device_id) { + for (const auto & emsdevice : emsdevices) { + if (emsdevice->is_device_id(device_id) && (emsdevice->count_entities() > 0)) { + return true; + } + } + return false; // not found +} + // return true if we have this device already registered bool EMSESP::device_exists(const uint8_t device_id) { if (emsdevices.empty()) { diff --git a/src/core/emsesp.h b/src/core/emsesp.h index 2e1b37401..f8ada23c5 100644 --- a/src/core/emsesp.h +++ b/src/core/emsesp.h @@ -152,6 +152,7 @@ class EMSESP { static void send_write_request(const uint16_t type_id, const uint8_t dest, const uint8_t offset, const uint8_t value); static void send_write_request(const uint16_t type_id, const uint8_t dest, const uint8_t offset, const uint8_t value, const uint16_t validate_typeid); + static bool device_hasEntities(const uint8_t device_id); static bool device_exists(const uint8_t device_id); static void device_active(const uint8_t device_id, const bool active); static bool cmd_is_readonly(const uint8_t device_type, const uint8_t device_id, const char * cmd, const int8_t id); @@ -238,6 +239,7 @@ class EMSESP { static bool add_device(const uint8_t device_id, const uint8_t product_id, const char * version, const uint8_t brand); static void scan_devices(); + static void erase_device(const uint8_t type_id); static void clear_all_devices(); // called whenever a device entity or telegram handler is registered, so we can diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 1f5dd994c..b8d878786 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -5180,7 +5180,7 @@ void Thermostat::register_device_values_hc(std::shared_ptrcontrol, DeviceValueType::ENUM, FL_(enum_control2), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); } else if (model == EMSdevice::EMS_DEVICE_FLAG_UI800) { register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_control3), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); - } else { + } else if (device_id() == 0x10) { // only master thermostats have control by remote register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_control1), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); } if (model != EMSdevice::EMS_DEVICE_FLAG_RC100 && model != EMSdevice::EMS_DEVICE_FLAG_CR120) { @@ -5484,7 +5484,9 @@ void Thermostat::register_device_values_hc(std::shared_ptrcontrol, DeviceValueType::ENUM, FL_(enum_j_control), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); + if (device_id() == 0x10) { // only master thermostats have control by remote + register_device_value(tag, &hc->control, DeviceValueType::ENUM, FL_(enum_j_control), FL_(control), DeviceValueUOM::NONE, MAKE_CF_CB(set_control)); + } register_device_value(tag, &hc->program, DeviceValueType::ENUM, FL_(enum_progMode4), FL_(program), DeviceValueUOM::NONE, MAKE_CF_CB(set_program)); register_device_value(tag, &hc->remotetemp, diff --git a/src/emsesp_version.h b/src/emsesp_version.h index 0aea80b67..1f2b49104 100644 --- a/src/emsesp_version.h +++ b/src/emsesp_version.h @@ -1 +1 @@ -#define EMSESP_APP_VERSION "3.9.0-dev.0" +#define EMSESP_APP_VERSION "3.9.0-dev.1"