Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

How can I trigger the thermostat set message on Heatronics 3? #138

Closed
Vuego123 opened this issue Jun 25, 2019 · 90 comments
Closed

How can I trigger the thermostat set message on Heatronics 3? #138

Vuego123 opened this issue Jun 25, 2019 · 90 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@Vuego123
Copy link
Contributor

I want to add support for writing to the thermostat Junkers FW100 (e.g. change the room setpoint temperature), but I cannot find the telegram type that is used to write to the thermostat.

When I change the temperature on the thermostat device and monitor the ems bus, I don't see any write message. I only see the next broadcasted status message with the new temperature. I suppose that is normal because the thermostat does not send a write telegram to itself.

Any idea how I can find this?

@Vuego123 Vuego123 added the question Further information is requested label Jun 25, 2019
@proddy
Copy link
Collaborator

proddy commented Jun 26, 2019

That's correct, you won't see any telegrams when manually changing the temperature on the thermostat. The best way is to look at the hometop project, specifically this file https://github.com/norberts1/hometop_HT3/blob/master/HT3/sw/lib/ht_discode.py to figure out the telegram format.

@Vuego123
Copy link
Contributor Author

I don't see are any write examples in that project. I think they only read?

@proddy
Copy link
Collaborator

proddy commented Jun 29, 2019

it does support writing too. It's mentioned on https://github.com/norberts1/hometop_HT3. The code is quite complex and hard to read and not very modular. I gave up trying to understand it!

@Vuego123
Copy link
Contributor Author

Same here, I've spent 2 hours looking at the code, but the most crucial things I want to know remain a mystery so far... But I'm not giving up yet. ;-)

Another strategy, I have a second thermostat that is not used. Can I connect 2 thermostats (Junkers FW100 and Junkers FW200) on 1 EMS bus? Will it it work and will thermostat 1 write to thermostat 2 when I update the room temp setpoint on thermostat 1?

@proddy
Copy link
Collaborator

proddy commented Jul 1, 2019

I'm not sure the EMS can provide enough power (amps) to both thermostats but you could try. It'll be interesting to see if they have different unique identifiers. We should be able to work it out from the HT3 code - I just need the time!

@moustic999
Copy link

in hometop project, write to the bus is done in https://github.com/norberts1/hometop_HT3/blob/master/HT3/sw/lib/ht_yanetcom.py
I will check this code to see what we can reuse. especially messages .
that's not so easy as it convert everything to decimal.

@Vuego123
Copy link
Contributor Author

Vuego123 commented Jul 4, 2019

@moustic999 indeed, yesterday I discovered that file as well and also an overview here in html: https://github.com/norberts1/hometop_HT3/blob/master/HT3/sw/etc/html/HT3-Bus_Telegramme.html

For my FW100 thermostat the message id should be 357

I think I understand how they send messages to change the temperaure, but it's not working for my FW100 (yet). I would expect that the following message:

B8 10 FF 10 00 65 24

sets the temp for the "sparen" mode to 18°c

  • B8 source
  • 10 destination
  • FF for ems+
  • 10 offset (or it this 12 because the offset counted different for ems+ messages?)
  • 00 ems+ message type
  • 65 ems+ message type
  • 24 is temp counted in parts of 0,5°c

but no luck yet.

@moustic999
Copy link

Sorry, I made a mistake
you are right
op code is FF xx 00 65
let me continue checking against the value to be send
I would propose to first try to switch the mode as it is simpler than setting temp , which is mode dependant

@moustic999
Copy link

Can you describe your installation ?
do you have any others controller ? CRxxx or something else ?

I see very strange behavior in the code.
regarding destination 0x10 and 0x18
do you have the 2 ?

@Vuego123
Copy link
Contributor Author

Vuego123 commented Jul 4, 2019

My setup:

  • Solar module: Junkers ism1
  • Heater: Junkers zsb 22-3 (heatronic 3)
  • Thermostat: Junkers FW100

So no CRxxx device.

The code makes a difference between heatronic 3bus system ( thermostat has id 0x10) and EMS bus system ( thermostat has id 0x18).

@proddy proddy changed the title How can I trigger the termostat set message How can I trigger the thermostat set message on Heatronics 3? Sep 22, 2019
@Neonox31
Copy link
Contributor

Neonox31 commented Oct 5, 2019

Hello,

I have a Junker FW120 Thermostat and I was looking to write on it like you.
Thanks of all provided information, I was able to change the mode using the following command : send 8B 10 FF 0E 00 65 02 (economic mode) 🎆

I am now trying to change the temperature.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 5, 2019

Good new, I was able to change tempearture levels using following commands :

# Change economic temperature to 10°C
send 8B 10 FF 10 00 65 14

# Change frost protection temperature to 10°C
send 8B 10 FF 0F 00 65 14

# Change comfort temperature to 10°C
send 8B 10 FF 11 00 65 14

Now I have to take a look at the code for implementing it.

@proddy
Copy link
Collaborator

proddy commented Oct 6, 2019

@Neonox31 I can help with the implementation if needed

@Vuego123
Copy link
Contributor Author

Vuego123 commented Oct 6, 2019

I tested the examples and they all work for my Junkers FW100 as well. @proddy I can try to implement and test this. Ok to send you a pull request when I'm ready?

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 6, 2019

@proddy Thanks for your proposal 👍

@Vuego123 Let me know if you open a PR because I plan to do one too.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 6, 2019

I don't know why but sometimes the new setted temperature is not considered by the thermostat.
I have to investiguate on this, if someone has any clue...

@proddy
Copy link
Collaborator

proddy commented Oct 6, 2019

there was a similar report with the RC35 when setting the set point temp in day mode, it wouldn't show up. Is this similar to what you're seeing?

@Vuego123
Copy link
Contributor Author

Vuego123 commented Oct 6, 2019

@Neonox31 I'm working on a first version, but there are more things I need to adapt than anticipated. It might take some time.

@proddy : is it possible that the "_ems_sendTelegram()" has never been used for EMS+ telegrams? I see a test that will never work:

// complete the rest of the header depending on EMS or EMS:
if (EMS_TxTelegram.type > 0xFF) { ...

But EMS+ markers are 0xFF, 0xF7 or 0xF9. None of them are bigger than 0xFF.

Secondly, the "ems_parseTelegram()" uses a completer check to decide if it is EMS+ or not:
// determing if its normal ems or ems plus, check for marker
if (telegram[2] >= 0xF0) {
// its EMS plus / EMS 2.0
EMS_RxTelegram.emsplus = true;
EMS_RxTelegram.emsplus_type = telegram[2]; // 0xFF, 0xF7 or 0xF9

So unless sending EMS+ messages has been reported as working, I will fix that part as well by aligning the logic with "ems_parseTelegram()".

@Vuego123
Copy link
Contributor Author

Vuego123 commented Oct 6, 2019

@Neonox31 : Intermediate progress: https://github.com/Vuego123/EMS-ESP/tree/Write-to-FW100-/-FW120

Contains support for changing the thermostat mode and improved logic for sending EMS+ messages. Not tested yet at this moment.

When it is tested I will do a pull request.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 7, 2019

Ok thanks for the link.

Here is mine also WIP : https://gitlab.com/neonox31/boiler/merge_requests/4/diffs

@proddy
Copy link
Collaborator

proddy commented Oct 7, 2019

@Vuego123 @Neonox31 I could also create a special branch in EMS-ESP and add you both as collaborators?

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 7, 2019

there was a similar report with the RC35 when setting the set point temp in day mode, it wouldn't show up. Is this similar to what you're seeing?

@proddy I forgot to answer your question, it is not similar because the temperature never change on both physical thermostant and telnet as if the telegram has never sent.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 7, 2019

It could be a good idea to create a dedicated branch 👍 , but before I would like to solve the problem with the temperature.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 8, 2019

It's still a mystery !

(01:43:32.614) Sending raw: 8D 10 FF 0F 00 65 28 (CRC=BF) #data=100
(01:43:32.631) 0x0D -> Thermostat, type 0x0065, telegram: 8D 10 FF 0F 00 65 28 (CRC=BF) #data=1
(01:43:32.911) Thermostat -> Boiler, type 0x16, telegram: 90 88 16 00 02 (CRC=AF) #data=1
(01:43:32.933) Boiler -> Thermostat, type 0x16, telegram: 88 10 16 00 FF 46 (CRC=98) #data=2
(01:43:33.065) Thermostat -> all, type 0x006F, telegram: 90 00 FF 00 00 6F 01 01 00 BE 00 EE F3 34 00 (CRC=43) #data=9
Publishing boiler data via MQTT
Publishing hot water and heating states via MQTT
Publishing thermostat data via MQTT
send 8D 10 FF 0F 00 65 28

(01:43:41.851) Sending raw: 8D 10 FF 0F 00 65 28 (CRC=BF) #data=48
(01:43:41.868) 0x0D -> Thermostat, type 0x0065, telegram: 8D 10 FF 0F 00 65 28 (CRC=BF) #data=1
(01:43:42.297) Thermostat -> all, type 0x0065, telegram: 90 00 FF 00 00 65 01 00 04 19 30 41 07 01 00 03 FF 2A 06 01 01 28 28 28 03 01 00 (CRC=25) #data=21
(01:43:42.610) Thermostat -> all, type 0x006F, telegram: 90 00 FF 00 00 6F 01 01 00 C8 00 EE F3 34 00 (CRC=1D) #data=9
Publishing hot water and heating states via MQTT
Publishing thermostat data via MQTT

The first telegram sent fails and the second passes with exactly the same command. I think the thermostat doesn't manage well rx telegrams and forgets some.

The most curious is that using change mode command works every time... It fails sometimes too

I have no real solution, maybe I have to send multiple times the telegram until I got a response but it is ugly 🤢

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 8, 2019

@proddy Is it normal that #data value changed between sent telegrams ?

@proddy
Copy link
Collaborator

proddy commented Oct 8, 2019

the #data should show the number of data bytes in the data package sent. So that needs fixing too. For example send 8D 10 FF 0F 00 65 28 should show #data=1 as there is one byte 0x28 sent ?

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 8, 2019

Ok so this a bug, but I don't think it is related.

@stravinci
Copy link

@proddy confirmed, fixed in b50

@proddy proddy closed this as completed Mar 7, 2020
@VooZ2
Copy link

VooZ2 commented Mar 7, 2020

@proddy confirmed, fixed in b50

Can you also change mode in HA or telnet? It's still doesn't work for me.

@proddy
Copy link
Collaborator

proddy commented Mar 7, 2020

@VooZ2 which thermostat do you have? I'll look into it.

@proddy proddy reopened this Mar 7, 2020
@VooZ2
Copy link

VooZ2 commented Mar 7, 2020

FW120. We have talked about modes in this topic before.

@stravinci
Copy link

@proddy yes, @WooZ2 has right - thermostat from HA doesn't work.

@proddy
Copy link
Collaborator

proddy commented Mar 7, 2020

Ok. I’ll take a look

proddy added a commit that referenced this issue Mar 8, 2020
@proddy
Copy link
Collaborator

proddy commented Mar 8, 2020

@VooZ2 I cleaned up the thermostat mode logic a little in 1.9.5b52. Could you see if it still works?
thermostat mode <mode> [hc] where mode is manual,auto,heat,day,night,eco,comfort,holiday,nofrost

@VooZ2
Copy link

VooZ2 commented Mar 8, 2020

@VooZ2 I cleaned up the thermostat mode logic a little in 1.9.5b52. Could you see if it still works?
thermostat mode <mode> [hc] where mode is manual,auto,heat,day,night,eco,comfort,holiday,nofrost

It works. But I need to figure out why sometimes it needs to repeat command or use different mode. For example sometimes I need mode heat, sometimes day. Both modes turn same mode on thermostat. Same with night/eco mode. Also will test id I can change temp in manual modes. But we are on right way :)

@proddy
Copy link
Collaborator

proddy commented Mar 8, 2020

oh, for Junkers I only implemented nofrost, eco, comfort and auto based on the earlier postings (values 01 to 04). The other ones like manual, day, night, heat etc are just mapped to auto in most cases.

@proddy
Copy link
Collaborator

proddy commented Jun 7, 2020

this has improved in v2. needs thorough testing though. If errors are found we'll reopen.

@proddy proddy closed this as completed Jun 7, 2020
@Neonox31
Copy link
Contributor

Hello @proddy,

Juste tested with the 2.0.1 version and it works like a charm !
You make an awesome job on this new version, thanks 👍

@proddy
Copy link
Collaborator

proddy commented Oct 24, 2020

thanks, wait until you see v2.1 !

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 24, 2020

On v2.1.0b11, mode temperatures seems to be broken on FW120 :

Thermostat: FW120 (DeviceID:0x10, ProductID:192, Version:53.02)
  Time: 14:48:08 24/10/2020
  Heating circuit 1:
    Setpoint room temperature: 21.0 °C
    Current room temperature: 21.2 °C
    Heat temperature: 0.5 °C
    Eco temperature: 3.5 °C
    Nofrost temperature: 32.5 °C
    Mode: auto
    Mode type: heat

@proddy
Copy link
Collaborator

proddy commented Oct 24, 2020

@Neonox31 did it work in 2.0.1? What should the mode be?

@proddy proddy reopened this Oct 24, 2020
@Neonox31
Copy link
Contributor

@proddy Yes it works on 2.0.1

I think the mistake was here : https://github.com/proddy/EMS-ESP/blob/dev/src/devices/thermostat.cpp#L143
process_JunkersSet and process_JunkersSet2 functions are swapped, I'm currently fixing it localy to see if it works well.

Do you want a P.R ?

@proddy
Copy link
Collaborator

proddy commented Oct 24, 2020

a PR is fine, whatever you prefer. It'll be nice to have another person contribute ;-) Or just send me what needs to be swapped. thanks!

@Neonox31
Copy link
Contributor

It works, here the P.R : #577

@Neonox31
Copy link
Contributor

I can't set the temperature too, but sent telegram seems to be OK :
asciicast

I have a JunkersSet response with 2A, but I have no idea what it means.

@Neonox31
Copy link
Contributor

Neonox31 commented Oct 25, 2020

Do not take into account my last message, values are limited according mode.
On the FW120 here are the intervals :

0°C <= no-frost temp <= 18.5°C
5°C <= eco temp <= 21°C
18.5°C <= heat temp <= 30°C

That's why I couldn't set the heat temperature at 18 degrees.

@proddy
Copy link
Collaborator

proddy commented Oct 25, 2020

great. shall we close this one?

@Neonox31
Copy link
Contributor

@proddy sure 👍

@proddy proddy closed this as completed Oct 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants