emsesp / EMS-ESP

ESP8266 firmware to read and control EMS and Heatronic compatible equipment such as boilers, thermostats, solar modules, and heat pumps
https://emsesp.github.io/docs
GNU Lesser General Public License v3.0
303 stars 97 forks source link

Control both HC1 & HC2 at the same time in Home Assistant (MQTT) #162

Closed Frederik-V closed 4 years ago

Frederik-V commented 5 years ago

I'm pretty new on this fora and starting to explore the possibilities of the EMS-ESP. On top, I'm a Home Assistant (HA) user in order to control my home domotica.

I was very enthusiastic to read on the fora that it is possible to control the 2 heating circuits. I'm using HC1 for radiators in the bedrooms & bathroom (level 1), HC2 as floor heating (level 0).

Is there a possibility to control both Heating Circuits at the same time with MQTT? Meaning, having two thermostat control systems in the Home Assistant GUI. Now you need to switch all the time between the Heating Circuits in order to read out the temperature and the heating settings.

majdzik84 commented 5 years ago

OK

proddy commented 5 years ago

I added some thoughts to the wiki here. Once I know how to decipher these telegrams I can implement it correctly. Could you help?

proddy commented 5 years ago

I think I found what is wrong. I'll work on a test build

majdzik84 commented 5 years ago

Great . I was preparing psychologically to decipher the telegrams :)

proddy commented 5 years ago

my thinking is that I use the 3E monitor telegram for only reading the current room temperature from the thermostat. And use the 3D working mode telegram for bringing back the setpoint temps for night, day and holiday modes.

I'm just not sure about what happens when you manually override and set a temp. You'll need to try the latest build and show me some 3E/3D messages on HC1 so I can see.

majdzik84 commented 5 years ago

After uploading the latest compilation I can no longer see setpoint temperature. I see "Program is set to summer mode. 1

I use HC2

(00:12:06.749) Thermostat -> all, type 0x3E, telegram: 10 00 3E 00 04 03 00 7D 0                          0 00 00 00 00 00 00 00 00 11 05 00 (CRC=0B) #data=16
(00:14:09.996) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 (CRC=63) #data=16
(00:14:10.904) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2D 39 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=40) #data=27
(00:14:11.371) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 E4 00 00 00 00 00 00 00 00 11 05 00 (CRC=CB) #data=16

(00:14:09.996) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 (CRC=63) #data=16
(00:14:10.904) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2D 39 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=40) #data=27
(00:14:11.371) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 E4 00 00 00 00 00 00 00 00 11 05 00 (CRC=CB) #data=16

After setting the temperature manually no rc35 to 14C

(00:02:01.808) Thermostat -> all, type 0x48, telegram: 10 00 48 00 04 13 1C 00 E4 00 00 00 00 00 00 00 64 11 0F 00 (CRC=01) #data=16
(00:02:02.305) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 (CRC=63) #data=16
(00:02:02.463) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2D 39 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=40) #data=27

(00:03:52.305) Thermostat -> all, type 0x3E, telegram: 10 00 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 (CRC=0B) #data=16

(00:01:02.598) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 (CRC=63) #data=16
Publishing boiler data via MQTT
(00:01:02.879) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2D 39 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=40) #data=27
(00:01:03.473) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 13 1C 00 E5 00 00 00 00 00 00 00 64 11 0F 00 (CRC=A1) #data=16
proddy commented 5 years ago

yes I extended to add the mode to summer, holiday etc. No idea if it works since I don't own a RC35 - does that make sense? Is program the correct naming for it?

As for the setpoint, I found no reliable way to determine this, and then thought since there are already 3 setpoint defined (day, night, vacation) just use them. Does this make sense too?

proddy commented 5 years ago

can you tell me what the values for setpoint and current room temps should be for HC1 and HC2? Its hard to figure out your exact environment. What do you expect to see?

majdzik84 commented 5 years ago

It seems to me that the summer / winter operation mode will not work in this situation.

What I would like to get is for sure the Setpoint temperature value for Home Assistant to display it on the thermostat.

I'm only interested in the HC2 circuit because it supports the floor installation. HC1 supports standard heaters where I adjust the thermostatic heads.

On RC35 you can set the temperature: Day, Night and in automatic mode it switches by itself. The setpoint temperature at a given moment is Day or Night. When we change the temperature in automatic mode (regardless of whether auto-day or auto-night) it only changes in setpoint temperature (not in day-temp / night-temp). When switching to the next time of the auto mode (i.e. from auto-day to auto-night or vice versa), the time set by us is deleted and the day or night temperature is displayed.

Example - my HC2: Standard Auto-DAY Setpoint room temperature: 20 C Current room temperature: 22 C Day temperature: 20 C Night temperature: 15 C

When I change the temperature value to 25 C i get

Setpoint room temperature: 25 C Current room temperature: 22 C Day temperature: 20 C Night temperature: 15 C

Setpoint temperature will be valid until the next switching point to auto-night

Standard Auto-NIGHT Setpoint room temperature: 15 C Current room temperature: 22 C Day temperature: 20 C Night temperature: 15 C

the pre-set temperature of 25C is deleted (it does not permanently change any set value such as day-temp, night-temp)

proddy commented 5 years ago

its still a puzzle to me.

Some of the telegrams you posted still confuse me, for example Thermostat -> all, type 0x3E, telegram: 10 00 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 which basically says HC1 has a setpoint temp of 0.0C and no room temp available

and

Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 E4 00 00 00 00 00 00 00 00 11 05 00 which says HC2 has a setpoint temp of 0.0 C and a room temp of 22.8 C

it's baffling me! Anyway I reverted the last changes and made it so it only responds to broadcasts. I'm away this weekend so will continue next week. If you have any smart thoughts do let me know :-)

majdzik84 commented 5 years ago

I don't think you should look at my HC1. It is not controlled by RC35 only by thermostats on the radiator (only the heating curve is set).So it is not surprising that you cannot see the current temperature.

I'm just thinking. Are the values ​​at the set temperature correct, even 0.0C in automatic mode?

Look:

We have 3 variables at the moment.

  1. Day temp.
  2. Night temp.
  3. Auto temp. (let's take that name)

0x48, telegram: 10 00 48 00 04 13 1C 00 E4 00 00 00 00 00 00 00 64 11 0F 00 (CRC=01) #data=16 Does this telegram contain setpoint temperature 14C?

Could it be possible to make dependencies in the auto mode, e.g. If setpoint temp. = 0.0C show temperature day or night. If setpoint temp > 0.0C show auto temp.

In this case, the setpoint temperature would always have a value. In the home assistant on the thermostat the set temperature would be visible.

majdzik84 commented 5 years ago

1 AUTO -DAY

(00:03:14.981) Thermostat -> all, type 0x48, telegram: 10 00 48 00 04 03 00 00 EC 0       0 00 00 00 00 00 00 00 11 05 00 (CRC=B5) #data=16

(00:04:11.355) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 EC 00 00 00 00 00 00 00 00 11 05 00 (CRC=DD) #data=16

(00:06:10.259) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2D 39 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=40) #data=27

After setting the temperature manually no rc35 to 14C -

2

(00:08:12.601) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 13 1C 00 EC 00 00 00 00 00 00 00 64 11 0F 00 (CRC=7F) #data=16
(00:08:12.007) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2D 39 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=40) #data=27
proddy commented 5 years ago

yup, there it is again in Day-mode with:

10 0B 48 00 04 03 00 00 EC 00 00 00 00 00 00 00 00 11 05 00

the 7th byte after the 03 is the setpoint which is 0 again. I need to figure the logic on when to ignore it and it must have something to the bit masks in the first 2 bytes (04 03). Unfortunately there is very little documentation on this so it'll be trial and error.

proddy commented 5 years ago

something like look at bit 5 of the 6th bit and if its set then read the value. So 04 03 is bad and 04 13 is good. Thing is I need some more examples of x3E/x48 messages from people with an RC35 to verify this.

majdzik84 commented 5 years ago

@lmdecroos , @davidw3591, @Frederik-V, @majo551, @lobocobra Hi guys! is there a chance for little help?

lmdecroos commented 5 years ago

@proddy : yes, no problem I’m happy to help. As I’m traveling a lot these days I have limited availibilty these weeks. I should be able to do some tests from Friday onwards

Sent from my iPhone

On 30 Sep 2019, at 23:21, majdzik84 notifications@github.com wrote:

@lmdecroos , @davidw3591, @Frederik-V, @majo551, @lobocobra Hi guys! is there a chance for little help?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

lmdecroos commented 5 years ago

@proddy

I have compiled the daily build and all seems to work ok for me

[APP] EMS-ESP version: 1.9.1b11 [APP] MyESP version: 1.2.6 [APP] Build timestamp: 2019-10-04 12:22:39

Thermostat: RC35 (ProductID:86 Version:21.08) Thermostat time is 12:47:47 04/10/2019 Heating Circuit 1 Current room temperature: 18.3 C Setpoint room temperature: 15.0 C Day temperature: 19.0 C Night temperature: 15.0 C Vacation temperature: 17.0 C Mode is set to auto Heating Circuit 2 Current room temperature: 17.0 C Setpoint room temperature: 13.5 C Day temperature: 18.0 C Night temperature: 13.5 C Vacation temperature: 17.0 C Mode is set to night

(00:10:12.351) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 00 1E 00 B7 00 00 00 00 00 00 00 00 00 21 00 (CRC=E2) #data=16 (00:10:13.008) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 02 02 (CRC=BE) #data=27

(00:10:13.602) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 00 00 1B 00 A9 00 00 00 00 00 00 02 00 11 27 00 (CRC=B5) #data=16 (00:10:14.258) Thermostat -> me, type 0x47, telegram: 10 0B 47 00 01 1B 24 22 00 28 00 00 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 02 01 (CRC=BA) #data=27

(00:10:14.851) Thermostat -> me, type 0x52, telegram: 10 0B 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=B6) #data=16 (00:10:15.758) Thermostat -> me, type 0x51, telegram: 10 0B 51 00 00 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=77) #data=27 (00:10:16.351) Thermostat -> me, type 0x5C, telegram: 10 0B 5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=C0) #data=16 (00:10:17.008) Thermostat -> me, type 0x5B, telegram: 10 0B 5B 00 00 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=05) #data=27 (00:10:17.582) Thermostat -> me, type 0x06, telegram: 10 0B 06 00 13 0A 0C 04 26 31 04 01 (CRC=F9) #data=8 (00:10:18.847) Thermostat -> all, type 0xA3, telegram: 10 00 A3 00 6E 11 00 00 B7 00 BD 00 BD 7D 00 7D 00 (CRC=ED) #data=13

(00:10:27.438) Thermostat -> 0x11, type 0x9D, telegram: 10 11 9D 00 00 (CRC=D7) #data=1 (00:10:31.472) Thermostat -> all, type 0xA2, telegram: 10 00 A2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=99) #data=14 (00:10:34.937) Thermostat -> Boiler, type 0x14, telegram: 10 88 14 00 03 (CRC=6E) #data=1 (00:10:34.959) Boiler -> Thermostat, type 0x14, telegram: 08 10 14 00 33 18 61 (CRC=C4) #data=3 (00:10:35.583) Thermostat -> all, type 0x06, telegram: 10 00 06 00 13 0A 0C 04 27 07 04 01 (CRC=8E) #data=8 (00:10:45.226) Thermostat -> all, type 0x3E, telegram: 10 00 3E 00 04 00 1E 00 B7 00 00 00 00 00 00 00 00 00 05 00 (CRC=C2) #data=16

(00:10:50.069) Thermostat -> 0x21, type 0xAC, telegram: 10 21 AC 00 27 64 01 (CRC=4F) #data=3 (00:10:52.064) Thermostat -> Boiler, type 0x35, telegram: 10 08 35 00 11 01 (CRC=20) #data=2 (00:10:53.693) Thermostat -> Boiler, type 0x1A, telegram: 10 08 1A 00 00 00 00 00 (CRC=91) #data=4 (00:10:57.602) Thermostat -> all, type 0x48, telegram: 10 00 48 00 00 00 1B 00 AA 00 00 00 00 00 00 02 00 11 27 00 (CRC=9C) #data=16

(00:11:12.975) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 00 1E 00 B7 00 00 00 00 00 00 00 00 00 05 00 (CRC=AA) #data=16 (00:11:13.632) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 02 02 (CRC=BE) #data=27

(00:11:14.225) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 00 00 1B 00 AA 00 00 00 00 00 00 02 00 11 27 00 (CRC=F4) #data=16 (00:11:14.882) Thermostat -> me, type 0x47, telegram: 10 0B 47 00 01 1B 24 22 00 28 00 00 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 02 01 (CRC=BA) #data=27

(00:11:15.601) Thermostat -> me, type 0x52, telegram: 10 0B 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=B6) #data=16 (00:11:16.257) Thermostat -> me, type 0x51, telegram: 10 0B 51 00 00 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=77) #data=27 (00:11:16.850) Thermostat -> me, type 0x5C, telegram: 10 0B 5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=C0) #data=16 (00:11:17.507) Thermostat -> me, type 0x5B, telegram: 10 0B 5B 00 00 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=05) #data=27 (00:11:18.081) Thermostat -> me, type 0x06, telegram: 10 0B 06 00 13 0A 0C 04 27 31 04 01 (CRC=F1) #data=8 (00:11:19.596) Thermostat -> all, type 0xA3, telegram: 10 00 A3 00 6E 11 00 00 B7 00 BD 00 BD 7D 00 7D 00 (CRC=ED) #data=13

(00:11:27.812) Thermostat -> 0x11, type 0x9D, telegram: 10 11 9D 00 00 (CRC=D7) #data=1 (00:11:36.331) Thermostat -> all, type 0x06, telegram: 10 00 06 00 13 0A 0C 04 28 07 04 01 (CRC=F6) #data=8 (00:11:45.725) Thermostat -> all, type 0x3E, telegram: 10 00 3E 00 04 00 1E 00 B7 00 00 00 00 00 00 00 00 00 05 00 (CRC=C2) #data=16

(00:11:50.568) Thermostat -> 0x21, type 0xAC, telegram: 10 21 AC 00 27 64 01 (CRC=4F) #data=3 (00:11:51.943) Thermostat -> 0x21, type 0xAC, telegram: 10 21 AC 00 05 00 01 (CRC=0F) #data=3 (00:11:52.688) Thermostat -> Boiler, type 0x35, telegram: 10 08 35 00 11 01 (CRC=20) #data=2 (00:11:53.942) Thermostat -> Boiler, type 0x1A, telegram: 10 08 1A 00 00 00 00 00 (CRC=91) #data=4 (00:11:57.850) Thermostat -> all, type 0x48, telegram: 10 00 48 00 00 00 1B 00 AA 00 00 00 00 00 00 02 00 11 05 00 (CRC=D8) #data=16

(00:12:10.973) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 00 1E 00 B7 00 00 00 00 00 00 00 00 00 05 00 (CRC=AA) #data=16 (00:12:11.380) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 02 02 (CRC=BE) #data=27

(00:12:11.974) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 00 00 1B 00 AA 00 00 00 00 00 00 02 00 11 05 00 (CRC=B0) #data=16 (00:12:12.631) Thermostat -> me, type 0x47, telegram: 10 0B 47 00 01 1B 24 22 00 28 00 00 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 02 01 (CRC=BA) #data=27

(00:12:13.224) Thermostat -> me, type 0x52, telegram: 10 0B 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=B6) #data=16 (00:12:13.881) Thermostat -> me, type 0x51, telegram: 10 0B 51 00 00 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=77) #data=27 (00:12:14.474) Thermostat -> me, type 0x5C, telegram: 10 0B 5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=C0) #data=16 (00:12:15.256) Thermostat -> me, type 0x5B, telegram: 10 0B 5B 00 00 1E 26 22 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=05) #data=27 (00:12:15.829) Thermostat -> me, type 0x06, telegram: 10 0B 06 00 13 0A 0C 04 28 2F 04 01 (CRC=F1) #data=8

My RC35 is controlling HC1 and my RC20F is controlling HC2

Previously i was running : [APP] EMS-ESP version: 1.9.1b8 [APP] MyESP version: 1.2.4 [APP] Build timestamp: 2019-09-26 22:38:44

and all values where also showing ok

During summer I turn the heating temperature on my boiler to zero, so the my heating is off ( this is also the message i get on my RC35 thermostat) When my heating is off, then the set point temperature is always 0 (zero)

Hope this helps otherwise let me know which tests and logs you need

On 1 Oct 2019, at 02:58, Luk-Marie Decroos lmd@telenet.be wrote:

@proddy : yes, no problem I’m happy to help. As I’m traveling a lot these days I have limited availibilty these weeks. I should be able to do some tests from Friday onwards

Sent from my iPhone

On 30 Sep 2019, at 23:21, majdzik84 <notifications@github.com mailto:notifications@github.com> wrote:

@lmdecroos https://github.com/lmdecroos , @davidw3591 https://github.com/davidw3591, @Frederik-V https://github.com/Frederik-V, @majo551 https://github.com/majo551, @lobocobra https://github.com/lobocobra Hi guys! is there a chance for little help?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW4455INKO4V7BBUU7ZOTQMJUVVA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD77ERDA#issuecomment-536758412, or mute the thread https://github.com/notifications/unsubscribe-auth/ANDW44424HPRX3SF3ECVGLLQMJUVVANCNFSM4IGOZDBQ.

proddy commented 5 years ago

thanks @lmdecroos for providing this - that was really useful. I think the current implementation hopefully works in all situations now. Let's see...

lmdecroos commented 5 years ago

@proddy you're welcome

As all the data in the gateway of my both HC’s are now correct, the next stap is to get both HC in domoticz :)

Until now i was using the nefit v0.0.1 plugin and today I discovered the new "ems-esp-domoticz-plugin” plugin from bbqkees

The plug-in is only monitoring and passing the data of the first HC, with a small change I’m able to pass the data from my second HC

lmd@pi01:~/Downloads/ems-esp-domoticz-plugin $ diff plugin.py plugin.py.org 287c287 < self.topics = list(["home/ems-esp/thermostat_data2", "home/ems-esp/boiler_data", "home/ems-esp/STATE"])

    self.topics = list(["home/ems-esp/thermostat_data", "home/ems-esp/boiler_data", "home/ems-esp/STATE”])

I will probably able to customise the script to monitor two HC’s , but as I’m not a programmer it would not very nice looking

Are there plans to update the plugin to pass that data from all available HC’s in the gateway to the Domoticz ?

On 4 Oct 2019, at 13:18, Proddy notifications@github.com wrote:

thanks @lmdecroos https://github.com/lmdecroos for providing this - that was really useful. I think the current implementation hopefully works in all situations now. Let's see...

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW442RNKLXGPZQQ4OIXYDQM4RB3A5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEALKX3Q#issuecomment-538356718, or mute the thread https://github.com/notifications/unsubscribe-auth/ANDW443LFEFQPYPVNK2H5ETQM4RB3ANCNFSM4IGOZDBQ.

proddy commented 5 years ago

I don't use Domoticz personally and not supporting it. bbqkees and a few others do. If you upgrade the script please do a PR.

lmdecroos commented 5 years ago

@proddy

Can you advise what that logic behind the MQTT subscriptions?

I have 2 HC’s and the gateway publishes 2 topics “thermostat_data” and “thermostat_data2” , I would expect that my first HC has topic name”thermostat_data1”. Or are you stil using topic “thermostat_data” for backwards compatibility ?

Also the payloads naming are the same between both topics. I would expect unique topics for every HC as in the "MQTT subscriptions" list

MQTT publish log: Topic:thermostat_data Payload:{"thermostat_hc":"1","thermostat_seltemp":19,"thermostat_currtemp":19.1,"thermostat_daytemp":19,"thermostat_nighttemp":15,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":32,"thermostat_mode":"auto"} Topic:thermostat_data2 Payload:{"thermostat_hc":"2","thermostat_seltemp":13.5,"thermostat_currtemp":16.3,"thermostat_daytemp":18,"thermostat_nighttemp":13.5,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"night"} Topic:start Payload:start Topic:shower_timer Payload:0 Topic:shower_alert Payload:0 Topic:boiler_data Payload:{"wWComfort":"Hot","wWSelTemp":56,"selFlowTemp":32,"selBurnPow":100,"curBurnPow":0,"pumpMod":0,"wWCurTmp":57.9,"wWCurFlow":0,"curFlowTemp":31.1,"retTemp":28.5,"sysPress":1,"boilTemp":30,"wWActivated":"on","burnGas":"off","heatPmp":"off","fanWork":"off","ignWork":"off","wWCirc":"off","wWHeat":"off","burnStarts":26163,"burnWorkMin":402742,"heatWorkMin":363359,"ServiceCode":"0Y","ServiceCodeNumber":204} Topic:tapwater_active Payload:0 Topic:heating_active Payload:0

MQTT subscriptions: Topic:home/ems-esp/thermostat_cmd_temp Topic:home/ems-esp/thermostat_cmd_mode Topic:home/ems-esp/thermostat_daytemp Topic:home/ems-esp/thermostat_nighttemp Topic:home/ems-esp/thermostat_holidayttemp Topic:home/ems-esp/thermostat_cmd_temp1 Topic:home/ems-esp/thermostat_cmd_mode1 Topic:home/ems-esp/thermostat_daytemp1 Topic:home/ems-esp/thermostat_nighttemp1 Topic:home/ems-esp/thermostat_holidayttemp1 Topic:home/ems-esp/thermostat_cmd_temp2 Topic:home/ems-esp/thermostat_cmd_mode2 Topic:home/ems-esp/thermostat_daytemp2 Topic:home/ems-esp/thermostat_nighttemp2 Topic:home/ems-esp/thermostat_holidayttemp2 Topic:home/ems-esp/thermostat_cmd_temp3 Topic:home/ems-esp/thermostat_cmd_mode3 Topic:home/ems-esp/thermostat_daytemp3 Topic:home/ems-esp/thermostat_nighttemp3 Topic:home/ems-esp/thermostat_holidayttemp3 Topic:home/ems-esp/thermostat_cmd_temp4 Topic:home/ems-esp/thermostat_cmd_mode4 Topic:home/ems-esp/thermostat_daytemp4 Topic:home/ems-esp/thermostat_nighttemp4 Topic:home/ems-esp/thermostat_holidayttemp4

On 5 Oct 2019, at 14:13, Proddy notifications@github.com wrote:

I don't use Domoticz personally and not supporting it. bbqkees and a few others do. If you upgrade the script please do a PR.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW44YZ6T34Q62DEIONRV3QNCAIFA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANRBMA#issuecomment-538644656, or mute the thread https://github.com/notifications/unsubscribe-auth/ANDW4453SXUZAQIJXUQSI73QNCAIFANCNFSM4IGOZDBQ.

proddy commented 5 years ago

yes I left the topic “thermostat_data” in for backwards compatibility, but what you just shown makes me think I got it wrong. If there is a single HC its just “thermostat_data” and if there are multiple it should be “thermostat_dataX”. I'll check the code again.

proddy commented 5 years ago

made a change in b3

lmdecroos commented 5 years ago

with b3 I have :

Topic:thermostat_data1 Payload:{"thermostat_seltemp":15,"thermostat_currtemp":19.1,"thermostat_daytemp":19,"thermostat_nighttemp":15,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"auto"} Topic:thermostat_data2 Payload:{"thermostat_seltemp":13.5,"thermostat_currtemp":16.9,"thermostat_daytemp":18,"thermostat_nighttemp":13.5,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"night”}

is this the aim or should the subscriptions also be unique ?

On 6 Oct 2019, at 21:31, Proddy notifications@github.com wrote:

made a change in b3

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW446UAPMYZHP5UWZPB2DQNI4HLA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOSAZY#issuecomment-538779751, or mute the thread https://github.com/notifications/unsubscribe-auth/ANDW445HPBY5MNMD46JOPKTQNI4HLANCNFSM4IGOZDBQ.

proddy commented 5 years ago

subscriptions also unique too.

lmdecroos commented 5 years ago

The topics are now correct for both HC’s but the subscriptions are not unique

Topic:thermostat_data1 Payload:{"thermostat_seltemp":15,"thermostat_currtemp":19.2,"thermostat_daytemp":19,"thermostat_nighttemp":15,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"auto"} Topic:thermostat_data2 Payload:{"thermostat_seltemp":13.5,"thermostat_currtemp":16.3,"thermostat_daytemp":18,"thermostat_nighttemp":13.5,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"night"}

testing with : [APP] EMS-ESP version: 1.9.2b4 [APP] MyESP version: 1.2.9 [APP] Build timestamp: 2019-10-10 21:48:59

On 7 Oct 2019, at 10:48, Proddy notifications@github.com wrote:

Closed #162 https://github.com/proddy/EMS-ESP/issues/162.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW444HYVNJLCT3TO62JU3QNLZVVA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUBSVITI#event-2690995277, or mute the thread https://github.com/notifications/unsubscribe-auth/ANDW446AOHRLKLSXRIH6MUDQNLZVVANCNFSM4IGOZDBQ.

proddy commented 5 years ago

Subscription is on topics, and they are unique right? Anyway I’m changing all of this to reduce the number of topics this weekend

On Thu, 10 Oct 2019 at 22:05, lmdecroos notifications@github.com wrote:

The topics are now correct for both HC’s but the subscriptions are not unique

Topic:thermostat_data1 Payload:{"thermostat_seltemp":15,"thermostat_currtemp":19.2,"thermostat_daytemp":19,"thermostat_nighttemp":15,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"auto"} Topic:thermostat_data2 Payload:{"thermostat_seltemp":13.5,"thermostat_currtemp":16.3,"thermostat_daytemp":18,"thermostat_nighttemp":13.5,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"night"}

testing with : [APP] EMS-ESP version: 1.9.2b4 [APP] MyESP version: 1.2.9 [APP] Build timestamp: 2019-10-10 21:48:59

On 7 Oct 2019, at 10:48, Proddy notifications@github.com wrote:

Closed #162 https://github.com/proddy/EMS-ESP/issues/162.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW444HYVNJLCT3TO62JU3QNLZVVA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUBSVITI#event-2690995277>, or mute the thread < https://github.com/notifications/unsubscribe-auth/ANDW446AOHRLKLSXRIH6MUDQNLZVVANCNFSM4IGOZDBQ .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=AAJMO6CUMX5UG5NGN6ZE7QTQN6DHJA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA5WKYI#issuecomment-540763489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMO6FNPBN5ULEZO4WA5DLQN6DHJANCNFSM4IGOZDBQ .

lmdecroos commented 5 years ago

HC1 is missing, only HC2 is part pf the MQTT messages

[APP] EMS-ESP version: 1.9.2b6 [APP] MyESP version: 1.2.10 [APP] Build timestamp: 2019-10-13 16:36:27

MQTT publish log: Topic:start Payload:start Topic:boiler_data Payload:{"wWComfort":"Hot","wWSelTemp":56,"wWDesiredTemp":70,"selFlowTemp":7,"selBurnPow":0,"curBurnPow":0,"pumpMod":0,"wWCircPump":0,"wWCurTmp":54.3,"wWCurFlow":0,"curFlowTemp":29.4,"retTemp":30.8,"switchTemp":19.8,"sysPress":1,"boilTemp":31.2,"wWActivated":"on","burnGas":"off","flameCurr":0,"heatPmp":"off","fanWork":"off","ignWork":"off","wWCirc":"off","heating_temp":76,"pump_mod_max":91,"pump_mod_min":30,"wWHeat":"off","wWStarts":5505,"wWWorkM":39490,"UBAuptime":3361837,"burnStarts":26230,"burnWorkMin":403582,"heatWorkMin":364092,"ServiceCode":"0H","ServiceCodeNumber":203} Topic:tapwater_active Payload:0 Topic:heating_active Payload:0 Topic:shower_data Payload:{"timer":"0","alert":"0","duration":"n/a"} Topic:thermostat_data Payload:{"hc2":{"seltemp":13.5,"currtemp":19.5,"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heating

On 10 Oct 2019, at 23:30, Proddy notifications@github.com wrote:

Subscription is on topics, and they are unique right? Anyway I’m changing all of this to reduce the number of topics this weekend

On Thu, 10 Oct 2019 at 22:05, lmdecroos notifications@github.com wrote:

The topics are now correct for both HC’s but the subscriptions are not unique

Topic:thermostat_data1 Payload:{"thermostat_seltemp":15,"thermostat_currtemp":19.2,"thermostat_daytemp":19,"thermostat_nighttemp":15,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"auto"} Topic:thermostat_data2 Payload:{"thermostat_seltemp":13.5,"thermostat_currtemp":16.3,"thermostat_daytemp":18,"thermostat_nighttemp":13.5,"thermostat_holidayttemp":17,"thermostat_heatingtype":1,"thermostat_circuitcalctemp":5,"thermostat_mode":"night"}

testing with : [APP] EMS-ESP version: 1.9.2b4 [APP] MyESP version: 1.2.9 [APP] Build timestamp: 2019-10-10 21:48:59

On 7 Oct 2019, at 10:48, Proddy notifications@github.com wrote:

Closed #162 https://github.com/proddy/EMS-ESP/issues/162.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW444HYVNJLCT3TO62JU3QNLZVVA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUBSVITI#event-2690995277>, or mute the thread < https://github.com/notifications/unsubscribe-auth/ANDW446AOHRLKLSXRIH6MUDQNLZVVANCNFSM4IGOZDBQ .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=AAJMO6CUMX5UG5NGN6ZE7QTQN6DHJA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA5WKYI#issuecomment-540763489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMO6FNPBN5ULEZO4WA5DLQN6DHJANCNFSM4IGOZDBQ .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW44YMTA3TAXE6CEIT64TQN6NIDA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA6BIMA#issuecomment-540808240, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW447F56SHQPEFBFQVKOTQN6NIDANCNFSM4IGOZDBQ.

proddy commented 5 years ago

oops. try b7 ?

lmdecroos commented 5 years ago

no change, only HC2 is published have the EMS gateway and MQTT explorer running for 5 minutes

On 13 Oct 2019, at 17:30, Proddy notifications@github.com wrote:

oops. try b7 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW4444VJEAUYKURO4Q4ZTQOM5H3A5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCYXCQ#issuecomment-541428618, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW44YVGDOOXPCVZF3RK6TQOM5H3ANCNFSM4IGOZDBQ.

lmdecroos commented 5 years ago

Checked the MQTT explorer values and it seems it sending both at the same time and only the last one save is saved

{"hc2":{"seltemp":13.5,"currtemp":19.6,"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"night”}} {"hc1":{"seltemp":19,"currtemp":20.3,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto”}}

On 13 Oct 2019, at 17:49, Luk-Marie Decroos lmd@telenet.be wrote:

no change, only HC2 is published have the EMS gateway and MQTT explorer running for 5 minutes

On 13 Oct 2019, at 17:30, Proddy <notifications@github.com mailto:notifications@github.com> wrote:

oops. try b7 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW4444VJEAUYKURO4Q4ZTQOM5H3A5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCYXCQ#issuecomment-541428618, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW44YVGDOOXPCVZF3RK6TQOM5H3ANCNFSM4IGOZDBQ.

proddy commented 5 years ago

think I fixed it. still calling in b7

lmdecroos commented 5 years ago

[MQTT] Error publishing to home/ems-esp/thermostat_data with payload {"hc1":{"seltemp":19,"currtemp":20.3,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto"},"hc2":{"seltemp":13.5,"currtemp":19.7,"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"night"}}, error 0

a syntax error ??

On 13 Oct 2019, at 18:13, Proddy notifications@github.com wrote:

think I fixed it. still calling in b7

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW447N6GZYIPC6JUZVNXTQONCLDA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBCZSZY#issuecomment-541432167, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW444DVG5JJMETPPDUUG3QONCLDANCNFSM4IGOZDBQ.

proddy commented 5 years ago

yes I'm seeing those too, its kinda random and I think they've always been there but I've suppressed the warnings. I'm also looking into this. The MQTT is still sent.

lmdecroos commented 5 years ago

It seems as long the subtopics are not complete between HC1 and HC2, the data fro HC2 comes through once the EMS gateway has all values ( subtopics) for both HC’s that only the value of HC1 is taken in account

the first 3 messages after a restart ( and filtered on HC2)

{"hc1":{"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"mode":"auto"},"hc2":{"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"mode":"night"}} {"hc1":{"seltemp":19,"currtemp":20.8,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto"},"hc2":{"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"mode":"night"}} {"hc1":{"seltemp":19,"currtemp":20.8,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto"},"hc2":{"seltemp":13.5,"currtemp":19.6,"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"night"}}

on the next update all values are published, but only the values from HC1 are coming through

On 13 Oct 2019, at 18:50, Proddy notifications@github.com wrote:

yes I'm seeing those too, its kinda random and I think they've always been there but I've suppressed the warnings. I'm also looking into this. The MQTT is still sent.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW445AKG22E247RQLEVO3QONGVHA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBC2KDY#issuecomment-541435151, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW44YKJIVZZVR5FCPREULQONGVHANCNFSM4IGOZDBQ.

proddy commented 5 years ago

sorry, not sure I understand. What is happening and what is the expected behaviour ?

lmdecroos commented 5 years ago

When looking at MQTT explorer, after an EMS gateway reboot the MQTT messages contains {"hc1":{“day…. and ,"hc2":{“dayt ….

But once all values for HC1 and HC2 are published, the MQTT receiver seems to be confused as it received 2 times the values ( one for HC1 another for HC2) and it takes only the one for HC1 in account

it seems that the MQTT message can’t handle 2 times the values in the same topic

On 13 Oct 2019, at 21:02, Proddy notifications@github.com wrote:

sorry, not sure I understand. What is happening and what is the expected behaviour ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW442EBGHPVMMRYYWL2ODQONWE3A5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBC5KYQ#issuecomment-541447522, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW44ZZSQMY25ASG2MQAZTQONWE3ANCNFSM4IGOZDBQ.

proddy commented 5 years ago

still confused, sorry! Is the payload on the thermostat_data correct? If so its up to the MQTT receiver on how to interpret the data. I'm using Home Assistant and with templates it is working.

lmdecroos commented 5 years ago

Yes, payload thermostat data in the EMS gateway seems to be correct ( at least it contains all details for both HC’s) , but the MQTT explorer is not able to interpreet it correct. it’s understand only the values for HC1, it ignores the values for HC2

Only on the first (3) messages after a reboot, when it the EMS is still missing some data, the values of HC2 are in the message received / interpreted by MQTT explorer

message 1 : {"hc1":{"seltemp":19,"currtemp":20.8,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto”}}

message 2 : {"hc1":{"seltemp":19,"currtemp":20.8,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto"},"hc2":{"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"mode":"night”}} message 3 : {"hc1":{"seltemp":19,"currtemp":20.8,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto"},"hc2":{"seltemp":13.5,"currtemp":19.6,"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"night"}}

message 4 and later {"hc1":{"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"mode":"auto”}}

so from message 4 onwards all the details of HC2 are missing on the MQTT receiver side

On 13 Oct 2019, at 21:28, Proddy notifications@github.com wrote:

thermostat_data correct

proddy commented 5 years ago

ahh, found the error. very silly of me. I'll do a commit soon.

lmdecroos commented 5 years ago

well done, seems to be fixed

{"hc1":{"seltemp":19,"currtemp":21,"daytemp":19,"nighttemp":15,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"auto"},"hc2":{"seltemp":13.5,"currtemp":19.9,"daytemp":18,"nighttemp":13.5,"holidayttemp":17,"heatingtype":1,"circuitcalctemp":5,"mode":"night”}}

I will contact bbqkees and ask him to update his plugin

On 13 Oct 2019, at 21:59, Proddy notifications@github.com wrote:

ahh, found the error. very silly of me. I'll do a commit soon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/proddy/EMS-ESP/issues/162?email_source=notifications&email_token=ANDW44562MYGPYVDZ3J7623QON4ZHA5CNFSM4IGOZDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBC6VRY#issuecomment-541452999, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANDW444DTJTPVJNWLLESRCTQON4ZHANCNFSM4IGOZDBQ.

proddy commented 5 years ago

ok closing this issue for now.

majdzik84 commented 5 years ago

1.9.2b9

I noticed that setpoint temperature again does not give the correct value in auto-day, auto-night mode.

Example: When changing from OFF (night) mode to auto mode it still shows off-night temperature instead of auto-day.

Should now show 22C (auto-day) image


> (00:59:10.206) Thermostat -> me, type 0x3E, telegram: 10 0B 3E 00 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00 (CRC=63) #data=16
> (00:59:10.488) Thermostat -> me, type 0x3D, telegram: 10 0B 3D 00 01 2A 2C 26 00 28 00 02 00 05 05 2D 01 01 04 3C 06 39 01 00 3C FF 0D 05 05 03 00 (CRC=3E) #data=27
> Publishing external sensor data via MQTT
> (00:59:11.081) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 EF 00 00 00 00 00 00 00 00 11 05 00 (CRC=9C) #data=16
> (00:59:11.613) Thermostat -> me, type 0x47, telegram: 10 0B 47 00 03 28 2C 26 0A 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 0D 05 05 02 02 (CRC=FF) #data=27
> Publishing external sensor data via MQTT
> (00:59:11.957) Thermostat -> me, type 0x52, telegram: 10 0B 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=B6) #data=16
> (00:59:12.363) Thermostat -> me, type 0x51, telegram: 10 0B 51 00 00 28 2C 26 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=1C) #data=27
> (00:59:13.332) Thermostat -> me, type 0x5C, telegram: 10 0B 5C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 00 00 (CRC=C0) #data=16
> (00:59:14.113) Thermostat -> me, type 0x5B, telegram: 10 0B 5B 00 00 28 2C 26 00 28 00 02 00 05 05 2D 01 01 04 4B 05 4B 01 00 3C FF 11 05 05 03 02 (CRC=6E) #data=27
> (00:59:14.562) Thermostat -> me, type 0x06, telegram: 10 0B 06 00 13 0A 0D 10 1A 24 02 01 (CRC=21) #data=8
proddy commented 5 years ago

oh no, this again. Did it ever work? The logic is just too difficult to figure out as 1) I don't own an RC35 and 2) I never really understood what auto-day and auto-night really means.

Do you think you could take a look at code and with your example telegrams do a PR ? Otherwise we'll just be going back and forth for weeks and I don't have the time.

majdzik84 commented 5 years ago

unfortunately I am not a programmer. I don't know how to do PR :(

A few versions ago (i thing 1.9.1b11 ) I have the impression that in automatic mode it just jumped between day-temp and night-temp. RC35 has something like a temporary temperature - but I let it go.

So it's day-temp and night-temp - automatic mode just switches these temperatures (auto-day - shows day temp) and in the evening auto-night (shows nighttemp)

EDIT: I checked in 1.9.1 stable - unfortunately it is the same - sometimes everything is ok, sometimes not. In this case, we are waiting for someone smart who has rc35 :)

proddy commented 5 years ago

I can do the programming, I just need someone to create the rules.

The logic now is in ems.cpp function _process_RC35StatusMessage() and goes:

In your examples the data blocks look like

For 0x3E (HC1): 04 03 00 7D 00 00 00 00 00 00 00 00 00 11 05 00

For 0x48 (HC2): 04 03 00 00 EF 00 00 00 00 00 00 00 00 11 05 00

can you help define what it should be?

majdzik84 commented 5 years ago

Probably, before I get the ideas of bytes, etc. it will pass a little :) In the meantime, I was able to intercept telegrams after RC35 changed auto-day mode to auto-night. Maybe it will be helpful to correctly determine the switch point between day and night mode (in auto mode)

Auto-night - RC35 (00:29:12.276) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 01 00 00 EE 00 00 00 00 00 00 00 00 00 05 00 (CRC=3C) #data=16

Auto-day - RC35 (00:34:10.506) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 F1 00 00 00 00 00 00 00 00 11 05 00 (CRC=24) #data=16

Auto-Day- (change in HA) (00:24:13.139) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 EF 00 00 00 00 00 00 00 00 11 05 00 (CRC=9C) #data=16

Auto-day (change in HA from night mode) < incorrect setpoint (its still night temp) (00:49:11.492) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 F0 00 00 00 00 00 00 00 00 11 05 00 (CRC=EC) #data=16

Auto-day (change in HA from day mode (heat)) (00:54:11.988) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 03 00 00 F0 00 00 00 00 00 00 00 00 11 17 00 (CRC=C8) #data=16

Auto-night(change in HA from day mode(heat)) < incorrect setpoint (its still day temp) (01:26:11.460) Thermostat -> me, type 0x48, telegram: 10 0B 48 00 04 01 00 00 F3 00 00 00 00 00 00 01 00 00 17 00 (CRC=F1) #data=16

proddy commented 5 years ago

In all those examples, the setpoint temperature is 0.0C. I've highlighted them below:

Auto-night - RC35 telegram: 10 0B 48 00 04 01 00 00 EE 00 00 00 00 00 00 00 00 00 05 00

Auto-day - RC35 telegram: 10 0B 48 00 04 03 00 00 F1 00 00 00 00 00 00 00 00 11 05 00

Auto-Day- (change in HA) telegram: 10 0B 48 00 04 03 00 00 EF 00 00 00 00 00 00 00 00 11 05 00

Auto-day (change in HA from night mode) < incorrect setpoint (its still night temp) telegram: 10 0B 48 00 04 03 00 00 F0 00 00 00 00 00 00 00 00 11 05 00

Auto-day (change in HA from day mode (heat)) telegram: 10 0B 48 00 04 03 00 00 F0 00 00 00 00 00 00 00 00 11 17 00

Auto-night(change in HA from day mode(heat)) < incorrect setpoint (its still day temp) telegram: 10 0B 48 00 04 01 00 00 F3 00 00 00 00 00 00 01 00 00 17 00

But there's another byte we could read adjacent to the setpoint. I'm not sure what it is. I've listed the values below. Can you see if this matches anything you're seeing?

Auto-night - RC35 telegram: 10 0B 48 00 04 01 00 00 EE 00 00 00 00 00 00 00 00 00 05 00 (value 23.8)

Auto-day - RC35 telegram: 10 0B 48 00 04 03 00 00 F1 00 00 00 00 00 00 00 00 11 05 00 (value 24,1)

Auto-Day- (change in HA) telegram: 10 0B 48 00 04 03 00 00 EF 00 00 00 00 00 00 00 00 11 05 00 (value 23,9)

Auto-day (change in HA from night mode) < incorrect setpoint (its still night temp) telegram: 10 0B 48 00 04 03 00 00 F0 00 00 00 00 00 00 00 00 11 05 00 (value 24)

Auto-day (change in HA from day mode (heat)) telegram: 10 0B 48 00 04 03 00 00 F0 00 00 00 00 00 00 00 00 11 17 00 (value 24)

Auto-night(change in HA from day mode(heat)) < incorrect setpoint (its still day temp) telegram: 10 0B 48 00 04 01 00 00 F3 00 00 00 00 00 00 01 00 00 17 00 (value 24,3)

majdzik84 commented 5 years ago

Yes.I think it's current room temperature image

proddy commented 5 years ago

From each of the examples I need to know what the expected setpoint values should be, so I can hunt them down in the telegrams.