Ensto wireless thermostats

Not sure what could be the issue. Basically pairing ESPHome follows same steps as pairing with mobile app.

  1. Make sure nothing is connecting to thermostat. For example turn mobile Bluetooth off and make sure there are no ESPHome BT proxies with “active” setting enabled.
  2. Press thermostat’s pairing button for few seconds so that blue led starts to blink
  3. Power on ESPHome while blue led is blinking
  4. ESPHome should connect and blue led should stop blinking

It is of course possible that your neighbor has something that connects to your thermostat before ESPHome does, but then also Ensto’s mobile app wouldn’t work.

I think that my problem is related to that thermostat don’t send any advertisements at least if I understand right what nRF tells me. Could it be possible that Ensto is somehow changed pairing protocol? My thermostat manufacturing date is 26.10.2020 and software version 1.12.8.

I don’t think that protocol has changed. I also have ECO16BT with 1.12.8 software version and it is working flawlessly.
I tested following:

  1. turned ESP32 off
  2. started nRF Connect and added filter “90:” to “filter by name or address” field, which is beginning of my thermostat’s MAC address
  3. started Scan from nRF Connect
  4. selected ECO16BT which was listed and pressed More button. It showed advertisements about every 200ms.
  5. restarted ECO16BT. nRF Connect showed that it started advertising right after restart.
  6. started Ensto’s app and selected ECO16BT. Got connection.
  7. switched back to nRF Connect and started Scan again. It showed that ECO16BT was again advertising, as Ensto’s app disconnected when not being an active app and is only running in background. This might depend on mobile phone settings. Some apps can possibly be configured to run also in background.
  8. switched back to Ensto’s app and it reconnected to ECO16BT
  9. switched to nRF Connect and started Scan again. It showed that thermostat was advertising
  10. turned ESP32 back ON. nRF Connect showed that ECP16BT’s advertisements stopped after ESPHome connected. My ESPHome has been paired before, so it connected right away.
  11. switched to Ensto’s app. ECO16BT device is shown as grayed out and can’t be connected, as Ensto’s app can’t see it, as it doesn’t send advertisements.

Both ESPHome and Ensto’s app can be paired at the same time as starting pairing again with thermostat doesn’t change the pairing secret. I believe that pairing secret is changed with factory reset when pairing button is pressed for 7 seconds. Pairing with the other one of course requires that already paired one is not running as only one client can be connected at the same time.

Thank you for your help. Now I’m sure that thermostat sends advertisements, previous I had slightly misunderstood what nRF tells me.
I have two similar Ensto thermostat and thus far I have only try to connect one of them. However yesterday I tried connect the other one and it works! So now I’m sure that my ESP32 works and I have configured the code right.
Still I have no idea why the other thermostat not work. MAC-address is right, I have checked it from Ensto App and my phone finds same address. I tried factory reset and powered thermostat down, neither not help. Obviously ESPHome not find the thermostat, because I can only see from log-files that scan has started, but thermostat not found.

I managed to get this working. I had few hiccups but eventually connection was made. Thanks for the pretty straightforward install guide. :+1:

Esp board I’m using is AZ Delivery Dev Kit V4 and the thermostat is ECO10BTW if anyone wants to know.

Edit:

I just found out there’s an update for the thermostat available. I didn’t install it because of the risk of breaking the integration.

Good to hear! My ECO16BT has firmware version 1.12.8 / 2.6.1.2848 which is latest for it. A bit different model but firmware versions might be the same. At least that is verified to work without issues.

I didn’t update the thermostats at all. I was afraid to break something. But I still have to replace one thermostat in my apartment so maybe new Ensto thermostat comes with a newer firmware. I haven’t faced connection issues like many others have. Both of my boards are located upstairs and thermostats are downstairs. Signals are good and connections have been stable.

What is the purpose of the temperature calibration service? I haven’t figured that out yet.

It is same as is available in Ensto’s own App. It can be used to make temperature read from thermostat to be closer to real room temperature.

I’m looking some advice, trying to get Ensto bluetooth thermostats to HA. Not sure if I’ve understood something incorrectly or something else.

I’m running HA in container in Intel NUC hardware. I’ve got built-in bluetooth in NUC enabled earlier and I have used few RuuviTags for few months. I can read values from them without issues. I’ve understood that RuuviTags are one type of bluetooth device that just push information. As mentioned, the RuuviTags work without problems.

With Ensto’s, my idea was using ESP32 based bluetooth proxy as to my understanding pairing is needed in order to both read values from thermostat and also change values. My idea is to change temperature based on electricity pricing so that I can benefit cheap electricity hours.

I have 3 Ensto bluetooth thermostats installed and I paired them with my mobile phone to ensure Ensto’s app will see them correctly. That part worked without any issues.

Next part is that I ordered Olimex esp32-poe-iso board since I want to power board via PoE and there is easy setup available for that board with bluetooth proxy. I got the board, then went to Ready-Made Projects — ESPHome page, selected bluetooth proxy, correct board type and followed instructions. I got board flashed and after connecting Ethernet cable I immediately got notification in HomeAssistant that ESPHome device found. I added it and now have ESPHome in integration section with single device named “Bluetooth Proxy a17a14”.

After that I have been trying to get Ensto thermostat paired with bluetooth proxy but no success. I’ve closed Ensto app in phone, disabled bluetooth in phone, powered off thermostat and once powered back on, started pairing mode in thermostat and at the same time powered ESP board. My understanding is that with that approach thermostat should not have any active connections that would block pairing.

I have understood that if pairing works, thermostat would automatically appear to HA as new device. But that hasn’t happened so something is not correct or working as I have understood.

If I enabled debug, I can see following entries in HA side (removed last octet from IP address):

2023-11-29 21:56:19.538 DEBUG (MainThread) [aioesphomeapi.connection] olimex-bluetooth-proxy-a17a14 @ 192.168.0.x: Got message of type BluetoothLERawAdvertisementsResponse: advertisements {
address: 119266492624000
rssi: -33
address_type: 1
data: “\002\001\032\002\n\010\014\377L\000\020\007.\037=\310/\th”
}
advertisements {
address: 53854879428635
rssi: -64
data: “\002\001\006\032\377\006(ECO16BT;0;0;0;\000\000\000\000\000\000\000\000\000\002\001\006\032\tECO16BT f5301b\000\000\000\000\000\000\000\000\000\000\000”
}

In log console output, there are following log lines (changed MAC address):

][api:025]: Setting up Home Assistant API server…
[I][app:062]: setup() finished successfully!
[I][app:102]: ESPHome version 2023.11.4 compiled on Nov 24 2023, 00:49:19
[I][app:104]: Project esphome.bluetooth-proxy version 1.0
[C][logger:416]: Logger:
[C][logger:417]: Level: DEBUG
[C][logger:418]: Log Baud Rate: 115200
[C][logger:420]: Hardware UART: UART0
[C][bluetooth_proxy:088]: Bluetooth Proxy:
[C][bluetooth_proxy:089]: Active: YES
[C][safe_mode.button:022]: Safe Mode Button ‘Safe Mode Boot’
[C][safe_mode.button:022]: Icon: ‘mdi:restart-alert’
[C][esp32_ble:374]: ESP32 BLE:
[C][esp32_ble:376]: MAC address: aa:bb:cc:dd:ee:ff
[C][esp32_ble:377]: IO Capability: none
[C][esp32_ble_tracker:645]: BLE Tracker:
[C][esp32_ble_tracker:646]: Scan Duration: 300 s
[C][esp32_ble_tracker:647]: Scan Interval: 1100.0 ms
[C][esp32_ble_tracker:648]: Scan Window: 1100.0 ms
[C][esp32_ble_tracker:649]: Scan Type: ACTIVE
[C][esp32_ble_tracker:650]: Continuous Scanning: True

So bluetooth proxy seems to work, it can see bluetooth messages from Ensto, it can forward events to HA so something must work and based on console log entries the “active” setting is enabled.

But I’m lost where the issue might be. Since I used the ready-made projects, I didn’t need to need to touch any configuration part but based on logs, everything should be ok as far as I can understand.

Should the Ensto thermostat appear automatically in HA or do need to manually configure yaml files in HA side to add the device?
My understanding is that existing bluetooth setup with NUC’s built-in bluetooth should not interfere or cause any issues.

It does not work that way, you will not use use bluetooth proxy to integrate to Ensto thermostats. Instead you need to install this ESPHome configuration to your ESP32. Change the board name, set wifi secrets and ensto1_mac secret (ensto thermostat mac address) before installing. After installation to esp32 follow the readme about the pairing.

As Perttu said, you need to install Ensto support to ESP32 from that link.
Home Assistant doesn’t support Ensto thermostats like it supports Ruuvi tags and so can’t be used with ESPHome proxy. Perhaps follow these instructions to set up ESPHome to Home Assistant Getting Started with ESPHome and Home Assistant — ESPHome, or follow instructions for installing ESPHome with Docker Compose as instructed in GitHub - jumakki/esphome-ensto

Thanks for the instructions and guidance. I was clearly a bit lost how the ESP32 works.

I got ESPHome running in Docker, took the configuration, changed secrets and Ensto MAC, got it installed to empty board and also got pairing working. In logs I can now see following events so reading details from thermostat is working:

17:56:02][I][ensto.receive:300]: Boost: OFF, offset: 3.00°C, minutes left: 0
[17:56:02][I][ensto.receive:158]: Room: 17.4°C, Floor: 17.1°C, Target: 14.9°C
[17:56:07][I][ensto.receive:337]: Power consumption ratio: 0%, last hour: 0%

I have question regarding how to setup multiple thermostats. In esphome-ensto.yaml there is entry for a single MAC address. How are adding 2nd and 3rd bluetooth thermostats done as I have understood 3 is the max value? Add their MAC addresses to secrets as new lines? Or does the yaml file need some additions as well?

There is an example for using 2 thermostats with one ESP32 in multiple_devices branch as discussed in this issue: Possible to support multiple thermostats? · Issue #3 · jumakki/esphome-ensto · GitHub

Climate control has been removed from that code because it uses too much memory.
3 thermostats likely wouldn’t work because of memory limitations in ESP32.

After some thinking I simply decided to get more ESP32 boards to control each Ensto with dedicated ESP32 device. Now that I’m familiar with the process, everything went really fast and pairing works without any issues.

Thanks for the assistance!

Hello,

I would be happy if I could send data and read from multiple enstos - not constantly, but on request.

For example:
Connect to ensto #1
Set external control temp. +5
And then close connection and wait for 1 minute
Connect to ensto #2
Send same payload
Close connection and wait
Etc.

Is this possible and would it help to minimize load on the esp?

Same thing could work for fetching temps every 0,5 or full hour

Connect to #1
Read temp
Close connection
Connect to #2
Read temp
Close connection
And so forth

Unfortunately it is not possible at least with YAML implementation. BLE Client requires MAC address when created and there can be max 3 of them, as mentioned in
BLE Client — ESPHome

It is not possible to disconnect and connect to another device with same BLE Client.

Darn, that’s a drag. Thank you for the clarification :slight_smile:

I stumbled upon this GitHub - devbis/ble2mqtt: Bluetooth to MQTT bridge, add your bluetooth-capable (including controllable) devices to your smart home
Seems to support enstos bluetooth radiators (which I believe use the same bluetooth app?). My skills weren’t sufficient to get it started so can’t comment if it works/supports multiple thermostats, but might be worth a look?

I believe it supports multiple thermostats at the same time as it is PC based solution and doesn’t have limited hardware like ESP32. It will require that all devices are in range of PC’s Bluetooth dongle.