Giter Club home page Giter Club logo

arnold-n / p1p2mqtt Goto Github PK

View Code? Open in Web Editor NEW
272.0 272.0 57.0 73.31 MB

Monitor and control Daikin/Rotex (hybrid/Altherma) heat pumps via the 2-wire P1/P2 thermostat interface with an ATmega328P, ESP8266, and electronics. The P1P2Serial library and P1P2Monitor program perform low-level bus operation, the P1P2-bridge-esp8266 program interprets data from/to MQTT supporting Home Assistant MQTT discovery. P1P2Serial may also be used for other Japanese Home Bus System based standards: DIII-NET (F1/F2) bus, Mitsubishi M-Net bus, Toshiba TCC-Link, Hitachi H-link, Panasonic/Sanyo SIII-Net, Haier, York, and others.

License: Other

C++ 82.60% C 17.40%
altherma daikin diii-net diy f1f2 h-link heating-control home-automation hoval hvac m-net mqtt p1p2 rotex siii-net tcc-link

p1p2mqtt's People

Contributors

arnold-n avatar budulinek avatar cian avatar designer2k2 avatar fishbone-git avatar gmcmicken avatar patrickrudolph avatar rothn avatar schaap88 avatar siro20 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p1p2mqtt's Issues

FXMQ-P7 Series

I will use this thread to organize my research process on [FXMQ-P7 series] (http://www.daikintech.co.uk/Data/VRV-Indoor/FXMQ-P/2014/FXMQ-P7VEB/FXMQ-P7VEB_Databook.pdf)

My indoor unit is FBQ60C7VEB, my outdoor unit is RXS60F2V1B.

There is an protocol dump where I pressed turn on and off button at 24:00 and 24:10
https://docs.google.com/spreadsheets/d/1w95OQW-eVxMFEjkyJB_ZmwWfgBITxUhmqZfW2W5A39E/edit?usp=sharing

It seems that protocol is different from https://github.com/budulinek/arduino-altherma-controller/blob/main/Payload-data-write.md

Support for EKH/RKH systems - such as Rotex RKHBRD016 (Daikin Altherma EKHBRD-ADV17), strange values

Hi,

First of all, thanks to Arnold for sending the P1P2ESP quickly, it arrived within 2 days and, looking at the construction method, I can only say that it is like an commercial product! After I received it I immediately got tinkering.

Unfortunately it seems that my heat pump is not supported. The values fluctuate on some sensors (not all) and the values are not correct.

Below is a screenshot of the HA interface.

I am not a programmer but a hobbyist. I would like to hear if and how I can help with providing logs etc. so that this heat pump can also be supported. The values I am particularly interested in are;

  • DHW temp
  • Leaving / return temp
    -Outside temp

Kind regards, Barry

p1p2

New HA Climate integration in 0.9.43 missing?

I flashed P1P2-bridge-esp8266 v0.9.43 (P1P2-ESP-Interface version) for Daikin E-series as i saw description even in earlier releases that preliminary climate controls were added. However i do see only sensors, there is no climate object yet. Is it not supported yet or do I need to do anything in addition? I was hoping for some easier controls of DHW/Heating on/off (and boost DHW to turn it on when I have extra power from PV). Thanks for info.

Write parameter via MQTT unreliable

I use the Home Assistant to set the hot water temperature several times a day depending on the electricity price. For example, I publish the value "E 35 2F 1" in the topic P1P2/W to set the hot water temperature to 30 degrees.

Unfortunately, this rarely works... Strangely enough, it sometimes works if I simply publish the same value again without resetting the P1P2 module. Most of the time, however, it only works exactly once, then not again until the module is reset.

In my MQTT Broker the value is reliably published by HA.

It seems that either the P1P2 module only sometimes reads the value (why?), or the heat pump only sometimes accepts the value from the P1P2 module (why?).

MQTT settings lost during firmware update

I just updated both controllers to the latest firmwares (P1P2MQTT-bridge-v0.9.50-Daikin-E.ino.bin and P1P2Monitor-v0.9.46-Daikin-E.ino.hex via OTA, web and avrdude respectively).

After the update, the P1P2bridge tried to connect to an MQTT broker at 192.168.4.12 with default P1P2 user and password instead of the 192.168.2.x IP and the user and password I had set. The Wifi credentials were still the correct ones from before the update, so it was correctly connected to my network with a 192.168.2.x address.

This made setting new MQTT credentials via webinterface impossible (no 192.168.4.1), but I could set them via telnet, so everything is fine for me.

Note that I updated from a prerelease v0.9.45rc30 (Arnold, you sent me that one in March), so if this is only an issue with this test rc version, the issue can be closed immediately.

BTW: The documentation you sent me mentions a B command to set up MQTT via telnet. This command was not available and I used P instead.

About P1P2 energy consumption data

Hi Arnold,

Firstly, thanks for this great job.
I'm wondering if it is possible to periodically get Energy consumption data from P1P2. Does P1P2 some how send data?

You defined KLICK-DA is a way to get it, but without KLICK-DA are we able to get it?

Smart grid option

Our Daikin heatpump has two relays for smart grid connectivity.

I am not sure if this is even within the protocol, but could this project support the smart grid features as well?

P1P2 Serial will not connect to Wifi

Yesterday I had to reset my router and since then P1P2 Serial has lost connection. When I connect to the AP and input the credentials it does not connect anymore. I have not had this issue previously, it always reconnected without issue, even when its power was switched off/on.
After entering the credentials and saving it just opens the AP again. Unfortunately I cannot find where things go wrong.

Any suggestions to make the module connect again?

mqtt reconnect timeout

hey, i am using the module now for a few days. in general it works good :)

my problem: every night, i stop all my docker containers (including mqtt server container and ha docker container) for backup purposes. after the backup they are restartet. the duration for this is 10 to 15 minutes.

the p1p2serial module is not reconnecting at all, all sensors are "unknown" in ha. after the command "d1" via telnet, all is working fine again.

is there any reconnection implemented in the software? if yes: is the a maximum timeout? could this be configured in any way?

Invalid heat pump power measurement?

Thanks for this great project and hardware!

I have a strange heat pump power measurement behavior (see graph below). The orange line are the numbers directly reported from the heat pump. The blue line are the numbers read from a smart power meter. The orange line should be a little bit lower than the blue line but it is the other way around. What is really strange is that sometimes the reported orange numbers are negative. Can it be that the heat pump power measurement is wrong?

image

Firmware: 0.9.43
Daikin EHBX08DA9W

invalid json in HA sensor discovery for Water_pressure

Hi Arnold,

Something minor for Water_pressure. There is an invalid json in the HA sensor discovery. It looks like unit_of_meas is missing. "bar" is in the string, but the key is missing.

{"name":"M1_Water_pressure","stat_t":"P1P2/P/018/M/1/Water_pressure","uniq_id":"M1_Water_pressure_018",bar"ic":"mdi:water","dev":{"name":"P1P2-018","ids":["P1P2ID018"],"mf":"NPC","mdl":"P1P2MQTT_bridge","sw":"0.9.41"}}

[Home Assistant] some topics fail discovery

Home Assistant logs attached below. I suspect te issue is an MQTT buffer problem as it seems to be the very long topic names that get cut off at the end, so the discovery topic fails to parse due to missing closing } at least
halogs.txt

Error when compiling

Hello, I try to compile the code and I get error:
/P1P2Serial/examples/P1P2-bridge-esp8266/P1P2-bridge-esp8266.ino: In function 'void process_for_mqtt_json(byte*, int)':
P1P2-bridge-esp8266:1465:17: error: 'bytes2keyvalue' was not declared in this scope
1465 | if (n == 3) bytes2keyvalue(rb[0], rb[2], EMPTY_PAYLOAD, rb + 3, mqtt_key, mqtt_value);
| ^~~~~~~~~~~~~~
P1P2-bridge-esp8266:1469:23: error: 'bytes2keyvalue' was not declared in this scope
1469 | int kvrbyte = bytes2keyvalue(rb[0], rb[2], i - 3, rb + 3, mqtt_key, mqtt_value);
| ^~~~~~~~~~~~~~
P1P2-bridge-esp8266:1491:40: error: 'bits2keyvalue' was not declared in this scope
1491 | int kvr = (kvrbyte == 8) ? bits2keyvalue(rb[0], rb[2], i - 3, rb + 3, mqtt_key, mqtt_value, j) : kvrbyte;
| ^~~~~~~~~~~~~
exit status 1
'bytes2keyvalue' was not declared in this scope

I'm doing something wrong? What can I do to compile correctly? Thank you!

WiFi backdoor

This vector is highly unlikely, but still exists.
Each time device looses connection, it will reopen public hotspot.
The wifi password of this hotspot is already in databases.
If anyone would just drive by in a car, send wifi deauth beacons, it will make device expose itself.

My proposal: if the device has no wifi connection, create hotspot only after restart (physical key press)

Altherma 3 RW (EHBH08EF9W) interpretation

Hi Arnold,

Been watching the data on MQTT and home assistant for two days now, and most of the times the mqtt data and HA sensors make sense.

One sensor I am missing though is the operation. In espaltherma this is the 'IU Operation Mode' which is delivered as Stop or Heating.
I am unable to find the right counterpart in p1p2serial.
Presumably one of the OnOff ones, but none are chaning their state. For instance 'S0_Heating_OnOff' is always 1 and does not change.
Any pointers for me on the meaning on some of the sensors?

Also, I am heavily using home assistant in my setup and see it is being worked on.
One thing that may make intergration better is to prefix all HA sensors with 'P1P2_' because the current names are too generic and not unique. Prefixing may help with the finding of the right sensors.

Thanks, Trant

Simulate Madoka room thermostat with P1P2Serial

Is it possible to simulate an external Madoka room thermostat with the P1P2serial module?

My idea: activate the external room thermostat function in my Altherma, then setting the current room temperature with the p1p2 module by writing it via MQTT to the Altherma. with that, I could set the desired room temperature and control the behavior of the Altherma.

My understanding is that the only missing feature is writing the room temperature to the correct register.... or maybe this is already possible?

Combining LWT heating and cooling entities.

Right now, with the system set to cooling, both thermostats show as "on", heating and cooling.

Could it be possible to mix HC_LWT Abs_Cooling and HC_LWT Abs_Heating into a single entity?
Mode command could link to HC_Mode Heating_Cooling_Auto, and current status (for reporting) can be read from HC_Mode Climate_Cooling and HC_Mode Climate_Heating entities which work as expected for cooling, heating, and auto modes.

Cannot set quiet mode on an Altherma 3 R W

Just installed to test the power limits in quite mode (as suggested in #69 (comment)), but I am not able to set the quiet mode / quiet level.

In HA I see Quiet_Level, Quiet_Level_When_On and Quiet_Mode. The latter do not reflect the actual setting of the heatpump and changing them has no effect. Quiet_Level actually changes correctly if I manually set the quiet level on the heatpump's control panel, but changing the entity does not have an effect and its value just resets to the old state.

Via telnet I can actually see that the HA entity results in an action on the P1P2bridge:

[MON] 2024-05-19 12:28:59 Initiating parameter write for packet-type 0x3A parameter nr 0x4D to value 0x1
[MON] 2024-05-19 12:28:59 Initiating parameter write for packet-type 0x3A parameter nr 0x4C to value 0x2
[MON] 2024-05-19 12:29:00 Executing E command for packet 0x3A setting param 0x4D to 0x1
[MON] 2024-05-19 12:29:00 Executing E command for packet 0x3A setting param 0x4C to 0x2

I am running an Altherma 3 R W heatpump (EHBX08EF9W) without any additional P1P2 devices (no wall panel, no thermostat, no LAN adapter etc.). (Arnold, you might remember that we were in touch via email in March.)

Also, there are a few things that surprised me about the quiet mode on my pump and I am not sure if that is normal or the reason that it is not working: I am not allowed to change the quiet mode on a user level (only with the installer code) and the quiet mode is not reflected by any field. Both are also documented in the manual (sorry, these are screenshots of the German manual, but hopefully it still illustrates what I mean).

image
The two asterisks mean "only accessible by the installer", so I am allowed to change the programming if in auto mode, but noch change the mode or level as a user.

image
This is the quiet mode level setting and the empty second column is where other settings have a field code associated with them.

Not sure if any of this is unusual or related with the problem.

I have a sample set extracted, now how do I interpret the payload

I have managed to get a large data dump from my Daikin VAM; I have get this into Excel.

I can see various notes about different packet types, etc.

How do I take the next step to interpret this info?
(I am hoping to give Arnold an XLS with the various data interpted quite well, as I have about 6 or 7 different types of indoor units and VAM)

image

VAM Raw Data.xlsx

counter request mode not reliable

When trying to activate the counter request mode via telnet it sometimes works, sometimes not. When not working I get these messages:

P1P2/S/009 * [ESP] To ATmega: ->C1<-
P1P2/S/009 * [MON] Single counter request cycle initiated
P1P2/S/009 * [MON] T  0.024: -PE:4000B8000000000000000000000000000000000000007A readError=0x0004
P1P2/S/009 * [ESP] Uptime 1380
P1P2/S/009 * [MON] T  0.024: 4000-PE:B0-PE:10-PE:00-PE:00000000000000-PE:00-PE:00-PE:00000000-PE:4059 CRC error readError=0x0014
P1P2/S/009 * [ESP] Uptime 1390
P1P2/S/009 * [MON] T  0.024: -PE:4000B800000000000000000000000000-PE:80-PE:80F2 CRC error readError=0x0014
P1P2/S/009 * [MON] T  0.024: 4000-PE:A4-PE:01-PE:04-PE:040000-PE:08000000-PE:10-PE:04-PE:0400000000000000DA CRC error readError=0x0014
P1P2/S/009 * [ESP] Uptime 1400
P1P2/S/009 * [MON] T  0.024: -PE:40-PE:005C02-PE:00-PE:200000-PE:000000-PE:00-PE:00-PE:000000-PE:20-PE:40F2 CRC error readError=0x0014
P1P2/S/009 * [ESP] Uptime 1410
P1P2/S/009 * [MON] T  0.024: 40A0-PE:A1-PE:A8-PE:02-PE:02EAFB-PE:C3-PE:F9-PE:FF-PE:FF-PE:01-PE:01-PE:01-PE:FF-PE:FF-PE:FF-PE:0300000029 CRC error readError=0x0014
P1P2/S/009 * [ESP] Uptime 1420
P1P2/S/009 * [ESP] Uptime 1430

After the "not working case" the Auxiliary controller mode is disabled automatically, too. I cannot reenable it afterwords, I get the following error message:

P1P2/S/009 * [ESP] To ATmega: ->L1<-
P1P2/S/009 * [MON] Errorspermitted (error budget) too low; control functionality cannot enabled

As already said, sometimes the counter request mode works. I am wondering what I could do to get both modes working reliable. My Daikin model is a Altherma 3 R Ech2O EHSXB08P30E. Any hints?

F1F2 bus extract

I finally managed to get the second controller plugged into the F1F2 bus, which has various ACs connected to it, but no controllers as they are all using remote controls.

  • RXQ20AMY1S (Compressor)
  • FXAQ20PVES
  • FXAQ32PVES
  • FXAQ40PVES
  • FXAQ50PVES
  • FXFQ63AVS
  • FXFQ125AVS
  • FXSQ100PAVS

A good few hours are in this log with various AC units being cycled through various settings

mylog6.txt

ΒΊC vs Β°C

You might notice by eye a slight difference in the degree symbols.

And as they are different, the cannot be compared or plotted in the same graph by home-assistant.

I wanted to put in a pull-request with a fix, but I cannot seem to find the code snippet that causes this. The 'wrong' item is S1_DHW_Comfort_Status

Sensors for Power Consumption and Realtime COP not working

Maybe it's the same problem: My sensors for Power consumption (HC_Power) and Realtime COP (HC_COP) are always 0. Power Production Sensors are working, COP-Lifetime seems also correct. What could I check to find the reason for that? :)

Usage without existing Daikin control module

I was wondering, can the presented module work without a Daikin control module attached to the P1P2 port? I have an Altherma 3 without central module but with external thermostat that just gives an on/off relay signal on a different port.

If so, can the P1P2toMQTT do the following things:

  • Turning on/off room heating/cooling
  • Set dynamically the current/power limit
  • Read the on/off state of the external thermostat
    These are all things that can be set/read from the heathpumps display, but not sure if they are accessible over P1P2?

Control outdoor unit without requiring an indoor unit?

Could this project be used to switch on an outdoor unit without the use of anything else (IE an indoor unit, control module etc)? Ideally I would be able to make the outdoor unit run and control its output (what parameters are made available to the indoor unit I don't know - for instance maybe the indoor unit controls the EEV or maybe it just asks for a particular amount of cooling / heating - but somehow the outdoor unit can ramp up and down its compressor power, vary the EEV opening and control the reversing valve, whether under its own control or the indoor units control IDK).

Why:
I have access to free outdoor units sometimes (never with a matching indoor unit though) and I would like to hack together a water to water heat pump. I can make an open loop GSHP system as I have ground water. Buying a heat pump like this would be very expensive and I have experience with the brazing, charging etc of non inverter HVAC systems like these but since most of the units that are made available to me now through my local scrap yard are inverter, and since inverter is much better, I would like to use an inverter system to cannibalise. I would use a water heated evaporator of my own construction and an indoor underfloor heating loop driven via a plate heat exchanger - so I need to hack the original aircon unit completely to bits. Controlling the compressor myself is the sticking point though.

Thanks, Pete

hc_bridge_v_interface not handled correctly

This sensor is flooding my logbook in Home Assistant when the value changes (e.g from 14.7V to 14.8V)
It is somehow not handled as a numeric value but more as a string?
At least when I click on this entity no graph is showing but only the history (Verlauf)

Fallback hotspot doesn't stop if wifi is available again

We just had a full power-outage. And the P1P2Serial device was booted way before my router was.

Therefor the fallback hotspot was enabled. However when the wifi was finally up, the hotspot stayed and the mqtt connection was (thus) not established.

Easily fixed by a powercycle of the heatpump. But next time I might not notice it and we go weeks without logging πŸ™‚

So this is a minor, but might be easy to fix, dunno. Some frameworks provide such a hotspot fallback themselves (esphome).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.