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

Control over serial port #1

Open
raomin opened this issue Dec 22, 2020 · 37 comments
Open

Control over serial port #1

raomin opened this issue Dec 22, 2020 · 37 comments
Labels
Exploration Looking for the unknown!

Comments

@raomin
Copy link
Owner

raomin commented Dec 22, 2020

This issue is to discuss possible information and implementation on the control of registry values through the daikin protocol I.

@miguelangel-nubla
Copy link
Contributor

Maybe http://es.intpre.daikineurope.com/binaries/Configurator_v2_3_0_tcm705-334155.zip can give some hints...

Edit: original comment deleted.

@raomin
Copy link
Owner Author

raomin commented Jan 3, 2021

I've had a quick look already but gave up as Configurator do not work with Altherma.
I'll have a deeper look to see if it can give some hint anyway.
Thanks.

@KalaNagHTD
Copy link

This Daikin Configurator is for AC units only and definitely not compatible with the Altherma

@raomin raomin added the Exploration Looking for the unknown! label Jan 17, 2021
@timd93
Copy link

timd93 commented Jan 25, 2021

The configurator should be compatible with Altherma, but not yet in the release mentioned by @miguelangel-nubla .
Attached latest SW and all info I could find.

IOM configurator 4PEN328530-1G.pdf
Configurator_v2_8_0.zip
Features and release notes Daikin Configurator_2.8.0.pdf

@KalaNagHTD
Copy link

KalaNagHTD commented Jan 25, 2021

Good info! Unfortunately the HPSU / ECH2O internal unit uses a Rotex/Kromschröder controller in a unique combination with the Daikin A1P board. That is different to all other Althermas, where the configurator can be used. Nevertheless some reverse engineering might be usefull.

@stosoorok
Copy link

I'm also interested in control over serial port. Like the "powerful DHW heating" option in the discontinued Daikin app.

image

@misko903
Copy link

misko903 commented Feb 4, 2021

@stosoorok , download the new Daikin Residential Controller app. I can control it over there (Altherma 3 R F)

@KalaNagHTD
Copy link

KalaNagHTD commented Feb 4, 2021

Does not work with HPSU / 3 R ECH2O!

@raomin
Copy link
Owner Author

raomin commented Feb 14, 2021

I'm now following another track: on the secondary board that holds the user interface of my Altherma 3 there are two RJ11 port that are connected to two CAN transceivers.
IMG_20201215_111905

The Esp32 has a CAN controller. So it would just require an extra CAN transceiver (eg TJA1050) to connect to it.
I will try this.

I know that the CAN bus is directly accessible on Rotex (https://github.com/Spanni26/pyHPSU) . Can Daikin ALTHERMA users confirm if they have these RJ11 ports also on their machine?

Does anyone have a clue why there are 2 can buses?

@misko903
Copy link

Hi @raomin , today I was taking down the front panel, because of my Smart Grid system. I can confirm those two RJ11 connectors, thinking from the beginning about what they are for.
Altherma 3 R F (Air to floor).
I remember that the Daikin mechanic told me that the usb port should be used for uploading new firmware by user. However, this is not 100%.

Once the M5Stick come, I will definitely use it for automation of my photovoltaics excess power - I need to switch off the heating to make it work.

Thanks, keep on the good work!

@raomin
Copy link
Owner Author

raomin commented Mar 24, 2021

A new possible breakthrough to follow...: #40

@budulinek
Copy link

Congratulations @raomin to a very nice project!

I am able to control my Daikin Altherma, through the P1P2 port. Here is my project, build on the excellent work done by Arnold-n:

https://github.com/budulinek/Daikin-P1P2---UDP-Gateway

It is a simple P1P2 <-> Ethernet UDP gateway. No fancy GUI, no MQTT (too small RAM on Arduino). Only HEX data via UDP. But it works and it is reliable.

Very briefly about P1P2 port: it is not a CAN bus. Actually, P1P2 is Daikin's implementation of the "Home Bus System (HBS)". It is used to communicate between the heat pump and the main controller (user interface).

I believe that P1P2 port is the best (and probably the only) way to both monitor and control Daikin Altherma:

  • It works. I have been using my P1P2 gateway for almost a year in real life, as my main way to remotely monitor and control my Altherma (through Loxone home automation system).
  • P1P2 was developed by Daikin for the purpose of controlling the heat pump. Actually, it is used not only by Daikin's own controllers (main user interface, LAN adapter), but also by 3rd party controllers (KNX adapter by Zennio, Modbus adapter by Intesis, and few more). When you use P1P2, you are not "hacking" into some internal communication line of the heat pump.
  • It is safe. The P1P2 gateway listens to the communication between the heat pump and the main controller in order to monitor the heat pump. But when it comes to writing (controlling), the P1P2 adapter does not control the heat pump directly, it only sends commands to the main controller (user interface). This is how all other commercial adapters and controllers attached to the P1P2 port work.
  • The commands sent by my P1P2 adapter are immediatelly reflected on the display of the main controller (user interface) of the heat pump. For example, when you change the target temperature remotely, within a second the display of the main controller shows the new value.

Of course, there are also problems and obstacles when it comes to the P1P2 port:

  • The P1P2 protocol is proprietary and the only way to identify the commands is by reverse engineering. I was able to identify a lot of commands, incl. on/off, heating/cooling, DHW boost, temperatures (for room temp, and for the leaving water temp) - see https://github.com/budulinek/Daikin-P1P2---UDP-Gateway/blob/main/Payload-data-write.md . But more work is needed.
  • You need additional HW (transciever). Arnold at https://github.com/Arnold-n/P1P2Serial built a "P1P2 adapter" for Arduino, using the Mitsumi MM1192 transciever (I got one adapter from him). MM1192 is a very old chip, it could be hard to find. But fortunatelly, Maxim Integrated recently released new HBS transciever: MAX22088.

MAX22088 looks very promissing (see https://www.maximintegrated.com/en/products/interface/transceivers/MAX22088.html for specs, sample circuits and brief summary of the Home Bus). I would like to try the MAX22088 chip, but the problem is that I do not have the skills to build the PCB. I do not have the soldering skills (MAX22088 is too small for hand soldering). I do not know how to design a circuit.

So this post is actually a call for help - is anyone interested in the P1P2 port? I did my bit with reverse engineering the protocol and Arduino programing, but I need help with the hardware design and testing:

  • Can anyone design a PCB for the P1P2 <-> Serial adapter with the MAX22088 transciever?
  • MAX22088 is too small for hand soldering, but if there is enough demand, we can collectivelly order a batch of PCBs at one of the PCB assembly services in China.

P.S. Few notes regarding the X10A port:
I looked into it few years ago. It has some advantages. Easy to connect (serial) and freely available register definitions (the easiest way: download apk for an Android app called "Daikin AC Monitoring Tool(GLB)", unpack the apk, browse to \assets\DataModule\Global\Conv\ and here you can find registry definitions for individual models).
But after studying manuals for Daikin programs and devices which connect to X10A (for example https://nanopdf.com/download/daikin-configurator-v2xx-1-introduction-2-features-3-minimum-pc_pdf http://tinlavir.ro/parteneri/2_VRV/2_Outdoor_Units/01_RYYQ-T_VRV-VI-CH-HP/Documents/4_Accessory_Manuals/IOM_VRV_configurator_EKPCCAB.pdf or http://daikinspare.com.ua/download/dmmt/Mobile%20Monitorint%20Tool%20User%20Manual%20Android.pdf )
I came to conclusion that X10A can be used for:

  • monitoring
  • downloading and uploading settings
  • updating FW

But I am quite sceptical about the possibility of using X10A for controlling the heat pump during normal operation.

@Arnold-n
Copy link

Arnold-n commented Aug 1, 2021

Thanks to both @raomin and @budulinek for your great work!
I have a few MAX22088s here and intend to make a PCB with it that is pin-compatible with the MM1192-hat. But given that it is a tiny chip, not sure when/whether that will succeed.

@budulinek
Copy link

Hi Arnold,
nice to hear you again! Yeah, I saw the specs for the chip, it is tiny. I really think that PCB assembly service is a way to go (https://blog.squix.org/2019/09/pcb-assembly-service-review.html).

Design a PCB. Build one prototype (by hand or using a PCBA service - even though it may be a bit expensive to do that with a single prototype). Test the prototype. Order a larger batch of PCBs from a PCBA service to get a reasonable price. Distribute PCBs among ourselves. Sell excess PCBs on https://www.tindie.com/.

@raomin
Copy link
Owner Author

raomin commented Aug 2, 2021

Hi @budulinek, thanks for your interest.

I'm well aware of P1P2 protocol and the nice work by @Arnold-n on it (I also got one of his pcb to connect to it). I do believe a canbus-like port is good for controlling a heatpump and chaining controllers, that's make complete sense. Still, I was a frustrated that it would take so much to interact with an heat pump while connecting on a serial port is so simple.
That's why I did ESPAltherma, so that everyone could monitor (and to a very little extend control) his/her heatpump with an esp32 and 4 wires.

You know that the Daikin Configurator (not supported in late Altherma if I understood well) set registries values through X10A, and if you look at #40 you'll see that the X10A port is also used by the communication of the main board with the dual zone, so I still believe this serial port has more capabilities than you suggest. Let's hope that we'll find out soon how to exploit them.

@budulinek
Copy link

@raomin Yes, I saw #40 .I looked at the logs, But they do not look familiar to me from what I saw on port P1P2. I wish you luck on X10A, I was just bit afraid that we are duplicating our efforts. Figuring out the timings and finding out when it is save to write to the port? Arnold already did that for P1P2 port. Changing settings on Altherma and monitoring the port? Sounds familiar to me...

@Arnold-n Maybe this could help you with prototyping MAX22088:

https://www.aliexpress.com/item/4001054495151.html

Still bit expensive, but I am ready to support you.
Regarding the form factor, maybe it is not necessary to do it pin-compatible with Arduino. So that it could be used with other microcontrollers (such as ESP32). The disadvantage of the MM1192 adapter is that it relies on software serial. My hope is that MAX22088 would behave differently and that it would connect to normal HW serial which would make the adapter platform-independent.

@Arnold-n
Copy link

Arnold-n commented Aug 3, 2021

Thanks for your support, @budulinek, but I think I can reflow solder the MAX22088 even though it is 0.5mm pin distance and would like to try that first. Unfortunately the MAX22088 does not do any HBS<->serial conversion, so an ATmega and P1P2Serial library (or similar) is still needed. The MAX functionality is really very similar to the MM1192 except that it provides some termination circuitry and more importantly a bus-based 5V 70mA power supply - as a result there is no need for a separate 5V DC/DC convertor to power the P1P2-side from the Si8621. Cost-wise the components of the overall solution will be the same (MAX replacing the DC/DC convertor); and just a bit smaller and perhaps more reliable. Supply of XL1192S so far is good, I just got a new set of them.
As to X10A vs P1P2, an advantage of X10A over P1P2 might be that it is - perhaps - more standardized over different heat pumps. I have the impression that the P1P2 protocol varies too much over different models. But indeed P1P2 is less intrusive as it only mimics an auxiliary controller and does not require access to the X10A connector.

@budulinek
Copy link

I did a little bit of googling and came across a patent for the HBS <-> RS232 converter:
https://patents.google.com/patent/CN201252573Y/en

The patent protection already expired, so it is free for us to use. What do you think @Arnold-n ? Isn't it too complex? There is a circuit diagram in the patent application, but I could not find specifications for resistors and capacitors used in the circuit.

@Arnold-n
Copy link

Arnold-n commented Aug 4, 2021

In my opinion it is too complex: it uses many components instead of an Arduino (which could be a Arduino nano if size matters). Also, the possibility to detect bus collisions (and interrupt transmission) is lost. For converting P1P2 to (but not from) serial there is a working solution including component values: M-NET-Sniffer.

@FMode
Copy link

FMode commented Jan 30, 2022

This thread is nice!
I have the password Q3UjYU1hJlUhc2Y= (base64 encoded!) for the Access Database of "D-Updater"
I flashed my RHYHBH08AAV3 to a RHYHBX08AAV3
Pin4 is to enable the bootloader that you can flash the application.

@martindell
Copy link

I've got @raomin 's M5StickC solution working great for monitoring and I had a Realtime RTD LT/CA unit lying around which does control most things EXCEPT turning DHW on or off. @Arnold-n I'd be happy to chip in and help fund a native P1P2 hardware interface if that helps?

@Arnold-n
Copy link

@martindell:

I'd be happy to chip in and help fund a native P1P2 hardware interface if that helps?

Thanks for the support but at the moment not needed: the first PCBs for a stand-alone bus-powered P1P2-MAX22088-Atmega-ESP-wifi/mqtt prototype have been ordered, and a breadboard version is running here. In a couple of weeks I hope to have this working. It will fit nicely in a small enclosure.

Is that what you meant with native?

@martindell
Copy link

Ah great news @Arnold-n thank you for progressing this. I'm really looking forward to trying this out as soon as it's available.

@Arnold-n
Copy link

Arnold-n commented May 11, 2022

Hi @martindell, the first PCB is running here succesfully (picture and details). The (renewed, to be released) ATmega code is working great even at 8MHz; I am now cleaning up and improving the bridging code to MQTT on the ESP.

@tarmor1
Copy link

tarmor1 commented May 24, 2022

Great work @raomin! Been using ESPAltherma for 2 months now and drawing beautiful graphs with HomeAsssistant.
I have observed as well work by @Arnold-n and will try it out too.
Has anybody tried using the Daikin Demand PCB board EKRP1AHTA for power limitation? Internet is very blank on that keyword. That looks somewhat as a simpler alternative to program via ESP or Arduino instead of SG1/2 that seem to me are only available for my second Alterma gen via BRP069A61 (which I don't have).

@dncex
Copy link

dncex commented Aug 24, 2022

according to the latest findings, is there a way to set the LWT (leaving water temperature) via ESPAltherma?

@Michiel-S0
Copy link

@FMode where can I find the new firmware and how do I update this?

@FMode
Copy link

FMode commented Dec 11, 2022

You can register (for free) as Daikin partner
or this one:
http://ybshare.com/download/rdvt6hxrx9#download

@Michiel-S0
Copy link

Thanks for the download. Where can you register? I tried to register on the Daikin business portal, but Daikin rejected my registration.

@FMode
Copy link

FMode commented Dec 11, 2022

I registered some years ago with my company's email from work ....

@tkroon89
Copy link

tkroon89 commented Jan 14, 2023

according to the latest findings, is there a way to set the LWT (leaving water temperature) via ESPAltherma?

I am also very interested in this. The heating curve was changing too much during the day. Now I’ve set it as static, and change it (if needed) once a day. If I could automate this it would be great!!

@Tardymo
Copy link
Contributor

Tardymo commented Jan 15, 2023

You can try setting averaging time in your Altherma unit.

Quote from the manual:

The average timer corrects the influence of ambient temperature variations. The weather-dependent setpoint calculation is done on the average outdoor temperature.
The outdoor temperature is averaged over the selected time period.

@DDoykov
Copy link

DDoykov commented Mar 29, 2023

Hello,
Last week i got my hands on ROTEX RKHBH008BA9WN.
I found commands which read or modify the eeprom values. Quickly wrote some code to extract the eeprom values. Located the actual eeprom on the back of the PCB and desoldered and dumped it. When comparing the two i didn't find any difference.
After that i found which address changes when changing the setpoint from the remote, but when i write new value it does not change.
I am sure that command for writing in eeprom work, because i was able to change the unit from heating only to heating/cooling.
Tried to disconnect the remote, but writing to that setpoint address was again not possible.
What could be preventing me to change the value?

Tried some other newer Altherma's to read and write some adresses of their "eeprom" with success.

@MichaelST01
Copy link
Contributor

I have a new Daikin Altherma 3 H MT W connected with the DCOM LT/MB Modul.

I can set via Modbus the following values:

1 Leaving Water Main Heating Setpoint / 25 .. 55ºC
2 Leaving Water Main Cooling Setpoint / 5 .. 22ºC
3 Operation Mode / 0: Auto, 1:Heating, 2:Cooling
4 Space Heating/Cooling On/Off / 0:OFF 1:ON
6 Room Thermostat Control Heating Setpoint / 12 .. 30ºC
7 Room Thermostat Control Cooling Setpoint / 15 .. 35ºC
9 Quiet Mode Operation 0:OFF 1:ON
10 DHW Reheat Setpoint / 30 .. 60ºC
12 DHW Reheat On/Off / 0:OFF 1:ON
13 DHW Booster Mode On/Off / 0:OFF 1:ON
53 Weather Dependent Mode / 0:Fixed 1: Weather Dependent 2: Fixed+Scheduled 3: Weather Dependent+Scheduled
54 Weather Dependent Mode LWT Heating Setpoint Offset / -10 .. 10ºC
55 Weather Dependent Mode LWT Cooling Setpoint Offset / -10 .. 10ºC

It works quite well.

@raomin
Copy link
Owner Author

raomin commented May 11, 2023

Thanks @MichaelST01. That modules acts as a gateway P1P2 <-> Modbus.
I would be interested to see the components on the board to see if there is some intelligence in there or if it's more a raw can <-> modbus interface. Could you post a pict of the PCB?

@MichaelST01
Copy link
Contributor

Sure, here it is:

IMG_5774
IMG_5768

@tmulkern
Copy link

I'm now following another track: on the secondary board that holds the user interface of my Altherma 3 there are two RJ11 port that are connected to two CAN transceivers. IMG_20201215_111905

The Esp32 has a CAN controller. So it would just require an extra CAN transceiver (eg TJA1050) to connect to it. I will try this.

I know that the CAN bus is directly accessible on Rotex (https://github.com/Spanni26/pyHPSU) . Can Daikin ALTHERMA users confirm if they have these RJ11 ports also on their machine?

Does anyone have a clue why there are 2 can buses?

Hey there, I did a bit of digging and I found that the two CAN bus connectors seems to be used for the RoCon CAN bus system

https://www.daikin.fr/content/dam/document-library/operation-manuals/heat/air-to-water-heat-pump-low-temperature/RoCon%20HP_EHS157034_EHS157068_0081420844_Operation%20manuals_English.pdf

raomin pushed a commit that referenced this issue Oct 18, 2023
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