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 · 49 comments
Open

Control over serial port #1

raomin opened this issue Dec 22, 2020 · 49 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
@nukeftp
Copy link

nukeftp commented Dec 4, 2024

Sorry for all. I know my question does not belong to this thread. I try to reach Fmode (Steffen). My message can for sure be deleted after Steffen read this. I try to change the Indoor Unit from an hybrid to an wp only model.

@FMode Hallo Steffen, ich finde leider keine andere Möglichkeit Dich zu kontaktieren, außer hier zu schreiben. Ich würde mich super freuen wenn ich Dich paar Sachen fragen dürfte.
Es geht darum die Daikin / Rotex von HPU (Hybrid mit Gas) auf das reine Wärmepumpen Modell umzuflashen. Ohne die Kommunikation zum Gasmodul geht nämlich aktuell nichts. Error "HJ-11 Keine Kommunikation mit dem Gasmodul"
5 Poliger X10A ist vorhanden. D-Updater ist heruntergeladen und Zugriff auf die DB vorhanden. Hast du vielleicht eine Email Adresse von Dir oder Telefonnummer, die du mir zugänglich machen kannst damit ich dich erreichen kann?

Beste Grüße
Marcel

IMG_1328
IMG_1329
IMG_1336

@FMode
Copy link

FMode commented Dec 4, 2024

Do you have the firmware image of this device without heating device?
If not: have you looked inside the database to find some codeing value to disable the heating device?

Pins:
5 GND
4 "ENABLE BOOTLOADER"
3 RXD
2 TXD
1 5V+

@nukeftp
Copy link

nukeftp commented Dec 4, 2024

@FMode Thanks a lot for your fast reply Steffen,

How to enable the bootloader? Pull Pin4 to GND and then power up the device? without an resistor?

my outdoor unit is RVLQ05CAV3 = hybrid. when i have a look at the datasheets, i think the device: RRLQ004CAV3 is equal (baugleich)
and my indoor unit RHYHBH05AAV3 = hybrid should then be flashed to RHBX04CB3V (+ cooling) or RHBH04CB3V (heating only) when i am right.

unfortunately I do not have the firmware for all of these devices. I thought the D-Updater will download it or do some magic :-D

I only had a few looks to the database until yet. I need some time to understand the structure.

I saw that you have an hybrid model, too? do you use the gas boiler modul?

Best regards!
Marcel

@FMode
Copy link

FMode commented Dec 4, 2024

If unsure always add a resistor when pulling inputs 5V / 330Ohm = 15mA instead of short circuit ampere of your PSU.
I think pull to GND... when I remeber correctly.
The Database contains xls files (!) which are EPROM and Flash maps...
exchange the needed files and let D-Updater do the magic...

Yes I am using the gas boiler.

@nukeftp
Copy link

nukeftp commented Dec 4, 2024

@FMode slowly I begin to understand the structure. But unfortunately I can not find a switch to disable the need of a gas boiler. Sorry I am not an developer. I will investigate further tomorrow. But I think without more hints from you, I will brick the WP when I try to disable the boiler :-(

nice evening
Marcel

@nukeftp
Copy link

nukeftp commented Dec 5, 2024

I was successful to run the D-Updater without any manipulation of the database. now the indoor unit has software: ID4302 and EEPROM AS1706407-10. The version of the outdoor unit and the remote is the same. not changed.
@FMode what have you done in the database to change your unit model? I don't know how to solve the problem.
I dont want to brick the device

@nukeftp
Copy link

nukeftp commented Dec 5, 2024

tabase contains xls files (!) which are EPROM and Flash maps...

I have found these xls files now! that will be exciting when I replace them

@nukeftp
Copy link

nukeftp commented Dec 5, 2024

unfortunately my indoor unit (RHYHBH05AAV3) has CPU R5F3651E
and
the HSPU without gas boiler (RHBH04CB3V) has CPU R5F3651M

dont know is this will work, when I only replace the EEPROM files und keep the software as it is (ID4302). I think it will not work when the software does not match the eeprom values

@FMode
Copy link

FMode commented Dec 5, 2024

Never flash the bootloader - if anything fails you can reflash the Application back.

does the RHYHBH05AAV3 and RHBH04CB3V have the same eprom value names?
Then you might be able to code "gas boiler" to "zero".

@nukeftp
Copy link

nukeftp commented Dec 6, 2024

Hi together,

I tried to change the model in comp_model_range for Procedure_key from RHYHBH05AAV3 to RHBH04CA3V . That model has the same CPU type and eeprom map.

But this does not work. Something is compared with each other and it is not the ID/name of the model in "comp_model_range"
In my opinion it would have the same result if I replace the xlsx files inside the eeprom table from RHBH04CA3V to RHYHBH05AAV3 and try it with procedure_key 60. But I have not tried yet, because the software has also to be upgraded from 4302 to 4304.

grafik

grafik

The big question is. If the updater is successful, but the device does not boot anymore.... How can I revert to the original firmware (eeprom). The updater checks if the devices is bootet with 9600baud. And ONLY if yes, it continious and upgrades the eeprom with ?57600? baud from the bootloader (pull pin 4 to ground and power cycle).

Would be the best if the model could be changed via a setenv command from the loader?!?!?! If yes no modification on the database would be necessary!

@nukeftp
Copy link

nukeftp commented Dec 6, 2024

@DDoykov can you help me the read the eeprom values? is it possible to get your code you mentioned? maybe I can then comprehend what the updater tool reads and why its not compatible.

with best regards!
Marcel

@drRobertDev
Copy link

If understand right there arent any system to edit value? except p1p2 project right? (not use esp32 but arduino) (not use x10 port)

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