Mimics a remote thermostat over CNRF. You can use any thermostat/temp sensor as a remote thermostat. This projects supports up to 8 remote thermostats. Use any temperature sensor or thermostat as data source for the Ecodan heatpump. The required hardware is the same as used by https://github.com/gekkekoe/esphome-ecodan-hp
English (default), Dutch, Italian, French, Spanish. Select the language in ecodan-remote-thermostat-esphome.yaml
file.
If you want to contribute with a translation: copy the file ecodan-labels-en.yaml
to ecodan-labels-xx.yaml
, fill in all the labels and submit a pull request.
If you don't want to solder, use one of the tested boards. More boards that should be working. It also should work for airco units with cn105 connectors.
Cable
- Get one of the grove female cable and a ST PAP-05V-S connector. Remove one end of the grove connector and replace it with a ST PAP-05V-S connector. Here's an example:
Pin mapping (from left to right)
grove | cn105 |
---|---|
pin 1 - black (gnd) | pin 4 - black (gnd) |
pin 2 - red (5v) | pin 3 - red (5v) |
pin 3 - white (GPIO 2) | pin 2 - white (Tx) |
pin 4 - yellow (GPIO 1) | pin 1 - yellow (Rx) |
Note: pin 5 (12v) on the cn105 is not used.
atom s3 lite https://www.digikey.nl/en/products/detail/m5stack-technology-co-ltd/C124/18070571
grove cable (multiple options/lengths available) https://www.digikey.nl/en/products/detail/seeed-technology-co-ltd/110990036/5482563
JST PAP-05V-S connector https://www.digikey.nl/en/products/detail/jst-sales-america-inc/PAP-05V-S/759977
- Install ESPHome https://esphome.io/guides/getting_started_command_line.html
python3 -m venv venv source venv/bin/activate pip3 install wheel pip3 install esphome
- Fill in
secrets.yaml
and copy theecodan-remote-thermostat-esphome.yaml
to your esphome folder and edit the values (check GPO pins (uart: section), you might need to swap the pins in the config) The secrets.yaml should at least contain the following entries:
wifi_ssid: "wifi network id"
wifi_password: "wifi password"
- Edit the following section in
ecodan-remote-thermostat-esphome.yaml
to match your configuration. ESPhome (currently) does not support remote yaml file templating. You probably need to download thethermostat-room.yaml
file in aconf
subfolder of the folder where yourecodan-remote-thermostat-esphome.yaml
is stored. Then configure up to 8 remote thermostats. Use the commented line as template (don't forget to replacethermostat-room-1
androom_identifier: 1
):
thermostat-room-1: !include { file: confs/thermostat-room.yaml, vars: { room_identifier: 1, room_name: "Room 2" } }
packages:
# up to 8 thermostats can be defined. 0-7.
thermostat-room-0: !include { file: confs/thermostat-room.yaml, vars: { room_identifier: 0, room_name: "Room 1" } }
# thermostat-room-1: !include { file: confs/thermostat-room.yaml, vars: { room_identifier: 1, room_name: "Room 2" } }
remote_package:
url: https://github.com/gekkekoe/esphome-ecodan-remote-thermostat
ref: main
refresh: always
files: [
confs/esp32s3.yaml,
## enable label language file
confs/ecodan-labels-en.yaml,
#confs/ecodan-labels-nl.yaml,
#confs/ecodan-labels-it.yaml,
#confs/ecodan-labels-fr.yaml,
#confs/debug.yaml,
confs/wifi.yaml,
]
- Build
esphome compile ecodan-remote-thermostat-esphome.yaml
- To find the tty* where the esp32 is connected at, use
sudo dmesg | grep tty
. On my machine it wasttyACM0
for usb-c, andttyUSB0
for usb-a. On a Mac itstty.usbmodemxxx
- Connect your esp32 via usb and flash
esphome upload --device=/dev/ttyACM0 ecodan-remote-thermostat-esphome.yaml
- You can update the firmware via the web interface of the esp after the initial flash, or use the following command to flash over the network
esphome upload --device ip_address ecodan-remote-thermostat-esphome.yaml
Power down your unit (use circuit breaker!) and plug the flashed unit into the CNRF port. It's near the regular CN105 port. Turn SW1-8
to on to enable the remote thermostat. Restore the power and select the remote thermostat as thermostat. If you are using IN1
port, you probably need to disable it via SW2-1
The esphome component will be auto detected in Home Assistant. In Home Assistant you need to enable actions. See https://esphome.io/components/api.html#actions Perform the following steps:
1. Find your device in the device list
2. Click the “configure” button next to it
3. Check the “Allow the device to perform Home Assistant actions” box
4. Then click “submit”.
Depending on how many remote thermostats you have configured the following actions will become available: set_climate_temperature_room_0
, set_climate_temperature_room_1
, .. set_climate_temperature_room_7
Use these actions to link your thermostat to a temp sensor or any other thermostat. Update this value when the source changes. You can manually test (if everything is correct) by performing the following steps in Home Assistant:
1. Click Developer tools and select the actions tab
2. Select action set_climate_temperature_room_0
3. Fill the temperature field and click perform action
Your thermostat is then updated with the new temperature.
In this example the climate.kantoor current_temperature
attribute is linked as remote thermostat 0
. The current_temperature
attribute is synced to the remote thermostat on value change only.
- id: SyncTemperatureToRemoteThermostat
alias: Sync temp to remote thermostat
trigger:
- trigger: state
entity_id:
- climate.kantoor
conditions:
- condition: template
value_template: "{{ trigger.from_state.attributes.current_temperature != trigger.to_state.attributes.current_temperature }}"
actions:
- action: esphome.ecodan_thermostat_set_climate_temperature_room_0
data:
temperature: "{{ state_attr('climate.kantoor' , 'current_temperature') }}"
Paste this into a file automations.yaml
in the config
folder of home assistant. Include the automations.yaml
in home assistant by adding the line below in configuration.yaml
.
automation: !include automations.yaml
In the 'Developers tools/Check and restart' tab click 'check configuration' and if all is okay click restart (quick reload is fine).
To link another remote thermostat, just duplicate the yaml above in the automations.yaml
file and give it a unique id
. Don't forget to adjust the room number in esphome.ecodan_thermostat_set_climate_temperature_room_x
to match your remote thermostat number.