Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X10A already used #40

Closed
Freeman656 opened this issue Mar 24, 2021 · 64 comments
Closed

X10A already used #40

Freeman656 opened this issue Mar 24, 2021 · 64 comments
Labels
Exploration Looking for the unknown!

Comments

@Freeman656
Copy link

Hi,
First, thank you for your work, it's impressive...
I'm facing some interesting issue with my installation.
Indeed, the X10A is already used by some other component (I guess it's the bi-zone component)
PFA the pictures of this installation, and the ref of the heat pump : EHVZ04S18CB.
I guess, I'm f****d, but if it's possible to used some sort of Y cable or another port than X10A, please tell me.

DSC_2098
DSC_2099

@raomin
Copy link
Owner

raomin commented Mar 24, 2021

Woah, that's super interesting @Freeman656. We really need to know what is going on this port: If your equipment changes some values on your main unit, that could allow us to understand how it is done and turn ESPAltherma into a controller...!

Here is how you could tap into the serial port and record values so we can see what is going on the port: Get one of these USB - TTL module and plug in only the RX port to the TX port of the X10A on your board. Get a serial monitor (eg RealTerm), set the port to 9600, 8E1 and you should see some bytes going. Let us know if you need help with this.

You could be able to add ESPAltherma on the same port but it has not been made to share the port and might cause issues with what is using it already. Can you follow these 2 wires from the module to see what is connected to it?

@Freeman656
Copy link
Author

I'm glad to here that this could be useful for further enhancements and would be glad to participate.
I have very little knowledge on the electronic part but this seems quite easy to do.
I'll let you know if I managed to dump some data from the X10A port...

Also, you can find in the schematics page 23 of this document https://www.daikin.ch/content/dam/document-library/installation-manuals/heat/air-to-water-heat-pump-low-temperature/ehvz-cb3v/EHVZ-S18CB3V_4PFR401672-1B_IM_Installation%20Manuals_French.pdf
some information about the card which is connected to the X10A.

X10A seems connected to the A6P module (black ISCL-1V3 on the picture).
The A6P is then connected to the bigger board A5P on its X10A port (which has only 2 wires...)

As per documentation, the A5P is the bizone controller, and the A6P is a current loop board (just translated from french, I'm not entirely sure...).

This may be a bit specific to have two zones in the house, one is low temp (ground floor), and one is higher temp (1st floor), so I guess this second control board (A5P) is used for additional components linked to the high temp circuit (sensors, water circuit control, etc).

I'm still a big anxious about the idea of pluging the ESPAltherma at the same time in the same port.... :)

@raomin
Copy link
Owner

raomin commented Mar 24, 2021

Let us know if we can be of any help....!

I'm still a big anxious about the idea of pluging the ESPAltherma at the same time in the same port.... :)

Once we know what there is in parallel we will know how to "share the port" :)

@raomin
Copy link
Owner

raomin commented Mar 25, 2021

Ah, reading what I wrote ; I'll try to explain more... You should put your RX port of your USB TTL to the RX pin of the X10A port (pin 3), so we can see what the daughter board is sending to the mother board.

Note: once you have done this you can also listen to the TX pin of the X10A port to see how it reacts.

@Freeman656
Copy link
Author

Freeman656 commented Mar 26, 2021

Ok I'll try this.
I found an old FTD1232 at home, I hope this will be fine...
I'll let you know when it's done

@Freeman656
Copy link
Author

So, I captured around 3-4 minutes of working time.
I completly shutdown the heat pump, and the beginning of this capture is the restart of the heat pump.
Then around 2 mn, I increased the temperature and the heat pump started its stuff...
I hope you can get something with this file. I forgot to save it as HEX but I guess the data are the same anyways.
If you want me to do other recording, just ask, everything is still in place :)

capture-RX.txt

@raomin
Copy link
Owner

raomin commented Mar 26, 2021

Hi @Freeman656, Thanks a lot for this! :)

Unfortunately, there is nothing much in your file. Only 0xE0 or 0xF0 and a lot of 0x00.
Could you please make sure that the settings are 9600 bps 8 bits, Even parity and 1 bit stop?
I believe recording in HEX might be needed as the Text/ASCII version might strip out some precious data.

edit: added bit stop.

@Freeman656
Copy link
Author

Freeman656 commented Mar 27, 2021

Hi,
Second attempt, still the same values... settings are 9600 8E1.
Maybe my FTD1232 is not installed correctly, I'll have to check with an arduino or something...
Do you know a program which can be loaded in the M5StickC to record the RX/TX ports and maybe send it via wifi ?

capture-rx-hex.txt
capture-tx-hex.txt

@raomin
Copy link
Owner

raomin commented Mar 27, 2021

Hmm there might just be no communication when you're listening....? Did you chenge your zone temperature setting while capturing?
Also an easy way to test your ftd1232 capture is to connect your RX to the TX of ESPAltherma ;)

@Freeman656
Copy link
Author

Ok, rookie mistake, I forgot to hit the 'Change' button in RealTerm for 8E1 ;)
So here are the file.
One on the TX pin and the other on the RX.
For both, I changed the zone temperature to trigger heating.

captureTX.txt

captureRX.txt

@raomin
Copy link
Owner

raomin commented Apr 1, 2021

Bonjour @Freeman656!
I started to look at the files. This is pretty interesting, but doesn't look like anything I've seen before...
I'm struggling a bit with the files as there are no timing information: all bytes are in one long stream. So I'm just guessing here what forms a "command" and its response.
I believe you've seen it live. So could you tell me if this assumption of sequence is correct?

Also, can you confirm that the RX and TX are the one of the X10A main board? (not the one of the dual zone)

RX

03224199  >> tell me what is 2241
03224298  >> tell me what is 2242
0D2261008E0056FF00000000008C >> set ?? to ??
03224199
03224298
0D2261008E0056FF00000000008C
03224199
03224298
0D2261008E0056FF00000000008C

TX

224110000001C7000000FA005E0164000007 >> 2241 is ...
22420D4B4B2A0114000000000000B922617C >> 2242 is ...
224110000001C7000000FA005E0164000007
22420D4B4B2A0114000000000000B922617C
224110000001C6000000FA005E0164000008
22420D4B4B2A0114000000000000B922617C
224110000001C6000000FA005E0164000008
22420D4B4B2A0114000000000000B922617C
224110000001C6000000FA005E0164000008
22420D4B4B2A0114000000000000B922617C
224110000001C5000000FA005E0164000009 >> 2241 is decreasing from 1C6 to 1C5

@raomin
Copy link
Owner

raomin commented Apr 1, 2021

What could help, if you have a second USB TTL is to have the logs in parallel and timed... Because here, I'm not sure which one is the response to what.

I do now remember the serial monitoring tool I used it's YAT https://sourceforge.net/projects/y-a-terminal/
It does break lines after a short timeout and can add timestamp.

If you dont, then I could test a bit or even prepare a project for a serial monitor on ESP32...

@Freeman656
Copy link
Author

Freeman656 commented Apr 2, 2021

Ok I found another USB-to-TTL module in my mess...
And I used YAT, I don't know which file in RX and TX, but I guess you will found out quite easily !

The X10A I use is the one on the main module of the heat pump.

YAT-Log-20210402-081601.log
YAT-Log-20210402-081609.log

Everything is still pluged in, so don't hesitate, I can do more tests if needed.

@raomin
Copy link
Owner

raomin commented Apr 2, 2021

Merci @Freeman656
Can you redo it with this option without this option:
image

This would make the line cut better.

@raomin
Copy link
Owner

raomin commented Apr 2, 2021

... and maybe set the timeout to 200ms instead of 500. Thanks!

@raomin raomin added the Exploration Looking for the unknown! label Apr 3, 2021
@kaskii
Copy link
Contributor

kaskii commented May 7, 2021

I'm in the same position. I have Daikin Altherma 3 R F (EHVZ08S23DA9W7) and the X10A is already in use. I have tried now 2 different USB to TTL modules. RX pin of the module is only pin I connect and I connect it to pin 3 of X10A. Every other pin is untouched. I have tried to read serial data with putty, some other program and Open Serial Monitor with settings posted above ( 9600 bps 8 bits, Even parity and 1 bit stop) and I get nothing. I tried to change some settings on Daikin and rebooted it but the serial seems to be quiet. Am I doing something wrong? Maybe this unit uses different settings, is there a way to "analyze" the communication and determine the correct configuration based on that?

Edit: I should mention that I do not remove the connector from X10A but rather press the pin of wire from USB-to-TTL to pin 3 (I can see the pin connector under the wire). Should I be able to read data like this without Altherma system reboot? I also tried to change temperature settings from the unit while connected, still nothing.

@raomin
Copy link
Owner

raomin commented May 7, 2021

Hi @kaskii,
What are you trying to do?

  • If you are trying to plug ESPAltherma despite the used port, you can try. This might have a slight chance to work and there is a slight amount of chance that it will not disturb your setting. So here you'll need all pins plugged in addition.

  • If you are trying to provide some information on the data exchanged between the 2 boards then you also need to connect the GND of the USB TTL to the GND of the board and it should be good to get the data.
    I was waiting after @Freeman656 to provide some test results but he seems very busy ;)

@kaskii
Copy link
Contributor

kaskii commented May 8, 2021

Thanks. Connecting GND did the trick. Here are some files, do they make any sense (I'm not sure what settings I should be using)? Would love to use this project.

I bought LAN adapter just before I saw this project. I managed to reverse engineer the adapters websocket protocol but it doesn't provide much data. My ultimate goal is to just get all available data and display it in my custom dashboard. I just need to log these sensor data somewhere and your project seems promising start.

dump 1.txt
dump 2.txt

@raomin
Copy link
Owner

raomin commented May 9, 2021

Hey @kaskii, I had a look at your dumps.
They are similar to the one of @Freeman656 but provides interesting timing data.
It appears that the communication is constant every 1 sec. I believe you did the 2 dumps on the same line, so I only see one end of the communication (most probably RX). It would be great if you could do both, ideally in parallel with 2 usb-ttl ; so I could try to make some sense of this protocol that could eventually possibly allow us to control the heat pump over serial....
Note the second channel (TX) data should look like this: 22420D4B4B2A0114000000000000B922617C, 224110905F01C2006C00FA005E01640000B1

Now, for your objective of plugging in ESPAlterma in addition to your setup: the communication is too frequent (every sec) to just plug ESPAlterma in addition to the current setup. It's unlikely to break anything (every message has a CRC) but it is also unlikely that you'll get all the expected values.

One option would be that ESPAltherma 'listens' to the messages returned by the main board and send its query right after a message, but it is really unsure that the other module would not also try to talk at the same time.

What could work in your case is to use a 2 channel relay to switch the serial port to ESPAltherma when it should talk. Basically it would unplug periodically your 'dual zone module', switch the serial port to ESPAltherma to allow for the communication and switch back the the dual zone module when completed. This would mean a 2 channel relay and a little code adjustment to trigger the switch for the communication.

Now, there is also a CAN bus in our heat pumps (the P1P2 port). It also can query and set values and it's the one used by the LAN module but I haven't looked at it too much for the moment and I'm not sure you'll have access to the same values. But you can have a look at https://github.com/Arnold-n/P1P2Serial it's an arduino implementation for this bus.

@kaskii
Copy link
Contributor

kaskii commented May 10, 2021

Thank you @raomin for taking time in this, I appreciate it. I had problems with other USB-to-TTL to output anything but I found my old Arduino and used that instead. Here are the files. I'm not sure what settings I should be running with YAT for your convenience, hope these are ok.

pin2.txt
pin3.txt

As for 2 channel relay, would something like this work or do I need some special relays? I don't want to cut wires so I will also buy T-splitters or just connectors to extend current connector - if we can make ESP to work ofcourse.

@raomin
Copy link
Owner

raomin commented May 10, 2021

Yes @kaskii, I was thinking about something like this, you would bridge the signal so they trigger together.
For the splitters, I would start with some dupont cables at first, before going for proper connectors (unless you have them at hand). Tell me if you need help with the code, I could branch a version for this.

Pin3.txt is coherent with what you and @Freeman656 sent thanks.
But I have doubt on Pin2.txt, the content makes little sense and is not coherent with what @Freeman656 gave.
Are you sure the serial settings are correct? make sure you set the parity bit to Even.
If you're using YAT, use the following settings:
image

Thanks!

@raomin
Copy link
Owner

raomin commented May 10, 2021

Ah also, I forgot one thing, while logging, if you could change the temp on one zone and note the time when you do, that would be great.

@kaskii
Copy link
Contributor

kaskii commented May 10, 2021

Here are the new files.

pin3.txt
pin2.txt

These timestamps may be off by a second or two. There's no really indicator when the setting is applied and it takes a moment for a relay clicks. I tried to change various zones.

00.02.00 - Zone temp change
00.02.30 - Zone temp change
00.03.00 - Zone temp change
00.03.30 - Zone temp change
00.04.00 - Zone temp change
(00.04.25 -> Relay clicks)

00.04.45 -> Strong mode on
00.05.00 -> Strong mode off

@raomin
Copy link
Owner

raomin commented May 10, 2021

Hmm if you look at pin2.txt you can see sequence starting with BBh 7Dh 7Fh
it should start with 22420D4 to be coherent with what you have on pin3.
Can you inverse the pin2 and pin3 and log a bit to make sure there is no issue with the converter?

@raomin
Copy link
Owner

raomin commented May 10, 2021

I might have found something reading pin2.... did you put your temp up to 30deg?
0Dh 22h 61h C0h 1Dh 01h 56h FFh 00h 00h 00h 00h 00h 3Ch

0Dh: nb of bytes in the sequence
22h: protocol
61h: ?
1Dh: = 29, start from 13h (19) then later raises to 1E (30)

You have no choice of decimal in the temp I presume...?

@kaskii
Copy link
Contributor

kaskii commented May 10, 2021

2 - pin2.txt
2 - pin3.txt
1 - pin3.txt
1 - pin2.txt

I forgot how I wired up last time so here are both cases.

I actually might have changed the temp to 30 but nothing should be at 19.

@kaskii
Copy link
Contributor

kaskii commented May 10, 2021

3 - pin2.txt
3 - pin3.txt

Here is new set of files. So around 00.48.50 there was following values in the sensors menu:

  • Outdoor temp: 14C
  • Tank temperature: 60C
  • Leaving water: 64C
  • Leaving water (PHE): 61C
  • Leaving water (main): 34C
  • Inlet water temp.: 61C
  • Refrigerant temp.: 40C
  • Flow rate: 17.4 l/min
  • Water pressure: 1.3 bar

The UI "front page" had values:

  • Tank 60C
  • Main 26C
  • Additional 28C
  • Outside 14C

I changed the language to english and that seemed to mess with the UI. But at least following should be found:
00.50.26 Main zone temp increase
00.50.52 Additional zone to 40C
00:51:05 Additional zone to 28C

I don't see any decimals in the UI for temps.

@raomin
Copy link
Owner

raomin commented May 10, 2021

1 - pin2.txt is now the proper data I was missing.
2 - pin2.txt is completely different, I would not trust the converter you're using (or the Arduino...?)

so, my first attempt to understand it makes no sense anymore as the value would now be to... 64 deg.
I'll keep digging. Thanks!

Ah also, I thought that you don't need a relay now to test. Just see how your system behaves when you temporarily disconnect the X10A.

@raomin raomin mentioned this issue Apr 5, 2022
@Freeman656
Copy link
Author

Hi @raomin ,
Since our last conversation, have you heard about someone using the TS3A5018 ?
I might try this solution, but not really sure about the consequences on the BIZONE components, will the bizone be shutdown during the commutation ? Is there any recovery mode ? what will happend if the heatpump sends a message during espaltherma connection ?
Is there any code already implemented in ESPAltherma project which could connect/disconnect the bizone as needed during the espaltherma does it's thing...

Now, a final word about another way to handle this issue.
Would it be possible for ESPAltherma to act like a sort of proxy which would send and receive all the messages from the heatpump by default, and sometimes use some down time to send it's own messages ?

@raomin
Copy link
Owner

raomin commented Apr 22, 2022

HI @Freeman656
I don't know anyone having implemented the bilateral switch method. And as I don't have this setup, I cannot test and reply to your questions. But I don't think you can break anything.
I expect the bizone protocol to be resistant to interruption, as there is CRC in all protocol I have seen.

What I would do to handle this at time where ESPAltherma would need to pool data:

  1. switch the TS3A5018
  2. wait a bit for a timeout in case we are in the middle of a message (eg 500ms)
  3. ESPAltherma query and response
  4. reflip the TS3A5018

I really think it's the best way to do it. Be conservative at first, only pull data once every 5 min.

The proxy way could work but:

  1. it would require an additional serial port we don't have (SoftwareSerial could work though) and
  2. with our limited knowledge of this bizone protocol, it might be difficult to know exactly when the message is complete on one end and when to send it to the other side, lastly
  3. if the esp32 is down, your bizone is isolated.

@Freeman656
Copy link
Author

Good points !
How long does ESPAltherma takes to pull all the needed data from the main board ?
And how often do we need to pull data ? ( every 10mn ? 1h ?)

@raomin
Copy link
Owner

raomin commented Apr 22, 2022

How long does ESPAltherma takes to pull all the needed data from the main board ?
It depends on how many registries you are querying. I haven't measured it, but I would say something like 100ms per registry.
(one registry holds several values).
And how often do we need to pull data ? ( every 10mn ? 1h ?)
That's really up to you, data do not change very often. Default is 30s, but you can got for 5m or more...

#define FREQUENCY 30000 //query values every 30 sec

@TonKro
Copy link

TonKro commented May 23, 2022

I also do have a BiZone. Did someone already manage a solution?
Is the data already known to manage a nice solution with the ESP32 only. Is the X10A a kind of bus protocol? Then you know which data belongs to the readings and which not which you then can pass?

@glosair
Copy link

glosair commented Sep 4, 2022

Just had a system installed, can X12A on AP4 be used instead of X10A on AP1?
image

@raomin
Copy link
Owner

raomin commented Sep 4, 2022

Wha @glosair, that's a nice finding.
Where did you find this?

Looks like yes, the X10a is propageted to this other one...
Definitely worth trying!

@spafrost
Copy link

spafrost commented Sep 9, 2022

Had our HP installed this week, and saw the above,

Can confirm X12A appears to work fine with ESPAltherma on my EKCB07CAV3 "Wiring Centre" module.

WC-ESPAltherma

@Freeman656
Copy link
Author

Great news !
Is the wiring/layout the same ?
This seems like some kind of daisy chaining of the X10A over multiple modules...

@spafrost
Copy link

spafrost commented Sep 9, 2022

Yeah, identical - with Pin 1 (VCC) at the top of the plug =]

@Freeman656
Copy link
Author

I tried the same, and I confirm this is working fine !

@raomin Finally !! It's working !

@haz-69
Copy link

haz-69 commented Sep 9, 2022

Does the x12 connectit exists on Altherma EHVZ08S18DA9W
?
CC3F7F51-3F80-4D23-BACF-FC00581085AD

@glosair
Copy link

glosair commented Sep 9, 2022

Does the x12 connectit exists on Altherma EHVZ08S18DA9W ?

Having a look at the installation manual I would say it's the blue connection on A5P but don't hold me to it ;)

image

https://www.manualslib.com/download/1360382/Daikin-Ehvz04s18da6v.html

@glosair
Copy link

glosair commented Sep 9, 2022

Great news ! Is the wiring/layout the same ? This seems like some kind of daisy chaining of the X10A over multiple modules...

If you look at the green connector above the blue and white ones it appears to be a current loop interface connected to the serial interface (X10A or equivalent) on the heat pump controller.

@glosair
Copy link

glosair commented Sep 9, 2022

Spafrost who was your installer?

@TonKro
Copy link

TonKro commented Sep 9, 2022

On the board next to the board with X10a there is indeed another board with X12A.
This is the one for the esp to connect instead of X10a?

20220909_184940

@glosair
Copy link

glosair commented Sep 9, 2022

Yup

@TonKro
Copy link

TonKro commented Sep 10, 2022

I can confirm as well it works via X12A. Equipment EHVZ08S23E6V bizone using ALTHERMA(BIZONE_CB_04-08KW).h.

@raomin
Copy link
Owner

raomin commented Sep 10, 2022

That's great news everyone!
Thanks for reporting success, I'll update the readme page!

@raomin raomin closed this as completed Oct 18, 2022
@haz-69
Copy link

haz-69 commented Oct 19, 2022

I can confirm as well it works via X12A. Equipment EHVZ08S23E6V bizone using ALTHERMA(BIZONE_CB_04-08KW).h.

Can some show a picture of the X12A pin configuration ?

@glosair
Copy link

glosair commented Oct 19, 2022

It's th same pinout as in the main instructions

@haz-69
Copy link

haz-69 commented Oct 19, 2022

For shure but the connector is not orianteted in the same way.

@glosair
Copy link

glosair commented Oct 19, 2022

The connector is keyd but top should be pin1 as marked on the PCB

@haz-69
Copy link

haz-69 commented Oct 19, 2022

image
You mean this is pin1?
IMG_3717 - kopia

@glosair
Copy link

glosair commented Oct 19, 2022 via email

@raomin
Copy link
Owner

raomin commented Oct 19, 2022

I'll take one of the picture and add it to the Readme. Thanks

@glosair
Copy link

glosair commented Oct 19, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Exploration Looking for the unknown!
Projects
None yet
Development

No branches or pull requests

8 participants