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

Nefit heatpump EMS+ #44

Closed
viimD opened this issue Jan 28, 2019 · 28 comments
Closed

Nefit heatpump EMS+ #44

viimD opened this issue Jan 28, 2019 · 28 comments
Labels
enhancement New feature or request

Comments

@viimD
Copy link

viimD commented Jan 28, 2019

Community!

As I have a Nefit heatpump running I'd really like to read this machine. I've been using Proddy's code and it gives a lot of insight. However, dealing with a different thermostat (Nefit Moduline 1010H) and a different heatpump instead of CV machine makes it hard.

@proddy I'm realy sure my thermostat send with the 0x38 type:
0x38 -> 0x10, type 0xFF telegram: 38 10 FF 00 03 2B 00 CE 08 0D 01 (CRC=C5), #data=7
38=sender
10=receiver
FF=EMS+byte
00=Offset
03=high byte
2B=low byte
the actuel room temperature is on the CE (20,6 degrees).

Can you implement this in your code?

@viimD viimD added the enhancement New feature or request label Jan 28, 2019
@proddy
Copy link
Collaborator

proddy commented Jan 28, 2019

We're working on the EMS+ implementation. It's early days yet as we build up the telegram structure but I'm pretty sure it'll be able to read the Moduline 1010H too.

The Nefit heatpump we can add. Could you find out what the product id is by typing boiler read 2 or if that fails send 0b b8 02 00 20. If nothing happens make sure Tx Capable is "yes" in the 'info' screen.

@viimD
Copy link
Author

viimD commented Jan 28, 2019

Yes! I'd really like to help with building up the EMS+ structure. The modulation of the heatpump and the pumpspeed I've already figured out :)

Both boiler read 2 and send 0b b8 02 00 20 do not give any response. Seems quite strange as in the info screen I see:
EMS Bus Stats:
Bus Connected=yes, Tx Capable=yes, # Rx telegrams=0, # Tx telegrams=486, # Crc Errors=17

Boiler stats:
Boiler type: Generic Type [Type ID: 0x08] Product ID:0 Version:not set

@proddy
Copy link
Collaborator

proddy commented Jan 28, 2019

This is what I was afraid of. Other people have reported similar behavior. The Tx is not working. This is either due to wiring (probably not) or that these newer EMS+ devices require a handshake before allowing send commands to be sent. I'll do another firmware build for you so you can set the boiler/thermostat using the 'set' command and we'll figure the rest out together

@viimD
Copy link
Author

viimD commented Jan 28, 2019

Cool! The Tx does show telegrams, but the Rx doesn't. Still the Tx is not working?

I'm not sure if it helps you, but I did use the Arduino bbqkees code. There the strang thing was that if I used the code to just read all output of the heatpump, I got for example:

registerRequest(0x00, 0x08, 0xE3, 22);

EMS bus request started.
20:00:59.616 -> Do request
20:01:01.434 -> Received a dataframe!
20:01:01.434 -> Wrong frametype received (0xFFFFFFE3)

Where this telegram does exist when I read all code:
20:03:51.050 -> Received datagram.
20:03:51.050 -> -----Datagram----- BYTES=22
20:03:51.094 -> HEX: 0x8 0x0 0xE3 0x0 0x1 0x0 0x1 0x0 0x2 0x8 0x0 0x0 0x0 0x0 0x0 0x1 0x42 0x5B 0x64 0x55 0x46 0x0 0x2A
20:03:51.163 -> -----End of Datagram-----

For the record: This telegram (E3) shows the modulation speed of the heatpump on byte 15 after the E3 (5B=91%)

@proddy
Copy link
Collaborator

proddy commented Jan 29, 2019

try the 1.4.1 firmware. use 'set thermostat_type 38' to set the type and see if anything can be sent

@viimD
Copy link
Author

viimD commented Jan 30, 2019

It does work!

set thermostat_type 38
thermostat_type changed to 38

then I did restart:

System Logging set to None
Read operations not yet supported for this model thermostat

I did try to set the temperature and then got:
thermostat temp 20.9
Write not supported for this model Thermostat

I also did some test with reading:
thermostat read 0xFF
Read operations not yet supported for this model thermostat

I do see thermostat output when I do log v 👍 :
(00:54:40) Thermostat -> 0x10, type 0xFF telegram: 38 10 FF 00 03 2B 00 D1 08 2A 01 (CRC=73), #data=7
(00:54:40) Thermostat -> 0x10, type 0xFF telegram: 38 10 FF 00 03 7B 08 24 00 4B (CRC=8A), #data=6

@proddy
Copy link
Collaborator

proddy commented Jan 30, 2019

yes thats correct, your thermostat is EMS+ and we haven't rolled that update out yet. Are you able to write commands to the boiler? I want to make sure Tx is working as some people have reported issues. So log v and then boiler read 2 for example.

@viimD
Copy link
Author

viimD commented Jan 30, 2019

cool! Not sure if Tx is working.

boiler read 2
Requesting type Version(0x02) from dest 0x00
nothing more. Maybe because my boiler is on 0x08?

I do get a lot of output from the boiler (0x08) with log v:
(02:01:22) 0x08 -> all, type 0x07 telegram: 08 00 07 00 01 01 00 00 00 00 01 00 01 00 00 00 00 (CRC=81), #data=13
(02:01:22) 0x08 -> all, type 0xE4 telegram: 08 00 E4 00 10 20 30 48 00 CB 21 01 46 56 56 02 00 02 B2 00 00 01 33 00 00 00 00 01 77 01 46 (CRC=BD), #data=27
(02:01:22) 0x08 -> all, type 0xD1 telegram: 08 00 D1 00 FF EA (CRC=CA), #data=2
(02:01:22) 0x08 -> all, type 0xE3 telegram: 08 00 E3 00 01 00 01 00 02 08 00 00 00 00 00 01 46 56 64 55 (CRC=52), #data=16
(02:01:22) 0x08 -> all, type 0xE5 telegram: 08 00 E5 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 (CRC=06), #data=26
(02:01:22) 0x08 -> all, type 0xE9 telegram: 08 00 E9 00 00 02 00 01 FF 00 00 00 00 3C 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=B7), #data=24
(02:01:23) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 8F 02 A9 01 70 01 77 01 33 00 00 00 00 FF E7 02 7A 01 57 FF CE FF 75 00 00 (CRC=C4), #data=26
(02:01:23) 0x08 -> all, type 0xFF telegram: 08 00 FF 18 03 8F 01 FF FF 6D 01 71 (CRC=6E), #data=8
(02:01:23) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 94 00 9A AE DE 00 00 3E 26 00 00 03 B5 00 00 3A 6F 00 00 00 00 00 00 00 00 (CRC=78), #data=26
(02:01:23) 0x48 -> 0x10, type 0x01 telegram: 48 90 01 0D 07 (CRC=19), #data=1
(02:01:23) 0x10 -> 0x48, type 0x01 telegram: 10 48 01 0D 38 37 33 37 37 30 36 (CRC=64), #data=7
(02:01:23) 0x08 -> all, type 0xFF telegram: 08 00 FF 18 03 94 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=F5), #data=27
(02:01:23) 0x08 -> all, type 0xFF telegram: 08 00 FF 31 03 94 00 00 00 00 00 00 00 (CRC=38), #data=9
(02:01:24) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 95 00 6D C5 0E 00 05 BA 7C 00 68 0A 92 00 00 00 00 00 00 00 00 00 00 00 CD (CRC=CA), #data=26
(02:01:24) 0x08 -> all, type 0xFF telegram: 08 00 FF 18 03 95 00 00 00 58 00 00 00 75 00 00 00 00 00 00 00 00 00 00 02 27 00 00 01 90 (CRC=64), #data=26
(02:01:24) 0x08 -> all, type 0xFF telegram: 08 00 FF 30 03 95 00 00 00 96 00 00 00 00 00 00 11 3E 00 00 00 00 00 00 13 65 00 00 0F F4 (CRC=EE), #data=26
(02:01:24) 0x08 -> all, type 0xFF telegram: 08 00 FF 48 03 95 00 00 01 47 00 00 00 00 00 00 00 00 (CRC=7D), #data=14
(02:01:24) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 9F 00 00 0A 8C 08 34 00 00 03 DA 00 00 07 08 (CRC=58), #data=16
(02:01:25) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 A0 0E 10 (CRC=2C), #data=4
(02:01:25) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 A2 10 01 02 02 00 (CRC=44), #data=7
(02:01:25) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 A3 00 0B 00 00 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 08 00 00 00 0A (CRC=8A), #data=27
(02:01:25) 0x08 -> all, type 0xFF telegram: 08 00 FF 19 03 A3 01 2C 00 64 (CRC=7A), #data=6
(02:01:25) 0x48 -> 0x10, type 0x01 telegram: 48 90 01 14 07 (CRC=2B), #data=1
(02:01:25) 0x10 -> 0x48, type 0x01 telegram: 10 48 01 14 34 34 30 00 FF FF FF (CRC=D7), #data=7
(02:01:26) 0x08 -> all, type 0xE4 telegram: 08 00 E4 00 10 20 30 48 00 CB 21 01 46 56 56 02 00 02 B2 00 00 01 33 00 00 00 00 01 76 01 46 (CRC=B9), #data=27
(02:01:27) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 8D 01 00 10 08 49 00 00 01 00 00 00 67 04 00 00 00 00 56 (CRC=5A), #data=20
(02:01:27) 0x08 -> all, type 0xFF telegram: 08 00 FF 00 03 8F 02 AA 01 71 01 76 01 33 00 00 00 00 FF E8 02 7A 01 58 FF DC FF 76 00 01 (CRC=C9), #data=26
(02:01:27) 0x08 -> all, type 0xFF telegram: 08 00 FF 18 03 8F 01 FF FF 6D 01 73 (CRC=6C), #data=8

@proddy
Copy link
Collaborator

proddy commented Jan 30, 2019 via email

@viimD
Copy link
Author

viimD commented Jan 30, 2019

Ok! I also live in the Netherlands so if I can help you physically or with sharing my screen or whatever just let me know

@proddy
Copy link
Collaborator

proddy commented Feb 3, 2019

I doubt it will have fixed it, but could you see if 'boiler read 2' works with the latest 1.5.0 release?

@viimD
Copy link
Author

viimD commented Feb 4, 2019

hi proddy. Thanks for the quick release. I used the 1.5.1 but 'boiler read 2' does not give any output:
System Logging set to Basic
boiler read 2
Requesting type Version(0x02) from dest 0x00

@proddy
Copy link
Collaborator

proddy commented Feb 5, 2019

@viimD which model/make is your Nefit heatpump? I really want to get the EMS+ thing working and could do with a real test (if you don't live too far from Noord Brabant).

@viimD
Copy link
Author

viimD commented Feb 5, 2019

Cool! I've this one: https://www.warmteservice.nl/Verwarming/Warmtepompen/Lucht-water-warmtepomp/Nefit-Enviline-All-electric-lucht-water-warmtepomp/p/03550580

I live nearby i guess. Can I send you a private message?

@daanv22
Copy link

daanv22 commented Mar 6, 2019

Im currently working with the Moduline 1010 too.
I come accross the same problems as @viimD
I can send a Moduline 1010 to your address so you can test even more with EMS+ if you like? @proddy

Let me know how far you are with the EMS+ and maybe we can help each other out.

@proddy
Copy link
Collaborator

proddy commented Mar 6, 2019

Hi @daanv22, well I kinda lost interest in the EMS+ (EMS 2.0) since there was no real incentive for me to build in the support - but I'm happy to help others navigate through the code and make the right changes in the right place. How are your coding skills?

@gl3nni3
Copy link
Contributor

gl3nni3 commented Mar 7, 2019

@proddy I works at the same company as @daanv22 and he asked me to take over. My coding skills in c++ are a bit rusty but i do have experience in it.

@proddy
Copy link
Collaborator

proddy commented Mar 7, 2019

hi @gl3nni3. 99% of the code is plain 'ole C so you should be fine. I think the first thing to fix is to be able to send requests (as read's along the Tx line) to the boiler. Or is this now working @daanv22 ?

@daanv22
Copy link

daanv22 commented Mar 7, 2019

If I am correct I can send read commands to the boiler

@proddy I did some logging and this are the results from the thermostat.

Here are some Corrupt telegrams I found:
Corrupt telegram: telegram: 08 0B 18 00 00 01 18 00 00 00 00 00 00 80 00 80 00 80 00 FF FF 0E 30 48 08 00 07 00 0B 00 01 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=71), #data=39
Corrupt telegram: telegram: FC 08 00 07 00 0B 00 01 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=71), #data=16

This is the only log I get from the Thermostat to the Boiler:
Thermostat -> Boiler, type 0x1A telegram: 18 08 1A 00 00 00 00 (CRC=F6), #data=3

A log from the queue:
[1] action=read dest=0x08 type=0x14 offset=0 length=6 dataValue=99 comparisonValue=0 type_validate=0x00 comparisonPostRead=0x00 @ (00:14:08)

Als I noticed that there are no Tx telegrams:
Bus Connected=yes, # Rx telegrams=50, # Tx telegrams=0, # Crc Errors=2
Some other Thermostat logs i found:

Thermostat -> all, type 0xFF telegram: 18 00 FF 00 01 A5 00 DD 21 23 00 00 23 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 (CRC=06), #data=24
 Thermostat -> all, type 0xFF telegram: 18 00 FF 16 01 A5 08 B1 00 00 07 00 00 00 00 00 00 00 00 00 00 00 00 00 (CRC=56), #data=20
Thermostat -> all, type 0xFF telegram: 18 00 FF 00 01 A5 00 DF (CRC=33), #data=4
 Thermostat -> all, type 0xFF telegram: 18 00 FF 00 01 A5 00 E0 (CRC=0C), #data=4

This are some logs when I change the temperature on the thermostat manually (0x18=Thermostat??)

17 Graden

(00:01:11) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 22 (CRC=4C), #data=3                                                                                                                                                                                                                                             
(00:01:11) 0x18 -> all, type 0xFF telegram: 18 00 FF 06 01 A5 22 (CRC=64), #data=3                                                                                                                                                                                                                                             
(00:01:12) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 22 (CRC=3C), #data=3                                                                                                                                                                                                                                             
(00:01:13) 0x18 -> all, type 0xFF telegram: 18 00 FF 00 01 A5 00 BB (CRC=57), #data=4                                                                                                                                                                                         
17.50 Graden

(00:02:29) 0x18 -> all, type 0xFF telegram: 18 00 FF 00 01 A5 00 BC (CRC=50), #data=4
(00:02:29) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 23 (CRC=4D), #data=3
(00:02:30) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 23 (CRC=3D), #data=3
18 Graden

(00:03:29) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 24 (CRC=4A), #data=3
(00:03:29) 0x18 -> all, type 0xFF telegram: 18 00 FF 06 01 A5 24 (CRC=62), #data=3
(00:03:29) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 24 (CRC=3A), #data=3

18.50 Graden

(00:05:15) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 25 (CRC=4B), #data=3
(00:05:15) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 25 (CRC=3B), #data=3
19 Graden

(00:06:18) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 26 (CRC=48), #data=3
(00:06:18) 0x18 -> all, type 0xFF telegram: 18 00 FF 06 01 A5 26 (CRC=60), #data=3
(00:06:19) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 26 (CRC=38), #data=3
19.50 Graden

(00:07:03) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 27 (CRC=49), #data=3
(00:07:03) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 27 (CRC=39), #data=3

20 Graden

(00:07:39) 0x18 -> all, type 0xFF telegram: 18 00 FF 03 01 A5 28 (CRC=46), #data=3
(00:07:39) 0x18 -> all, type 0xFF telegram: 18 00 FF 06 01 A5 28 (CRC=6E), #data=3
(00:07:39) 0x18 -> all, type 0xFF telegram: 18 00 FF 0A 01 B9 28 (CRC=36), #data=3
(00:07:39) 0x18 -> all, type 0xFF telegram: 18 00 FF 1A 01 A5 04 (CRC=A2), #data=3
(00:07:40) 0x18 -> all, type 0xFF telegram: 18 00 FF 04 01 A5 55 (CRC=03), #data=3

You can tag @gl3nni3 if the code needs to be edited.

We are working btw with a Intergas boiler with the Bosch Easy Control Adapter behind it. We have tested this with the Moduline 300 and that was working perfect.

@gl3nni3
Copy link
Contributor

gl3nni3 commented Mar 7, 2019

I forked it too my profile. You can take a look if you want.
The things i noticed so far:

  1. it looks like ems works with non completed packages as @daanv22 demonstrated above here.
  2. the fourth byte in the message is some kind of identifier for ems (not sure about this) in our case the hex values 03 06 0A communicate that it's a set temperature.
  3. The fifth byte is the offset byte which points to 7 byte in our case. this is the value for the set point.

I also wrote a little table on my own fork page.

@proddy
Copy link
Collaborator

proddy commented Mar 11, 2019

@gl3nni3 your changes look fine. When you've ready please feel free to do a PR on the 'dev' branch. Thanks

@proddy
Copy link
Collaborator

proddy commented Apr 6, 2019

Glenn's code was merged into the latest dev

@proddy proddy closed this as completed Apr 6, 2019
@proddy proddy reopened this Apr 17, 2019
@proddy
Copy link
Collaborator

proddy commented Apr 17, 2019

@daanv22 and @gl3nni3 I made some changes in the latest dev 1.7 to handle EMS+ messages more generically. From all your tests I see the type ID is 01A5 for broadcasting the thermostat values. I'm just not sure which byte corresponds to what as I don't have your type thermostats here. The code is around line 1167 in ems.cpp.

@gl3nni3
Copy link
Contributor

gl3nni3 commented Apr 23, 2019

At the moment because of moving we don't have access to the thermostats at the moment. I will get back to you about this.

@proddy
Copy link
Collaborator

proddy commented Apr 29, 2019

@viimD I think I can add support now for your heatpump as the core to handle EMS+ is implemented. But first we need to make sure 1.7 dev works with your setup and that you're able to send commands via Tx

@viimD
Copy link
Author

viimD commented Apr 29, 2019

Sounds really promising @proddy! I'm not sure what I ask from you, but can you make a prebuilt firmware from the 1.7 version? Then I'll upload it to the Wemos and I can run some tests.

@proddy
Copy link
Collaborator

proddy commented May 4, 2019

thanks, I'll email you over the firmware. When starting could do the following

  1. autodetect deep to discover the devices on the EMS bus
  2. capture some telegrams. Types 0x0395 and 0x03A2 look like they may be important
  3. see if you can match the temperatures to those in these telegrams

@proddy
Copy link
Collaborator

proddy commented May 26, 2019

Support added in the latest dev 1.8 release.
https://github.com/proddy/EMS-ESP/releases/tag/1.8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants