Ensto wireless thermostats

I have had 2022.12.0 for 10 days now without issues. So it should be fine.

I have tried a couple of days to pair Ensto ECO16BT -thermostat with no luck.
I made clean ESPhome -code where is only esp32_ble_tracker and with that code I can find other BT-devices but not thermostat.

I also try to use nRF Connect App. With app I find thermostat but it doesnā€™t send any advertised service. I made factory reset but result was same, no advertised service. However, in the attribute table I can get list of some services.

Any ideas what can I try next?

Does it work with Enstoā€™s own mobile app with their instructions?
Does thermostatā€™s blue led start blinking when you press the Bluetooth button for few seconds to put it to pairing mode?
Thermostat allows only one active client, so only mobile app or ESP32 can be connected at the same time and it stops sending advertisements after being connected.

Yes and yes.

Yes, I read that information from this topic. Thatā€™s why I made factory reset to thermostat, so I can be sure that there is no active clients. I also try to unpair mobile app and shutdown thermostat momentarily but these not help.

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