Controlling a Fairland Pool Heatpump eliminating Tuya

Hey community,

I spent quite some time to get my pool heatpump integrated with tuya local and local tuya but wasn’t really happy with the outcome.

Inspired by user enboer sharing a direct interface with domoticz, I set about doing something similar with esphome.

This is the outcome in the dashboard:

Errors can also be shown:

It all starts on the main control board which is easily accessible:

B and A are the RS 485 headers and the connector even provides 12V power for the ESP.

After a bit of prototyping…

I came up with this:

At the top is the connector, stays within the enclosure. Middle left is a small stepdown converter to get from 12V to 5V for the ESP. On the right is a MAX485 based RS485 interface. At the bottom you see a custom board I use for ESPHome projects someone shared on PCBWay. I flash the 12E/12F module and then solder it to the board, OTA from there.

Next was an enclosure:

The electronics are placed in there, the boards separated by two of the H-shaped spacers. Once the box is screwed closed, two holders are attached wich allow clipping it to the heated water out pipe at the back of the machine. The cable comes out at the bottom, so humidity should not be too much of an issue. I’ll add a TPU based seal later.

I plan to add the files on github later. So far I’m really happy with the results and best of all, I can elminiate the tuya cloud. Also directly communicating with modbus unlocked a “super silent” mode which is not available via the hardware user interface or the tuya based app.

One note on compatibility. I have an IPS pro by Poolsystems which seems to be identical or very similar to the Inver X from Fairland directly. These heatpumps seem to be sold under many different brands. At least for my model, you can add the feature to control it via app. It looks like all they do is ship the unit with a different controller which is in box separate from the main controller. At least this is where the WIFI module is located as inside the metal enclosure of the heatpump, there would be very little reception. It looks like the main control board is the same with or without wifi support. My guess is, one could buy the cheaper option without app and make it smart with the solution described above.

I already have ideas to improve my solution. The M5 stack tough seems to fit in the space of the current UI box. Moving the original box to the inside or disconnecting it entirely I could use the M5stack to control the pump manually adding things like presets or other advanced things.

6 Likes

Hi Richard, just got a Fairland Heatpump and am super interested to try this out.

Hey,

cool. Good luck. Sorry for the delay. Life got in the way :slight_smile:

I have uploaded everything to github:

https://github.com/rstcologne/ESP-Home-Fairland-Heatpump

If you do go ahead and implement it, I’d appreciate some feedback if the description is good enough to follow along.

UPDATE: Just noticed, the esphome conifg was an empty file. Fixed now.

1 Like

@rstcologne: When I browse to your Github using the above link, I get a 404 error. It also does not show up on your Github project page. Did you remove it?

My bad. I’m not very experienced with GitHub and accidentally left the repo private. It should work now.

Thanks for the work!

I have a HF2211 RS485 to Wifi/Ethernet device that I am using to control my Vistapool swimming controller (see Vistapool Integration). Can I use the same device to connect to the Fairland Inver-X? I would think this is possible as RS485 is a bus system. The wiring would look like this (Device 1: Vistapool, Device 2: Fairland):

image

Does anyone have experience with this?

Have you tried the Aqua Temp application together with the HA integration?
Retrieves a lot of sensor information, including controls and switches and works with all wi-fi modules based on tuya. I personally tried it on Hayward, AstralPool heat pumps with the same type of wi-fi module.

No, never used AquaTemp. If I understand correctly, it would also require external accounts to work which then need to be integrated into HA with a custom integration. While this might be an option which works perfectly fine, personally I’m really happy with the very direct integration without dependencies to something outside of my network. The aquatemp approach sounds like there are more components involved which have the potential to cause problems when HA evolves.

But thanks for mentioning it here as it might be a more stable solution than tuya local and local tuyya and more suitable for people who don’t want to open their heatpump and fiddle around with the controlboard.

By the way, my ESPHome Device also retrieves more sensor information than actually used in the dashboard.

I will definitely try your version, especially since I already have all the components from previous projects and I don’t mind sticking my nose in the heat pump.

Sooooo, I’ve tried your solution and …sorry…failed. Don’t know why. I’m using HA since April this year for all of my smart devices (meross, tuya, sonoff ect.). For my energy management (photovoltaic) i’m using a tasmota smart meter reader (DIY interface by bitShake) and one ESP Home interface for some relais. So, I’m actually stuck in the topic.

Actually, i’m using the “Tuya local” integration for my heating pump. (NOT “Local Tuya”!!!) but NOW wanted to decouple it from the Tuya cloud AND the WIFI-Adapter given by Pool-Systems/Fairland

What I’ve done: bought similar devices like Richard:

  1. AZDelivery NodeMCU Amica Modul V2 ESP8266 ESP-12F WiFi - Node MCU ESP 8266 WiFi Development Board with CP2102
  2. DC-DC Buck Converter 4.5-28V bis 0.8-20V MP1584EN Mini Step Down adjustable converter
  3. JST-XH Premium 3S 4Pin 20cm Balancer-cable
  4. Hailege TTL to RS485 485 to Serial UART Level Reciprocal Hardware Automatic Flow Control UART to RS485 Converter RS485 to TTL

Annotation: The DC-DC buck converter was first used for down regulation from 12V to 5V (measured by a multimeter)…but then i decied better to use first a normal 5V power adapter for the ESP 8266 power connection to eliminate an errorsource. Soldered them all in the same way as Richard (see images)

My heating pump is an IPS 170 full inverter heating pump by pool-systems (similar to all of the fairland devices and to Richard’s :-)). And yes…there exist this “B A G +12V” interface for the original wifi-adapter…to be used as DIY connection.

Approach:

  1. installation of a new ESP Home device called “ISP 170”; (ESPHome version 2023.8.2)
  2. I´ve copied Richard’s code below the " captive_portal" (yes, only once in the hole script)
  3. install/flash via USB
    → good WIFi connection according to the log-file; ESP-Home integration status “online”
  4. → settings/devices&services/add integration with the correct IP Adress and the API code given by the ESP Home integration (three dots) → fine
  5. after some time (at first …for a long time “N/A”, then restarted HA etc.) i was able to push e.g. the power switch. Nothing happend at the heating pump. silent/boost buttons & Temperature slider available (auto/cooling/heating) but without any effect when pushed in HA.

conclusion: “B” and “A” from the RS485 to the heating pump circuit board seem to be connected correctly (black and white cable of the JST-XH adapter). The power adapter 5V is connected to the ESP8266. Rx, Tx, GND and 3V3 from ESP 8266 connected to RxD, TxD, VCC and GND at the RS485. By the way…the RS485 onboard-LED glows red.

esphome:

name: ips-170-esp

friendly_name: IPS 170 ESP

esp8266:

board: esp01_1m

# Enable logging

logger:

# Enable Home Assistant API

api:

encryption:

key: "xxxxxxxxxxxxxxxxxxxx"

ota:

password: "xxxxxxxxxxxxxxxxxx"

wifi:

ssid: "xxxxxxxxxx"

password: "xxxxxxxxxxxxx"

# Optional manual IP

manual_ip:

static_ip: 192.168.178.68

gateway: 192.168.178.1

subnet: 255.255.255.0

captive_portal:

web_server:

port: 80

uart:

id: mod_bus

rx_pin: RX

tx_pin: TX

baud_rate: 9600

modbus:

# flow_control_pin: GPIO4

id: modbus1

modbus_controller:

- id: fairland

## the Modbus device addr

address: 0x0001

modbus_id: modbus1

update_interval: 2s

###################################################

# Elements with Modbus Operation read 01 / write 05

# coil

###################################################

# 0 Power

# 1 compulsory defrosting

# 2~47 reserve

###################################################

switch:

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Power Switch"

id: pwp_power_switch

register_type: coil

address: 0x0

# unit_of_measurement: "State"

###################################################

# Elements with Modbus Operation read 03 / write 06

# holding

###################################################

# address content Range Unit Step length Defaut Illustration

# 0 mode selectioin 1 0~2 0:Auto,1:Heating,2:Cooling

# 1 mode selectioin 2 0~3 1 1 0:Normal,1:silence,2:Super silence, 3: Turbo

# 2 Temp setting under Auto mode 18~35 ℃ 1 25

# 3 Temp setting under heating mode

# 4 Temp setting under cooling mode 30~95 % 1 50

# 5 Running mode of water pump 0~2 1 0 "0:Continuation

# 1:Water temp control

# 2:time/water temp control

# "

# 6 Time setting of water pump (When under running mode 2) 10 ~ 120 min 5 60

# 7 The compressor runs continuously before defrosting enters 20~90 min 1 20

# 8 Defrosting start temp -10~10 ℃ 1 -1

# 9 Defrosting running time 1~12 min 1 8

# 10 Defrosting quit temp 0~30 ℃ 1 8

# 11 Fixed speed mode selection

# 12 reserve

# 13 reserve

# 14 Low temperature shutdown protection correction amount

# 12 reserve

# 13 reserve

# 17 Electronic expansion valve overheat level(heating) -10~20 ℃ 1 3

# 18 Electronic expansion valve overheat level(cooling) -10~20 ℃ 1 3

# 19 Electronic expansion valve manual/auto 0~1 1 0 0:auto,1:Manual

# 20 Electronic expansion valve openning setting(heating) 50~240 2 100

# 21 Electronic expansion valve openning setting(cooling) 50~240 2 100

# 22 The medium frequency ratio selection

# 23 reserve

# 24 reserve

# 25 Power off memory function 0~1 1 1 0: None; 1: Yes

# 26 reserve

# 27 reserve

# 28 reserve

# 29 reserve

# 30 reserve

# 31 reserve

# 32 reserve

###################################################

select:

- platform: modbus_controller

name: "PWP Operating Mode"

id: pwp_operating_mode

modbus_controller_id: fairland

address: 0x0

value_type: U_WORD

optionsmap:

"Auto": 0

"Heating": 1

"Cooling": 2

- platform: modbus_controller

name: "PWP Power Mode"

id: pwp_power_mode

modbus_controller_id: fairland

address: 0x1

value_type: U_WORD

optionsmap:

"Super Silence": 2

"Silence": 1

"Normal": 0

"Turbo": 3

# Temperature Formula

# ((value - 96) / 2) + 18

number:

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Target Temperature Heating"

id: pwp_target_temperature_heating

address: 0x3

value_type: U_WORD

unit_of_measurement: "°C"

min_value: 18

max_value: 40

lambda: "return (x-96) / 2 + 18;"

write_lambda: |-

ESP_LOGD("main", "Modbus Number incoming value = %f", x);

return ((x-18) * 2 + 96) * 1.0;

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Target Temperature Auto"

id: pwp_target_temperature_auto

register_type: holding

address: 0x2

value_type: U_WORD

unit_of_measurement: "°C"

min_value: 18

max_value: 40

lambda: "return (x-96) / 2 + 18;"

write_lambda: |-

ESP_LOGD("main", "Modbus Number incoming value = %f", x);

return ((x-18) * 2 + 96) * 1.0;

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Target Temperature Cooling"

id: pwp_target_temperature_cooling

register_type: holding

address: 0x4

value_type: U_WORD

unit_of_measurement: "°C"

min_value: 18

max_value: 40

lambda: "return (x-96) / 2 + 18;"

write_lambda: |-

ESP_LOGD("main", "Modbus Number incoming value = %f", x);

return ((x-18) * 2 + 96) * 1.0;

###################################################

# Elements with Modbus Operation read 04 / write NA

# read

###################################################

# 0 Percentage of speed

# 1 Target frequency of compressor

# 2 Voltage of PFC

# 3 Inlet water temp

# 4 Outlet water temp

# 5 Ambient air temp

# 6 Dircharge temp

# 7 Outer coil pipe temp

# 8 Suction temp

# 9 Inner coil pipe tem

# 10 Running frequency of compressor

# 11 Current of compressor

# 12 Cooling plate temp

# 13 Electronic expansion valve opening

# 14 DC fan speed

# 15 Lower limit of setting temp of auto mode

# 16 Upper limit of setting temp of auto mode

# 17 Lower limit of setting temp of heating mode

# 18 Upper limit of setting temp of heating mode

# 19 Lower limit of setting temp of cooling mode

# 20 Upper limit of setting temp of cooling mode

# 21 Motherboard version code1 ASCII code

# 22 Motherboard version code2 ASCII code

# 23 Motherboard version code3 ASCII code

# 24 Motherboard version code4 ASCII code

# 25 Motherboard version code5 ASCII code

# 26 Model code1 ASCII code

# 27 Model code2 ('C'is heating and cooling version,‘H’is heating version) ASCII code

# 28 Model code3 ASCII code

# 29 Model code4 ASCII code

# 30 Voltage of power supply V 1

# 31 The remaining time of Compressor shutdown protection S 1

# 32 reserve

###################################################

sensor:

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Speed Percentage"

id: pwp_speed_percentage

register_type: read

address: 0x0

value_type: U_WORD

unit_of_measurement: "%"

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Inlet water Temperature"

id: pwp_inlet_water_temperature

register_type: read

address: 0x3

value_type: U_WORD

unit_of_measurement: "°C"

filters:

- offset: -96

- multiply: 0.5

- offset: 18

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Outlet water Temperature"

id: pwp_outlet_water_temperature

register_type: read

address: 0x4

value_type: U_WORD

unit_of_measurement: "°C"

filters:

- offset: -96

- multiply: 0.5

- offset: 18

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Ambient Air Temperature"

id: pwp_ambient_air_temperature

register_type: read

address: 0x4

value_type: U_WORD

unit_of_measurement: "°C"

filters:

- offset: -96

- multiply: 0.5

- offset: 18

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Compressor Current"

id: pwp_compressor_current

register_type: read

address: 11

value_type: U_WORD

unit_of_measurement: "A"

filters:

- multiply: 0.1

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Compressor Running Frequency"

id: pwp_compressor_running_frequency

register_type: read

address: 10

value_type: U_WORD

unit_of_measurement: "Hz"

- platform: template

name: "PWP Compressor Power"

id: pwp_compressor_power

unit_of_measurement: "W"

lambda: |-

if (id(pwp_compressor_current).state) {

return id(pwp_compressor_current).state * 230;

} else {

return 0.0;

}

update_interval: 1s

###################################################

# Elements with Modbus Operation read 02 / write NA

# discrete_input

###################################################

# 0 Switch on/off

# 1 Defrosting

# 2 Temperature adjustment

# 3 Silence

# 4 Anti-freeze

# 5 Cooling mode selection

# 6 Remote controll

# 7 Water flow swtich

# 8 High pressure swtich

# 9 Low pressure swtich

# 10 Compressor

# 11 Outdorr fan motor

# 12 4-Way valve

# 13 Bypass valve

# 14 reserve

# 15 Heating element in the basis

# 16 reserve

# 17 Circulation pump

# 17~47 reserve

# 48 E0

# 49 E1

# 50 E2

# 51 E3

# 52 E4

# 53 E5

# 54 E6

# 55 E7

# 56 E8

# 57 E9

# 58 EA

# 59 EB

# 60 EC

# 61 ED

# 62 EE

# 63 EF

# 64 P0

# 65 P1

# 66 P2

# 67 P3

# 68 P4

# 69 P5

# 70 P6

# 71 P7

# 72 P8

# 73 P9

# 74 PA

# 75 PB

# 76 PC

# 77 PD

# 78 PE

# 79 PF

# 80 F0

# 81 F1

# 82 F2

# 83 F3

# 84 F4

# 85 F5

# 86 F6

# 87 F7

# 88 F8

# 89 F9

# 90 FA

# 91 FB

# 92 FC

# 93 FD

# 94 FE

# 95 FF

###################################################

binary_sensor:

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E0"

id: pwp_error_E0

register_type: discrete_input

address: 48

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E1 - High Pressure Protection"

id: pwp_error_E1

register_type: discrete_input

address: 49

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E2 Low Pressure Protection"

id: pwp_error_E2

register_type: discrete_input

address: 50

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Warning E3 No Water Protection"

id: pwp_error_E3

register_type: discrete_input

address: 51

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E4 3 phase sequence protection"

id: pwp_error_E4

register_type: discrete_input

address: 52

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Warning E5 Power Supply Excesses Operation Range"

id: pwp_error_E5

register_type: discrete_input

address: 53

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Warning E6 Insufficient Water Flow"

id: pwp_error_E6

register_type: discrete_input

address: 54

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E7 Water Outlet Temp too high or too low"

id: pwp_error_E7

register_type: discrete_input

address: 55

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E8 High Exhaust Temp Protection"

id: pwp_error_E8

register_type: discrete_input

address: 56

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error E9"

id: pwp_error_E9

register_type: discrete_input

address: 57

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error EA Evaporator overheat protection"

id: pwp_error_EA

register_type: discrete_input

address: 58

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Warning EB Ambient Temperature too high or too low"

id: pwp_error_EB

register_type: discrete_input

address: 59

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error EC"

id: pwp_error_EC

register_type: discrete_input

address: 60

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Warning ED Anti-Freezing Reminder"

id: pwp_error_ED

register_type: discrete_input

address: 61

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error EF"

id: pwp_error_EF

register_type: discrete_input

address: 62

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P0 Controller Communication Failure"

id: pwp_error_P0

register_type: discrete_input

address: 64

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P1 Water Inlet Temp Sensor Failure"

id: pwp_error_P1

register_type: discrete_input

address: 65

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P2 Water Outlet Temp Sensor Failure"

id: pwp_error_P2

register_type: discrete_input

address: 66

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P3 Gas Exhaust Temp Sensor Failure"

id: pwp_error_P3

register_type: discrete_input

address: 67

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P4 Evaporator Coil Pipe Temp Sensor Failure"

id: pwp_error_P4

register_type: discrete_input

address: 68

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P5 Gas Return Temp Sensor Failure"

id: pwp_error_P5

register_type: discrete_input

address: 69

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P6 Cooling Coil Pipe Temp Sensor Failure"

id: pwp_error_P6

register_type: discrete_input

address: 70

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P7 Ambient Temp Sensor Failure"

id: pwp_error_P7

register_type: discrete_input

address: 71

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P8 Cooling Plate Sensor Failiure"

id: pwp_error_P8

register_type: discrete_input

address: 72

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error P9 Current Sensor Failure"

id: pwp_error_P9

register_type: discrete_input

address: 73

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error PA Restart Memory Failure"

id: pwp_error_PA

register_type: discrete_input

address: 74

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error PB"

id: pwp_error_PB

register_type: discrete_input

address: 75

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error PC"

id: pwp_error_PC

register_type: discrete_input

address: 76

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error PD"

id: pwp_error_PD

register_type: discrete_input

address: 77

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error PE"

id: pwp_error_PE

register_type: discrete_input

address: 78

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error PF"

id: pwp_error_PF

register_type: discrete_input

address: 79

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F0"

id: pwp_error_F0

register_type: discrete_input

address: 80

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F1 Compressor Drive Module Failure"

id: pwp_error_F1

register_type: discrete_input

address: 81

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F2 PFC Module Failure"

id: pwp_error_F2

register_type: discrete_input

address: 82

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F3 Compressor Start Failure"

id: pwp_error_F3

register_type: discrete_input

address: 83

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F4 Compressor Running Failure"

id: pwp_error_F4

register_type: discrete_input

address: 84

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F5 Inverter Board Over Current Protection"

id: pwp_error_F5

register_type: discrete_input

address: 85

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F6 Inverter Board Over Temperature Protection"

id: pwp_error_F6

register_type: discrete_input

address: 86

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F7 Current Protection"

id: pwp_error_F7

register_type: discrete_input

address: 87

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F8 Cooling Plate Overheat Protection"

id: pwp_error_F8

register_type: discrete_input

address: 88

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error F9 Fan Motor Failure"

id: pwp_error_F9

register_type: discrete_input

address: 89

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error FA PFC Module Over Current Protection"

id: pwp_error_FA

register_type: discrete_input

address: 90

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error FB Power Filter Plate No-Power Protection"

id: pwp_error_FB

register_type: discrete_input

address: 91

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error FC"

id: pwp_error_FC

register_type: discrete_input

address: 92

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error FD"

id: pwp_error_FD

register_type: discrete_input

address: 93

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error FE"

id: pwp_error_FE

register_type: discrete_input

address: 94

device_class: PROBLEM

- platform: modbus_controller

modbus_controller_id: fairland

name: "PWP Error FF"

id: pwp_error_FF

register_type: discrete_input

address: 95

device_class: PROBLEM

see Richrd’s [esphome_snippet.yaml]









What should I do? :frowning:

It’s a bit hard to see on the photos but i think you need to swap the rx and Tx wires on the esp.

Unfortunately no, they are connected correctly (but I also twisted it…just for fun…no effect). I ran the ESP installation again (took aprox 5 min). ESP is online but there are no sensor data available (e.g. PWP speed percentage). e.g. PWP power switch is available but no reaction at the heating pump when pushed.

Here are the data from fairyland for MY board (MWH298-V2 2018.03.26). :slightly_smiling_face:


Yeahhhhhh. It’s working fine now. There was no hardware problem…after reading some scripts regarding “modbus” I’ve found the failure. I had to add this to my ESP-Home yaml

Enable logging

logger:
hardware_uart: UART0_SWAP

Now it’s working and all of the sensors are really nice.

Remark: don’t forget to unplug the original wifi-adapter. Otherwise you will risk a “shot circuit” or a “loop”.

It’s a pity that you can’t select a “thermostat template” for the dashboard. It’s just not a “climate” entity. And for “sensors” you can’t use ist…any ideas? The template for my softub looks nice.

My Dashboard from the evening. The heating pump is currently not running

That’s great to hear!

It’s also bugging me a bit, that so far I have not figured out how to make this into a climate entity. I tried, couldn’t figure it out and then just built the dashboard with regular elements. Guess I’ll get back to it over winter when the nights are long :slight_smile:

After two weeks of usage …everything is still working…very well :slight_smile:

Thank you very much . After few days it works for me . Mainly I wait for HW to come from shop. At first I ordered another type of TTL2RS485 board. I doesn’t work . So I decided to buy very similar to yours. It has TX and RX LED. I helps me a lot. And reading logfile !!! I am using ESP32 board , and it uses logging on standard RX,TX ( GPIO1 &3 ). When I did change output to GPIO16&17 it works . Thanks again for your work.
P.S. Right now I am waiting for ESP32 board with connector for external antenna to have better wifi signal.

I am trying to add to your code also other entities ( like reading/setting defrosting etc. ) .

Just quick correction for now. You are calculating Actual power = Actual current * 230V. That is not correct. Because it is inverter, it is not using 230V internally . There is inverter inside . It uses PFC Voltage.
Just
add following code

  • platform: modbus_controller
    modbus_controller_id: fairland
    name: “Voltage of PFC”
    id: voltage_of_pfc
    register_type: read
    address: 0x2
    value_type: U_WORD
    unit_of_measurement: “V”

will give you actual voltage , and correct following code

  • platform: template
    name: “PWP Compressor Power”
    id: pwp_compressor_power
    unit_of_measurement: “W”
    lambda: |-
    if (id(pwp_compressor_current).state) {
    return id(pwp_compressor_current).state * id(voltage_of_pfc).state;
    } else {
    return 0.0;
    }
    update_interval: 1s
    At least for me , is is much more accurate. I have HW power meter for my heatpump. After correction , it is accurate ±5%.
2 Likes

Oh, very cool! Thanks for this correction.

UPDATE: Fix is now included in the github repository

Hi guys.
I found other mistake.
Ambient temperature , address should be 0x5 not 0x4 . Probably just typo during copy .
Anyway , it is not measuring incoming air correctly. For my situation , it is showing 4 degrees less than reality. I am not sure , where that temperature sensor is installed , maybe it is measuring outgoing air temperature. I will measure it in next days . Right now I am 10km away, connected remotely. I have two other thermometers , which shows higher temperature.

1 Like

I tried to setup everything the way @rstcologne and @deepstahl77 did.
However the RS485 Converter only lights up one LED and the ESP is sending Data to the Controller Board. The Controller Board never sends anything back. I have a MWH298-V2.1 Board.

Does it matter if the heatpump is installed properly? Right now its not installed yet and I wanted to test the ESPHome Modbus Implementation.

“hardware_uart: UART0_SWAP” didn’t help.

Did anybody else have that issue?