Homeassistant control of LWT via Onecta cloud

Does anyone have a working model within Homeassistant that controls the LWT using Onetca cloud integration that you can share please.

I run my Daikin 4Kw Atherma3 monoblock system using LWT/WDcurve, this is one of three control modes on offer, the other two being by Room Thermostat or Fixed Setpoint.

The issue i have is that in Winter with ambient of -4 to 6C all was pretty much sweet and the WD curve influence pretty much kept the house at 20C through the day, COP was great, KwH usage down 50% (YES!) ā€¦ however, come spring and the arrival of a ā€œtoastyā€ 11C ambient and sunshine, solar gain is affecting the model. I find increasingly I need to adjust the offset in the MMI to cool down/reheat the home through mornings/evenings. This is a pain. Adjusting the WD curve daily isnā€™t great either. Another solution is called for.

Enter Homeassistant (HA). I have installed the Onecta integration and have basic control over the system and can adjust offset in there, still not great though and a level of automation would be great. I would prefer to use Fixed Setpoint and allow HA to control that but Iā€™m unsure how to do this as I typically use the GUI for all config and yaml would be needed here along with some algorithmic hysteresis and alike based on the Onecta sensors/entities which include External Ambient Sensor, LWT, LWT Offset, Room Temp and I have House Temp entity created from a Switchbot temp sensor. So i have all the input needed me thinks .

I guess effectively I want HA to operate as the Themostatic control but more intelligently (prediction, response, hysteresis, etc.) than the Madoka which I turned off as it was pretty useless and demonstrably drove higher energy costs and reduced comfort [as stated above] so please no recommendations on that thank you , just HA. Additionally, the system needs to turn off the heating when it decides that LWT needs to be 30C or lower as these units hate sub 30C operation.

Can anyone offer HA setup/config advice or better still share a (yaml) model I can tweak please.

the onecta app is not great tbh i do use it to alter the LWT off set using the integration and it seems to reactive within 10 mins but all other functions are pretty slow to react

top right here

have you looked in to the epsaltherma integration ( git hub) i use this and get data every 30 seconds and you can set up a lot more from it

Thanks for that Chris, I do not use any add-on hardware because the system is under warranty and therefore I do not and will not be opening the cabinet to install monitoring equipment. I joined this community to learn and engage in discussion not purely to buy/fit the monitoring equipment. There is considerable knowledge and competence in this community ! :slight_smile:

As per OP - question is regarding HA + Onecta only please folks :wink:

Yes, I have an automation that Iā€™ve been using for much of the last 6 months. You can probably take this as a template and adjust to suit your needs.

Youā€™ll probably want heating_climatecontrol_room_temperature where you see ā€œinsert room sensorā€.
There are multiple thresholds to activate offsets of -4, -2, 0 and +2.
Each action has a 10 minute repeat to compensate for any API error, internet outage etc. Iā€™d not recommend lowering this to ensure you donā€™t hit the 200 API limit per day. Also if youā€™re taking readings from the room sensor via the cloud, then 10 minutes might be too frequent, depending on your integrationā€™s update frequency settings.
Obviously adjust the temperature thresholds/number of thresholds as you like.
The actions fire based on the trigger ID.
Paste in as YAML to a new automation but it is fully editable visually (apart from the negative offset actions which have to be edited in YAML since the UI canā€™t cope with a minus number).

HTH!

alias: Heating - Heat Pump (LWT)
description: >-
  Control Heat Pump, maintain GF average 19.5c. 


  Works around the Madoka's 2c hysteresis, sun hitting it etc by using switchbot
  thermostats. 
mode: single
triggers:
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 20.2
    id: Temp+Day
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp-Day
    below: 20.2
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 19.9
    id: Temp++Comp
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp-++Comp
    enabled: true
    below: 19.9
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 19.7
    id: Temp+Comp
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp-+Comp
    enabled: true
    below: 19.7
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 19.4
    id: Temp+-Comp
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.<insert room sensor>
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp--Comp
    enabled: true
    below: 19.4
    trigger: numeric_state
conditions: []
actions:
  - alias: Temp below day
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp-Day
    then:
      - alias: Turn on heating with repeat
        repeat:
          sequence:
            - alias: Turn on Heating
              action: climate.set_hvac_mode
              continue_on_error: true
              target:
                entity_id: climate.heating_leaving_water_offset
              data:
                hvac_mode: heat
            - delay:
                hours: 0
                minutes: 10
                seconds: 0
                milliseconds: 0
          until:
            - condition: state
              entity_id: climate.heating_leaving_water_offset
              state: heat
              for:
                hours: 0
                minutes: 0
                seconds: 0
      - action: input_boolean.turn_on
        data: {}
        target:
          entity_id: input_boolean.heating_state
  - alias: Temp above day
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp+Day
    then:
      - alias: Turn off heating with repeat
        repeat:
          sequence:
            - alias: Turn off Heating
              action: climate.set_hvac_mode
              continue_on_error: true
              data:
                hvac_mode: "off"
              target:
                entity_id: climate.heating_leaving_water_offset
            - delay:
                hours: 0
                minutes: 10
                seconds: 0
                milliseconds: 0
          until:
            - condition: state
              entity_id: climate.heating_leaving_water_offset
              state: "off"
              for:
                hours: 0
                minutes: 0
                seconds: 0
      - action: input_boolean.turn_off
        data: {}
        target:
          entity_id: input_boolean.heating_state
  - alias: Adjust offset down -4c
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp++Comp
    then:
      - action: climate.set_temperature
        metadata: {}
        data:
          temperature: >-
            {{
            state_attr('climate.heating_leaving_water_offset','target_temp')|float(0)
            -4  }}
        target:
          entity_id: climate.heating_leaving_water_offset
        alias: Lower offset to -4c
  - alias: Adjust offset down -2c
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp+Comp
          - Temp-++Comp
    then:
      - action: climate.set_temperature
        metadata: {}
        data:
          temperature: >-
            {{
            state_attr('climate.heating_leaving_water_offset','target_temp')|float(0)
            -2  }}
        target:
          entity_id: climate.heating_leaving_water_offset
        alias: Lower offset to -2c
  - alias: Adjust offset to 0
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp+-Comp
          - Temp-+Comp
    then:
      - action: climate.set_temperature
        metadata: {}
        data:
          temperature: 0
        target:
          entity_id: climate.heating_leaving_water_offset
        alias: Reset offset back to 0c
  - alias: Adjust offset up to 2
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp--Comp
    then:
      - alias: Raise offset to 2c
        action: climate.set_temperature
        target:
          entity_id: climate.heating_leaving_water_offset
        data:
          temperature: 2

Hello, I have the same boat ā€¦ err pump as @DrConradInTheHouse . I am also looking to get HomeAssistant/Onecta API integration (no other hardware planned). I would like to know re: integration before I dive in.

Does the home assistant integration with ONECTA cloud

  1. Allow you to change the heating schedule for a day (like in the ONECTA app)
  2. Allow you to change the LWT - 2point curve - Set X1, Y1, X2, Y2 values.
  3. Read the PUMP/Compressor status - ON/OFF - which is is shown in the Daikin MMI Sensors screen.

Thank you for any assistance.

Hello and welcome @sunshine_rag :slightly_smiling_face:

  1. Kinda. You can choose between the preconfigured schedules but you canā€™t edit them via the Onecta integration.
  2. No, that can only be done on the MMI and it requires a system restart to commit. Offsets can be adjusted via the API and do not require a system restart.
  3. No, that information is not available either. Only via ESPAltherma can you get that remotely. That said, you can infer the status of these if you are monitoring the energy consumption via a separate CT clamp device. If power consumption is ~25w, itā€™s idle. Between 100-200w, the circulation pump is running but compressor is off. Above 200w (700w for higher capacity units), the compressor is on.
1 Like

Thank you for the prompt response and detailed reply. :pray:
Re: 1, that is sad. Is there alternative integrations that would allow that? i.e modifying and setting new schedules. I hate the ONECTA app and the MMI.
Re: 3, thank you for that info. I will start another thread on something related.
Donā€™t want to squat on @DrConradInTheHouse pump.

thanks Chris
what on earth is that doing
is there a pseudo language algorithm you can summarise please as to what on earth thatā€™s doing in full?

The target temperature is 19.5c and my WD curve gets us about there most of the time.
What this automation does is take the internal room thermostat as the trigger and when that temperature (in the order you see them listed):

  • goes above 20.2 for at least 5 mins, turn off the heat pump
  • goes below 20.2 for at least 5 mins, turn on the heat pump (offset is -4c due to 19.9 trigger)
  • goes above 19.9 for at least 5 mins, set flow target offset to -4c
  • goes below 19.9 for at least 5 mins, set flow target offset to -2c
  • goes above 19.7 for at least 5 mins, set flow target offset to -2c
  • goes below 19.7 for at least 5 mins, reset the flow offset to 0c
  • goes above 19.4 for at least 5 mins, reset the flow offset to 0c
  • goes below 19.4 for at least 5 mins, set the flow offset to +2c

Thatā€™s it! This gives us a hysteresis of 0.8c and if the WD curve is set nicely, we have just a handful of corrections a day. It allows the heat pump to remain running as much as possible whilst not overheating the house.

You can adjust the targets to your liking, remove some of them if its overly complex for your needs. The key is getting your WD curve right so these corrections arenā€™t needed very much. If you find itā€™s sitting at -2c or -4c a lot and it isnā€™t sunny or mild or youā€™ve got other heat sources internally, that might indicate you need to drop the WD curve a bit. Conversely, if itā€™s sitting at +2 a lot and the house is cooling, the WD curve might need to come up a bit.

In the last few days, with the solar gain and milder outside temperatures, weā€™ve been busting through the offsets because the house warmed easily and the flow target was already in the high 20s anyway leaving the offset little or nowhere to go, resulting in heat pump off at 20.3c.

During the depths of winter, we typically have no corrections at all, maybe a +2 just after DHW ran to help the house catch back up and a -2 if my wife did some baking.

PERFECT. Thanks
Yes, I had my WD Curve set somewhat sweetly, in Winter, but now in Spring the solar gain means Iā€™m applying -offset via HA several times as we approach noon, and then several times to dial in +offset as the sun drops. Bit of a faff.

I note your offset/LWT values can cause the LWT demand to go down to low/sub 20C. I have read on many forums that Daikin Atherma (which I have - the EDLA04EV23) does not like to operate below LWT=30C and this causes rapid cycling which is no good. Any comment on this?

I tend to switch off the heating in the Onecta app once LWT demand gets to 30C

I canā€™t say Iā€™ve noticed any operational issues with sub 30c flow temps. In fact, the COP on my HP has never been higher as it is at the moment. Iā€™m getting about half an hour heating, half an hour sampling at a flow temp of about 26c (of course with overshoot it gets up to 30c). Just enough to put some energy in the house.

I know lots say they arenā€™t happy running that low, but mine (EDLA11) seems fine.

1 Like

Indeed, my ELDA04 doesnt seem to be affected but I am not monitoring other than with Onecta and HA (which uses the Onecta cloud anyway). I monitor the daily KwH usage and since I started turning off at 30C I noted a huge hike in power consumption to get to 30C+ whereas when I left it sub 20 it used half of the power. I might go back to running sub 20 like you butā€¦

Does your monitoring show the unit rapid cycling - as this seems to be what folk shout about and concerned with and what is the issue here if at all you have a view?

Here is my data:

https://emoncms.org/app/view?name=MyHeatpump&readkey=f2befde7239c2ce2e9db254e66706870

I donā€™t see, nor have I ever seen rapid cycling in my system. By rapid, I think thatā€™s like just a few minutes on before shutting off, right? I think that sort of thing only happens if there are many radiators shut off (might be TRVs closing for example). All my TRVs, bar the master bedroom, are fully open and set to 5.

Thanks Chris
I donā€™t see any rapid cycling there.
So highly confused now as to why so many posters on forums cite this unit/range as unreliable at sub 30Cā€¦ not borne out by your evidence is it.
I shall adjust my curve accordingly

@chrisg , this is not working, not triggering or adjusting the offset, no traces in the automation ā€œShow Tracesā€, no related output (info, logs, errors) in the homeassistant.log file. (may need to set something to get output?)

automation is enabled and on.
?
any ideas how to debug / what might be wrong - please.

alias: Heating - Heat Pump (LWT)
description: >-
  Control Heat Pump, maintain GF average 20.5c.  Works around the Madoka 2c
  hysteresis, sun hitting it etc by using switchbot thermostats. 
triggers:
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 21.2
    id: Temp+Day
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp-Day
    below: 21.2
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 20.9
    id: Temp++Comp
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp-++Comp
    enabled: true
    below: 20.9
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 20.7
    id: Temp+Comp
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp-+Comp
    enabled: true
    below: 20.7
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 20.4
    id: Temp+-Comp
    enabled: true
    trigger: numeric_state
  - entity_id:
      - sensor.meter_plus_da53_lounge
    for:
      hours: 0
      minutes: 5
      seconds: 0
    id: Temp--Comp
    enabled: true
    below: 20.4
    trigger: numeric_state
conditions: []
actions:
  - alias: Temp below day
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp-Day
    then:
      - alias: Turn on heating with repeat
        repeat:
          sequence:
            - alias: Turn on Heating
              action: climate.set_hvac_mode
              continue_on_error: true
              target:
                entity_id: climate.heating_leaving_water_offset
              data:
                hvac_mode: heat
            - delay:
                hours: 0
                minutes: 10
                seconds: 0
                milliseconds: 0
          until:
            - condition: state
              entity_id: climate.heating_leaving_water_offset
              state: heat
              for:
                hours: 0
                minutes: 0
                seconds: 0
      - action: input_boolean.turn_on
        data: {}
        target:
          entity_id: input_boolean.heating_state
  - alias: Temp above day
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp+Day
    then:
      - alias: Turn off heating with repeat
        repeat:
          sequence:
            - alias: Turn off Heating
              action: climate.set_hvac_mode
              continue_on_error: true
              data:
                hvac_mode: "off"
              target:
                entity_id: climate.heating_leaving_water_offset
            - delay:
                hours: 0
                minutes: 10
                seconds: 0
                milliseconds: 0
          until:
            - condition: state
              entity_id: climate.heating_leaving_water_offset
              state: "off"
              for:
                hours: 0
                minutes: 0
                seconds: 0
      - action: input_boolean.turn_off
        data: {}
        target:
          entity_id: input_boolean.heating_state
  - alias: Adjust offset down -4c
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp++Comp
    then:
      - action: climate.set_temperature
        metadata: {}
        data:
          temperature: >-
            {{
            state_attr('climate.heating_leaving_water_offset','target_temp')|float(0)
            -4  }}
        target:
          entity_id: climate.heating_leaving_water_offset
        alias: Lower offset to -4c
  - alias: Adjust offset down -2c
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp+Comp
          - Temp-++Comp
    then:
      - action: climate.set_temperature
        metadata: {}
        data:
          temperature: >-
            {{
            state_attr('climate.heating_leaving_water_offset','target_temp')|float(0)
            -2  }}
        target:
          entity_id: climate.heating_leaving_water_offset
        alias: Lower offset to -2c
  - alias: Adjust offset to 0
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp+-Comp
          - Temp-+Comp
    then:
      - action: climate.set_temperature
        metadata: {}
        data:
          temperature: 0
        target:
          entity_id: climate.heating_leaving_water_offset
        alias: Reset offset back to 0c
  - alias: Adjust offset up to 2
    continue_on_error: true
    if:
      - condition: trigger
        id:
          - Temp--Comp
    then:
      - alias: Raise offset to 2c
        action: climate.set_temperature
        target:
          entity_id: climate.heating_leaving_water_offset
        data:
          temperature: 2
mode: single

Enabled according to here: (Heating Heat Pump LWT)

Testing the offset actions can be done manually by going into each action, for example, in visual mode expand ā€œAdjust offset down -4cā€ and then click on the three dots next to ā€˜Lower offset to -4cā€™ and ā€˜run actionā€™. If this was successful, you should see the offset reflected almost immediately in the Onecta App or on the Madoka.

Since the triggers arenā€™t firing, of course the actions wonā€™t fire either. The reason why the temperature sensor based triggers looks to be the place to investigate. The config looks right (assuming the sensor ID is correct). I assume HA is receiving temperature updates from your sensor. Are you using the bluetooth or cloud Switchbot integration? If itā€™s the cloud, there would be some delay Iā€™d imagine (Iā€™ve only ever used bluetooth here).

Chris, thanks for that. The offsets were inducing change - I should have mentioned that, it was the tigger based on state change that was failing

Since posting, itā€™s fired !!

I have identified the issue is the Switchbot LE BT room sensors. I think they are only sending updates every 10 or 20 minutes? Makes sense for LE devices. Not sure if I can or should change this but I will investigate what the refresh period is and come back for advice if ok
Thanks again
Daz

Sweet! I canā€™t say for certain but I think the switchbot sensors send updates immediately, as soon as there is a change in temperature. Iā€™m pretty sure they donā€™t send periodic broadcasts if there is no change. I think thatā€™s why itā€™s normal for HA to report many minutes since the last update if there was no temp change.

This is the device and the OEM page states a varying level of reporting. Iā€™m not sure how accurate this is. Or could it be the HA Switch-bot integration? The OEM statements assume the device is connected to a hub and paired with the app ā€¦ this is not the use-case here. No hub, no app, just the HA integration via BLE. Iā€™m sure the states are not reported every 4 seconds in HA but not sure how to find out the frequency of the update sent to HA (or read/polled by it). The integration has no settings to influence this.

Chris, Youā€™re a :star:

not sure if this is just beginner luck, but I reset my WD curve to commissioning values, applied your automation, and the home sits around 20.7C with little to any drift.

WOW!!

I woukd have imagined I would need to tune it over days and revisit as the planet spins heads-up to the sun!
But the values are perfect, for now, and thereā€™s so many attributes to consider such as, the pump characteristics , thermal mass, heat loss, heat gain, room sizes, and moreā€¦but it just works as-is.

Have to ask did you research this and work out some algorithm?

BEFORE

AFTER (your mod)

1 Like