Arnold-n / P1P2MQTT

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.
Other
295 stars 61 forks source link

Smart grid option #69

Open Timple opened 1 year ago

Timple commented 1 year ago

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?

Arnold-n commented 1 year ago

I think it is possible within the P1/P2 protocol, and it is on my todo-list; I purchased an BRP069A61 to see to what extent this can be done via P1/P2, but this will take some time. I hope P1/P2 enables for more precise control than is possible via the SG relay inputs.

bausi2k commented 1 year ago

Maybe the hints on this side will help you further: https://community.openhab.org/t/how-to-integrate-daikin-altherma-lt-heat-pump/16488/14

I use the BRP069A61 with a shelly that closes the pins

CleanShot 2023-06-05 at 06 59 33@2x

and I send HTTP Request to the BRP069A61 with the form data to change the value the allowed power consupmtion. This is a bit hacky, but it works. The get the formdata, just open an debug window in your browser and see what is going on, when you change values. But be careful, this only works for an hour, after starting the BRP069A61. After that, the Website will show you a HTTP500 on connection.

Timple commented 1 year ago

I hope P1/P2 enables for more precise control than is possible via the SG relay inputs.

And the P1/P2 wires already run into my house, so saves me some new cabling as wireless connection near/inside the heatpump is hard.

I might look into your suggestions as well @bausi2k

Main purpose for now is to start heating the boiler water when te sun is high. To prevent my solar pannels to drop out due to too high voltage on the main :smile: . I need some consumes and this seems like a useful one.

bausi2k commented 1 year ago

For that case, the BRP069A61 works like a charm. Even if you have a static value for the allowed consumption eg. 3500W the heat-pump takes the power and heats up the boiler(if room buffering is disabled) to the max allowed temperature(60degrees Celsius in my example) event though the desired temperature is only set to 47°C.

olfon commented 1 year ago

and I send HTTP Request to the BRP069A61 with the form data to change the value the allowed power consupmtion. This is a bit hacky, but it works. The get the formdata, just open an debug window in your browser and see what is going on, when you change values. But be careful, this only works for an hour, after starting the BRP069A61. After that, the Website will show you a HTTP500 on connection.

@bausi2k Would you mind to share the needed HTTP request? My LAN adapter always runs into issues after power loss, it is a hazzle to get it running again. Many thanks in advance :)

bausi2k commented 1 year ago

Find the complete HTML file attached and in the code section is the form data.

<html>
    <head>
        <title></title>
    </head>
    <body>
        <form method="post" style="display:initial">
            <h1>
                Smart Grid
            </h1>
            <table id="table_smartgrid" width="40%">
                <tr style="display:table-row">
                    <td>
                        <p align="right">
                            Pulse meter setting
                        </p>
                    </td>
                    <td>
                        <select name="DA_SG_PULSE_METER_SETTING">
                            <option value="0" selected>
                                No meter
                            </option>
                            <option value="4">
                                100 pulse/kWh
                            </option>
                            <option value="5">
                                1000 pulse/kWh
                            </option>
                        </select>
                    </td>
                </tr>
                <tr style="display:table-row">
                    <td>
                        <p align="right">
                            Electrical heaters allowed
                        </p>
                    </td>
                    <td>
                        <input type="radio" name="DA_SG_ELECTRICAL_HEATERS_ALLOWED" value="0">No <input type="radio" name="DA_SG_ELECTRICAL_HEATERS_ALLOWED" value="1" checked>Yes
                    </td>
                </tr>
                <tr style="display:table-row">
                    <td>
                        <p align="right">
                            Room buffering allowed
                        </p>
                    </td>
                    <td>
                        <input type="radio" name="DA_SG_ROOM_BUFFERING_ALLOWED" value="0" checked>No <input type="radio" name="DA_SG_ROOM_BUFFERING_ALLOWED" value="1">Yes
                    </td>
                </tr>
                <tr style="display:table-row">
                    <td>
                        <p align="right">
                            Static power limitation
                        </p>
                    </td>
                    <td>
                        <select name="DA_SG_STATIC_POWER_LIMITATION">
                            <option value="500">
                                0.5kW
                            </option>
                            <option value="1000">
                                1kW
                            </option>
                            <option value="1500">
                                1.5kW
                            </option>
                            <option value="2000">
                                2kW
                            </option>
                            <option value="2500" selected>
                                2.5kW
                            </option>
                            <option value="3000">
                                3kW
                            </option>
                            <option value="3500">
                                3.5kW
                            </option>
                            <option value="4000">
                                4kW
                            </option>
                            <option value="4500">
                                4.5kW
                            </option>
                            <option value="5000">
                                5kW
                            </option>
                            <option value="5500">
                                5.5kW
                            </option>
                            <option value="6000">
                                6kW
                            </option>
                            <option value="6500">
                                6.5kW
                            </option>
                            <option value="7000">
                                7kW
                            </option>
                            <option value="7500">
                                7.5kW
                            </option>
                            <option value="8000">
                                8kW
                            </option>
                            <option value="8500">
                                8.5kW
                            </option>
                            <option value="9000">
                                9kW
                            </option>
                            <option value="9500">
                                9.5kW
                            </option>
                            <option value="10000">
                                10kW
                            </option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>
                        <!-- leer -->
                    </td>
                    <td>
                        <input type="submit" name="DA_SG_SUBMIT" value="Submit">
                    </td>
                </tr>
            </table>
        </form>
    </body>
</html>

Daikin BRP069A61.txt

nicx commented 1 year ago

@Arnold-n any idea when this smart grid feature will be implemented?

@bausi2k am I right that the heat-pump will always be included and its not possible to use only the backup heater? I would like to conserve the heat pump and use only the backup heater for buffering heat in the water tank.

Arnold-n commented 1 year ago

@nicx this may take some time as other things are higher priority (HA integration and COP calculation).

But why would you prefer the backup heater over the more efficient heat pump?

nicx commented 1 year ago

@nicx this may take some time as other things are higher priority (HA integration and COP calculation).

But why would you prefer the backup heater over the more efficient heat pump?

good question, i have also thought about this: i have considered that it might be more gentle for the compressor, especially in the summer months, if it does not only start briefly for the hot water heating.

in my case, the hot water is heated to 45 degrees per default, which takes approx. 1h. in case of pv surplus i switch the smart grid contact, the hot water is then heated up to 55 degrees. this again takes about 1h. this would mean 2 compressor starts per day, which could be saved by using the heating rod. out of the belly, the heating rod is wear-free, but the compressor is not. maybe the compressor will last a few years longer this way?! ;)

oh and with pv surplus the efficiency is rather secondary I think.

bausi2k commented 1 year ago

As far as I know, you can only tell the heatpump to do it's work with a defined amount of power in kWh. Options are

Arnold-n commented 1 year ago

good question, i have also thought about this: i have considered that it might be more gentle for the compressor, especially in the summer months, if it does not only start briefly for the hot water heating. in my case, the hot water is heated to 45 degrees per default, which takes approx. 1h. in case of pv surplus i switch the smart grid contact, the hot water is then heated up to 55 degrees. this again takes about 1h. this would mean 2 compressor starts per day, which could be saved by using the heating rod. out of the belly, the heating rod is wear-free, but the compressor is not. maybe the compressor will last a few years longer this way?! ;)

True, though 30 starts/day is not uncommon in winter due to defrosts, so I would personally not worry about 2 starts/day for DHW.

oh and with pv surplus the efficiency is rather secondary I think.

I guess that depends on your personal goals and local electricity pricing.

nicx commented 1 year ago

good question, i have also thought about this: i have considered that it might be more gentle for the compressor, especially in the summer months, if it does not only start briefly for the hot water heating. in my case, the hot water is heated to 45 degrees per default, which takes approx. 1h. in case of pv surplus i switch the smart grid contact, the hot water is then heated up to 55 degrees. this again takes about 1h. this would mean 2 compressor starts per day, which could be saved by using the heating rod. out of the belly, the heating rod is wear-free, but the compressor is not. maybe the compressor will last a few years longer this way?! ;)

True, though 30 starts/day is not uncommon in winter due to defrosts, so I would personally not worry about 2 starts/day for DHW.

I will monitor that in the upcoming winter which is my first one ;) My Goal would be to have as minimum compressor starts as possible. so in best case its 1 and the heat pump ist just running all day (for heating my house).

bausi2k commented 1 year ago

With the BRP06(whatever) you have full control about when and how long your heatpump runs, so you can optimise that. Defrosting is another issue of course…

My heatpump is controlled by Loxone, because ist is much easier and also more energy efficient. I don't see any reason why my hp should run at 3am in autumn at moderate temperature…

nicx commented 1 year ago

@Arnold-n another thought: i could switch the heating rod on and off more often, and depending on the pv surplus, i could also let it run for a short time. i could imagine that the compressor prefers it to run for a minimum time at startup and not to clock. it wouldn't matter to the heating rod, which could also be switched on every 5 minutes, for example.

Th301 commented 8 months ago

Hi @bausi2k , I found your comment here, that you are using the LAN-adapter for Daikin with Loxone. I also use Loxone and I am still looking for the best possibility to read/write stuff in my Altherma 3 H/HT (with the old Rotex-Controll Unit). Which heatpump and controller do you have? Do you have some additional info on your general setup between heatpump and Loxone? Would be cool! :)

bausi2k commented 8 months ago

Hi @bausi2k , I found your comment here, that you are using the LAN-adapter for Daikin with Loxone. I also use Loxone and I am still looking for the best possibility to read/write stuff in my Altherma 3 H/HT (with the old Rotex-Controll Unit). Which heatpump and controller do you have? Do you have some additional info on your general setup between heatpump and Loxone? Would be cool! :)

@th301 Hi, since Loxone doesn't know anything about ws(websockets) I'm using NodeRed to translate. I use the Level 3 intergration of the Loxone climate control where the Daikin EHBH/X(whatever) operations modes:

for details on NodeRed Integration find this thread & post

joncage commented 4 months ago

Any updates on this @Arnold-n? Anything a fellow dev could help with?

I've got ESPAltherma hooked up to my EHVH11SU26CB6W but what I really want to do is do whatever it is the LAN adapter does to handle a PWM signal to adjust the power usage of the heatpump.

We have a 5kW cap on our export and on sunnier days are regularly hitting that so would be nice to have a gentle way to soak up the extra head into our DHW.

Since the LAN adapter supposedly can do this via PWM and my heatpump is apparently compatible with the BRP, I'm hoping there could be a way to do the same thing via your little module when hooked up to my RPI5 home assistant :)

Arnold-n commented 4 months ago

Still on my activity list, for now the only power limiting option is to use the quiet levels which also limit the maximum power consumption.

Staacks commented 4 months ago

Although I only did a quick manual test so far, I would like to add my thoughts about the differences between quiet mode and power limiting as I am not only interested in this because of solar power management, but also to improve efficiency.

If my heatpump draws full 2kW for water heating I observe a massive drop of the average heat exchanger temperature on the outside unit. This is of course not surprising, but it also reduces the COP as the unit has to work against a larger temperature difference. I expect that in a situation when time is not critical, slowly heating the water at 1kW or less would lead to a higher COP when the heat exchanger is not cooled down that much and can maintain a higher temperature.

In the release notes for v0.9.46 you mention that the quiet mode actually has a better efficiency then the default mode, which you attribute to lower power consumption of the fan. I suspect that it is actually due to the heat exchanger not being cooled down so much and the reduced fan speed would actually be counter productive here. So, if time is not an issue and if you are not concerned about noise, running the fan at max, but heating only at 50% (i.e. power limiting instead of quiet mode) might actually be even more efficient.

(Disclaimer: These are the thoughts of a physicists with a Carnot process in mind. Some insights by an engineer or just some experience from someone who tested this more systematically are very welcome :) )

Arnold-n commented 4 months ago

Your experience matches with mine: that is why I prefer 24-hour operation at low load and also prefer to have 24-hour averaging of outside temperature to avoid having a higher load at lower outside temperatures when COP is worse.

But surprisingly, if the system is already in low-load, it still helps to reduce the fan setting. At 1kW power consumption in my 8kW system, silent level 3 does not limit the compressor any further but does limit the fan, giving a 5% higher COP: silent1 silent2

Staacks commented 4 months ago

Fantastic info, thanks. Can't wait to find some time (and good weather conditions) to compare with my system. Have been thinking about using 24h average as well. (But then we would be leaving the original topic of this issue.)

nicx commented 4 months ago

@nicx this may take some time as other things are higher priority (HA integration and COP calculation).

@Arnold-n many thanks for the HA and COP integration! :) Now I think we can go back to the origin topic question: Is the smart grid control still on your list? any idea when it will be implemented.

This feature would be the last missing feature to completely get rid of my ESPaltherma which I have running in parallel to P1P2MQTT ;)

PS: sorry if I am annoying ;) I love your project! keep up your great work :)

Arnold-n commented 4 months ago

You're welcome, thanks! Smart grid release is still (and high) on the agenda, but cannot predict yet when.

forTT78 commented 6 days ago

Smart grid release is still (and high) on the agenda, but cannot predict yet when.

Hi together, is there an update on this? :innocent:

Arnold-n commented 5 days ago

Hope to provide this in October!