Mitsubishi Heat Pump

And here are my relevant items:

Number ESP_Easy1_ac_room_temp "Room temperature [%.1f °C]" <temperature> { channel="mqtt:topic:mosquit:ESP_Easy1:acRoomTemperature" }
Number ESP_Easy1_ac_temp "Temperature [%.1f °C]" <heating> { channel="mqtt:topic:mosquit:ESP_Easy1:acTemperature" }
String ESP_Easy1_ac_power "Power []" { channel="mqtt:topic:mosquit:ESP_Easy1:acPower" }
String ESP_Easy1_ac_mode "Mode []" <fan_ceiling> { channel="mqtt:topic:mosquit:ESP_Easy1:acMode" }
String ESP_Easy1_ac_fan "Fan" <fan> { channel="mqtt:topic:mosquit:ESP_Easy1:acFan" }
String ESP_Easy1_ac_vane "Vane" <flow> { channel="mqtt:topic:mosquit:ESP_Easy1:acVane" }
String ESP_Easy1_ac_widevane "Wide Vane" <flow> { channel="mqtt:topic:mosquit:ESP_Easy1:acWideVane" }

And my relevant part sitemap portion:

     Frame label="Thermopompe CdM" {
	Text item=ESP_Easy1_ac_room_temp label="CdM: actuel"
	Setpoint item=ESP_Easy1_ac_temp label="CdM:cible [%.1f \u00B0C]" minValue=16 maxValue=31 step=1
	Switch item=ESP_Easy1_ac_power mappings=[OFF="Off", ON="On"]
	Switch item=ESP_Easy1_ac_mode mappings=[COOL="Cool", HEAT="Heat", DRY="Dry", FAN="Fan", AUTO="Auto"]
	Selection item=ESP_Easy1_ac_fan mappings=[1="1", 2="2",3="3",4="4",AUTO="AUTO",QUIET="QUIET"]
	Selection item=ESP_Easy1_ac_vane mappings=[1="1", 2="2",3="3",4="4",5="5",AUTO="AUTO",SWING="SWING"]
	Selection item=ESP_Easy1_ac_widevane	mappings=["<<"="<<","<"="<","|"="|",">"=">",">>"=">>",SWING="SWING"]
	}
1 Like

You should not change the content of formatBeforePublish, this defines the payload and must stay the same, i.e.

formatBeforePublish="MitsubishiHP,power,%s"

Yes, I should have thought better. The problem, I guess, is that I do not have a very clear view of how the whole thing works.

Anyway, now my OH interface is working perfectly well. Huge thanks to you for all the fantastic help!

I can now replace the cover on my heatpump. My ID is to leave the D1 mini inside the heatpump, underneath the cover. I suppose that the wifi is good enough to reach in there. But I need to ensure that nothing will mess up with the electrical contacts of the D1. Are you leaving your D1 in your heatpump? If so do your cover it with something (maybe just electrical tape) to prevent any electrical accident?

I found a small spot that I thought is dry and safe from any humidity, also no metal around … and put/tucked D1 there and closed the cover. So I guess you will need to trust your own judgment on this, specially since it depends on the type of AC how much space is left and where …

One more thing - I turned on the CPU Eco Mode in Tools | Advanced, not sure how much effect it has, but should reduce the D1 module heating … just FYI … not that I had any problem with heating in the first place …

OK will follow your advice. That closes chapter 1 of my heatpump stuff. Chapter 2 will be opened a bit later. It is about another Mitsubishi indoor unit that is being fed by the same exterior unit. Since both units are same brand, same generation, one might think that doing the second will be straightforward, but I do have a couple of concerns. First. this second unit has a completely diffrent layout because rather than a floor model, it is a “cassette”-type unit, embedded in the ceiling of my solarium. The second difference is that rather than being operated by an infrared remote, it has a wired wall-mounted remote. If there is a CN105 plug on the board of that unit, it may already be occupied by that existing wired remote. I don’t know if it is possible to “Y” two such connections together. Anyway, I will try to look into that in a few weeks from now.
Cheers, --Pierre

Using custom widget for ACs (based on [SOLVED] UI Widget: Intesis aircon controller; No commands send to items, thx to @hmerk and others) :

ezgif-4-3699f4add539

widget yaml:

uid: air_conditioner
tags: []
props:
  parameters:
    - description: Title
      label: Title
      name: title
      required: false
      type: TEXT
    - context: prefix
      description: The name prefix of widget items
      label: Prefix
      name: prefix
      required: false
      type: TEXT
  parameterGroups: []
timestamp: Jan 8, 2021, 1:40:45 PM
component: f7-block
config:
  class:
    - no-padding
slots:
  default:
    - component: Label
      config:
        text: =props.title
        style:
          text-align: center
          font-size: 16px
    - component: f7-row
      config:
        class:
          - margin
          - align-items-center
      slots:
        default:
          - component: oh-link
            config:
              action: toggle
              actionItem: =props.prefix + "_Power"
              actionCommand: ON
              actionCommandAlt: OFF
              class:
                - display-flex
                - flex-direction-column
            slots:
              default:
                - component: f7-icon
                  config:
                    f7: power
                    size: 28
                    color: '=items[props.prefix + "_Power"].state === "OFF" ? "red" : "green"'
                - component: Label
                  config:
                    class:
                      - margin-top-half
                    text: ON/OFF
                    style:
                      color: var(--f7-text-color)
                      font-size: var(--f7-badge-in-icon-font-size)
          - component: Label
            config:
              text: =items[props.prefix + "_RoomTemperature"].state.displayState || items[props.prefix + "_RoomTemperature"].state
    - component: f7-row
      config:
        class:
          - justify-content-center
      slots:
        default:
          - component: oh-knob
            config:
              min: 16
              max: 31
              stepSize: 1
              size: 270
              item: =[props.prefix + '_SetTemperature']
    - component: f7-row
      config:
        class:
          - margin-half
      slots:
        default:
          - component: oh-repeater
            config:
              fragment: true
              for: mode
              in:
                - value: AUTO
                  icon: arrow_2_circlepath
                - value: HEAT
                  icon: thermometer_sun
                - value: DRY
                  icon: drop
                - value: FAN
                  icon: wind
                - value: COOL
                  icon: thermometer_snowflake
            slots:
              default:
                - component: f7-col
                  slots:
                    default:
                      - component: oh-link
                        config:
                          class:
                            - display-flex
                            - flex-direction-column
                          action: command
                          actionItem: =props.prefix + "_Mode"
                          actionCommand: =loop.mode.value
                        slots:
                          default:
                            - component: f7-icon
                              config:
                                style:
                                  color: '=(items[props.prefix + "_Mode"].state === loop.mode.value) ? "green" : "gray"'
                                f7: =loop.mode.icon
                            - component: Label
                              config:
                                class:
                                  - margin-top-half
                                text: =loop.mode.value
                                style:
                                  color: '=(items[props.prefix + "_Mode"].state === loop.mode.value) ? "green" : "gray"'
                                  font-size: var(--f7-badge-in-icon-font-size)
    - component: f7-row
      config:
        class:
          - padding-top-half
          - margin-half
      slots:
        default:
          - component: oh-repeater
            config:
              fragment: true
              for: setting
              filter: items[props.prefix + loop.setting.suffix].state != "-"
              in:
                - suffix: _Fan
                  icon: chart_bar
                  iconColor: yellow
                - suffix: _Vane
                  icon: arrow_up_down_circle
                  iconColor: teal
                - suffix: _WideVane
                  icon: arrow_left_right_circle
                  iconColor: teal
            slots:
              default:
                - component: f7-col
                  slots:
                    default:
                      - component: oh-link
                        config:
                          action: options
                          actionItem: =props.prefix + loop.setting.suffix
                          class:
                            - display-flex
                            - flex-direction-column
                        slots:
                          default:
                            - component: f7-icon
                              config:
                                color: =loop.setting.iconColor
                                f7: =loop.setting.icon
                            - component: Label
                              config:
                                class:
                                  - margin-top-half
                                text: =items[props.prefix + loop.setting.suffix].state
                                style:
                                  color: var(--f7-text-color)
                                  font-size: var(--f7-badge-in-icon-font-size)

one needs to append following suffixes as below when defining items:

  _RoomTemperature
  _SetTemperature
  _Power
  _Mode
  _Fan
  _Vane
  _WideVane

for example, my living room AC (label/name pairs):

Air Conditioner (gGF_Living_AC)
  Room Temperature (gGF_Living_AC_RoomTemperature)
  Set Temperature (gGF_Living_AC_SetTemperature)
  Power (gGF_Living_AC_Power)
  Mode (gGF_Living_AC_Mode)
  Fan (gGF_Living_AC_Fan)
  Vane (gGF_Living_AC_Vane)
  Wide Vane (gGF_Living_AC_WideVane)

Note: one can omit i.e. _WideVane and it will not be rendered (not all my ACs have wide vane) …

Following above rules AC widget can be added as simple as

- component: widget:air_conditioner
  config:
    prefix: gGF_Living_AC
    title: Living Room AC

For completeness adding mqtt yaml too (please note allowedStates that contains values one can pick in the widget, as seen in the attached animated gif):

UID: mqtt:topic:homepi:acLivingRoom
label: Air Conditioner Living's Room
thingTypeUID: mqtt:topic
configuration:
  payloadNotAvailable: Connection Lost
  availabilityTopic: GF_Living_Room/status/LWT
  payloadAvailable: Connected
bridgeUID: mqtt:broker:homepi
channels:
  - id: acRoomTemperature
    channelTypeUID: mqtt:number
    label: AC Room Temperature
    description: null
    configuration:
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.roomTemperature
      unit: °C
  - id: acSetTemperature
    channelTypeUID: mqtt:number
    label: AC Set Temperature
    description: null
    configuration:
      commandTopic: GF_Living_Room/ac/settings/cmd
      unit: °C
      formatBeforePublish: MitsubishiHP,temperature,%d
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.temperature
  - id: acPower
    channelTypeUID: mqtt:switch
    label: AC Power
    description: null
    configuration:
      commandTopic: GF_Living_Room/ac/settings/cmd
      formatBeforePublish: MitsubishiHP,power,%s
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.power
  - id: acMode
    channelTypeUID: mqtt:string
    label: AC Mode
    description: null
    configuration:
      commandTopic: GF_Living_Room/ac/settings/cmd
      allowedStates: HEAT,COOL,FAN,DRY,AUTO
      formatBeforePublish: MitsubishiHP,mode,%s
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.mode
  - id: acFan
    channelTypeUID: mqtt:string
    label: AC Fan
    description: null
    configuration:
      commandTopic: GF_Living_Room/ac/settings/cmd
      allowedStates: 1,2,3,4,AUTO,QUIET
      formatBeforePublish: MitsubishiHP,fan,%s
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.fan
  - id: acVane
    channelTypeUID: mqtt:string
    label: AC Vane
    description: null
    configuration:
      commandTopic: GF_Living_Room/ac/settings/cmd
      allowedStates: 1,2,3,4,5,SWING,AUTO
      formatBeforePublish: MitsubishiHP,vane,%s
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.vane
  - id: acWideVane
    channelTypeUID: mqtt:string
    label: AC Wide Vane
    description: null
    configuration:
      commandTopic: GF_Living_Room/ac/settings/cmd
      allowedStates: <<,<,|,>,>>,<>,SWING
      formatBeforePublish: MitsubishiHP,wideVane,%s
      stateTopic: GF_Living_Room/ac/settings
      transformationPattern: JSONPATH:$.wideVane
1 Like

i am using this widget as well as a popup widget for 2 thermostats so thank you all for your work here.

one question, how do you achieve this:

image

I would like to use this in another widget? It does not seem to be part of the posted YAML, isn´t it?

As stated above

you can see

allowedStates: 1,2,3,4,5,SWING,AUTO

but the same can be achieved with adding OPTIONS as metadata to item.

Thank you for this! Can you tell me how to get this in to Google home/assistant?

Hi
How are you.
I just finished transferring from arduino to ESPEasy and it does works besides one thing.
The operational status is no longer beeing received:
{“roomTemperature”:24,“operating”:false}
Is it normal? I had this feature in my old systems and it was very handy to mesure the system when it’s in function. Thanks for your precious help

Plugin is returning the following info currently

{"roomTemperature":23.5,"wideVane":"|","power":"OFF","mode":"COOL","fan":"AUTO","vane":"5","iSee":true,"temperature":22.0}

I guess you mean

bool operating; // if true, the heatpump is operating to reach the desired temperature

This one is not currently part of ESPEasy plugin but should be easy to add …

Hi

That’s right.
The [SwiCago] arduine schema does include it and I used it for around 3 years.

bool HeatPump::getOperating() {
return currentStatus.operating;
}

Thanks for your precious help
José

Added support for operating and compressor frequency, test fw for ESP 8266, 4M1M can be downloaded here.

Sample output

{"roomTemperature":25.5,"wideVane":"|","power":"OFF","mode":"COOL","fan":"AUTO","vane":"AUTO","iSee":true,"operating":true,"compressorFrequency":5,"temperature":24.0}

Code

Thank you for your help
I will test it tomorrow :grinning:

José Cordeiro

Hi

Thanks for your help. it works :slight_smile:

1 Like

Was merged so you can use “official” releases, FYI.

@ crnjan Hi, I wonder this widget could be used for controlling Mitsubishi heat pump with Procon A1M Modbus card. I can control my Mitsubishi heat pumps with OH3 but would like to use your widget.

Hey! I guess you can use the widget above to control your HP (maybe some modifications will be required to suit your needs), but I moved to a customised version of Heating widget since `oh-knob’ seems a bit to sensitive (specially when being used on a phone) and set temperature changed quite often undesirably (maybe I just got thick fingers :)) …

OK, many thanks for the info. I’ll have a look at your widget and check whether I can use it. I’m also using the heating widget for controlling the underfloor heating system but I don’t know how you could use it for a HP which has different modes and the vanes.

As said, I’m using a custmized version of heating widget …

!