LubosD / esphome-smartboiler

ESPHome component for Dražice OKHE smart boilers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No Answer from boiler

robert10055 opened this issue · comments

Hello Luboš,
I tested your project, I don't seem to get any response from Ble.
I right found MAC adress Ble and in the log I see a connectionto the device but not response
Do you have any advice for me?

If one of the last lines you get is "Send our UID", then I know what the problem is.

It has been brought to my attention that the 6-byte string hidden in this array isn't just an unimportant random value, but it's used by the boiler to maintain some sort of pairing.

If your problem is the UID, then you have 3 choices:

  • Wait until I get around to figuring out the pairing procedure.
  • Do a Bluetooth capture to figure out the UID used by your phone by looking for a command packet starting with 0x44.
  • Or use a rooted phone and extract the saved UID from official app's preferences file.

My log

INFO Reading configuration /config/esphome/bojler.yaml...
INFO Updating https://github.com/LubosD/esphome-smartboiler.git@master
INFO Starting log output from bojler.local using esphome API
INFO Successfully connected to bojler.local
[12:09:40][I][app:102]: ESPHome version 2022.3.1 compiled on Aug 2 2022, 20:08:02
[12:09:40][C][wifi:491]: WiFi:
[12:09:40][C][wifi:353]: Local MAC: 78:21:84:79:52:50
[12:09:40][C][wifi:354]: SSID: [redacted]
[12:09:40][C][wifi:355]: IP Address: 192.168.8.109
INFO bojler.local: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for bojler.local
WARNING Disconnected from API
INFO bojler.local: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
INFO Successfully connected to bojler.local
[12:09:57][I][smartboiler:193]: [fd:e7:f0:ad:b2:da] Connected
[12:09:58][I][ble_client:161]: Service UUID: 0x1800
[12:09:58][I][ble_client:162]: start_handle: 0x1 end_handle: 0x7
[12:09:58][I][ble_client:347]: characteristic 0x2A00, handle 0x3, properties 0xa
[12:09:58][I][ble_client:347]: characteristic 0x2A01, handle 0x5, properties 0x2
INFO bojler.local: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for bojler.local
WARNING Disconnected from API
INFO bojler.local: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
INFO Successfully connected to bojler.local
[12:10:34][I][smartboiler:200]: [fd:e7:f0:ad:b2:da] Disconnected
[12:10:34][W][ble_client:117]: connect to fd:e7:f0:ad:b2:da failed, status=133
[12:10:34][D][esp32_ble_tracker:217]: Starting scan...
[12:10:34][D][esp32_ble_tracker:723]: Found device D8:9C:67:B3:47:20 RSSI=-76
[12:10:34][D][esp32_ble_tracker:744]: Address Type: PUBLIC
[12:10:36][D][ble_client:047]: Found device at MAC address [FD:E7:F0:AD:B2:DA]
[12:10:36][I][ble_client:085]: Attempting BLE connection to fd:e7:f0:ad:b2:da
[12:10:36][I][smartboiler:193]: [fd:e7:f0:ad:b2:da] Connected
[12:10:37][I][ble_client:161]: Service UUID: 0x1800
[12:10:37][I][ble_client:162]: start_handle: 0x1 end_handle: 0x7
[12:10:37][I][ble_client:347]: characteristic 0x2A00, handle 0x3, properties 0xa
[12:10:37][I][ble_client:347]: characteristic 0x2A01, handle 0x5, properties 0x2
[12:10:37][I][ble_client:347]: characteristic 0x2A04, handle 0x7, properties 0x2
INFO bojler.local: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for bojler.local
WARNING Disconnected from API
INFO bojler.local: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
INFO Successfully connected to bojler.local
[12:10:57][D][smartboiler:295]: Requesting consumption
[12:11:07][I][smartboiler:200]: [fd:e7:f0:ad:b2:da] Disconnected
[12:11:13][D][ble_client:047]: Found device at MAC address [FD:E7:F0:AD:B2:DA]
[12:11:13][I][ble_client:085]: Attempting BLE connection to fd:e7:f0:ad:b2:da
[12:11:15][I][smartboiler:193]: [fd:e7:f0:ad:b2:da] Connected
[12:11:16][I][ble_client:161]: Service UUID: 0x1800
[12:11:16][I][ble_client:162]: start_handle: 0x1 end_handle: 0x7
[12:11:16][I][ble_client:347]: characteristic 0x2A00, handle 0x3, properties 0xa
[12:11:16][I][ble_client:347]: characteristic 0x2A01, handle 0x5, properties 0x2
[12:11:16][I][ble_client:347]: characteristic 0x2A04, handle 0x7, properties 0x2
INFO bojler.local: Error while reading incoming messages: Error while reading data: [Errno 104] Connection reset by peer
INFO Disconnected from ESPHome API for bojler.local
WARNING Disconnected from API
INFO bojler.local: Ping Failed: Error while reading data: [Errno 104] Connection reset by peer
INFO Successfully connected to bojler.local
[12:11:27][D][api:102]: Accepted ::FFFF:C0A8:80C
[12:11:27][D][api.connection:827]: Home Assistant 2022.8.1 (::FFFF:C0A8:80C): Connected successfully

and my setup

web_server:
port: 80

captive_portal:

Example configuration entry

#esp32_ble_tracker:

#text_sensor:

- platform: ble_scanner

name: "BLE Devices Scanner"

substitutions:
mac_address: FD:E7:F0:AD:B2:DA

external_components:

  • source: github://LubosD/esphome-smartboiler@master
    refresh: 0s

mqtt:
broker: 192.168.8.12
username: mqtt
password: mqtt

id: mqtt_client

sensor:

binary_sensor:

select:

climate:

esp32_ble_tracker:

ble_client:

  • mac_address: ${mac_address}
    id: drazice_okhe

smartboiler:
ble_client_id: drazice_okhe
topic_prefix: smartboiler
temp1:
name: boiler_temp1
temp2:
name: boiler_temp2
hdo_low_tariff:
name: hdo_low_tariff
heat_on:
name: boiler_heat_on
mode:
name: boiler_mode
thermostat:
name: boiler_thermostat
consumption:
name: boiler_consumption
state_class: total_increasing
device_class: energy

It seems the whole ESP32 crashes somewhere between the completion of BLE service discovery and the successful subscription to a characteristic.

I'm also working on a Go version for Raspberry Pi 3+ / any Linux system with a BLE-capable adapter. I haven't published the sources yet, but it could also be a solution for you if ESP32 is too unstable...

ok,
so setup is ok?
at what distance from the boiler do you have ESP

I have it right next to the boiler now, but I've had success with using at a 15m distance (through ceilings and walls).

thanks
wery good idea how use boiler for home automation
I will be test second ESP if is not problem here

During the connection attempt, the display shows the pairing code.
Error is not in ESP

I solved the pairing process in my fork - https://github.com/pedobry/esphome-smartboiler

I solved the pairing process in my fork - https://github.com/pedobry/esphome-smartboiler

Cool! Will you submit a pull request?

I can, but I'm not sure it's good idea - I did a lot of other changes (change in YAML to support multiple heaters, removed custom MQTT topics) which would break existing integrations using your repo.

Nice work. Now I can connect me bojler and reading data and mode.
If I want change mode, information not write to the bojler and more physically not change.
Is interesting that I chang temp and this is correct write
Can you looking again this problems or I do anything wrong

I join the question. The situation is similar to that of robert10055. It is impossible to change the operating modes of the boiler, are they read-only?

I can, but I'm not sure it's good idea - I did a lot of other changes (change in YAML to support multiple heaters, removed custom MQTT topics) which would break existing integrations using your repo.

@pedobry I use your integration and everything works great but i cannot change operating mode, it is only changing between SMART and SMARTHDO but if i want choose for example ANTIFROST, nothing is changed. Is it a bug or it should work so and it is not possible to change other operating modes?

Thank you so much!

@pedobry I ended up merging your fork.

Hello @LubosD ,

because fork is merged now, i have changed my ESP device to your git code. Is there any chance to repair correctly changing operating modes? Is there any possiblity to read actual HDO state from water heater? Now "Water heater HDO" only tells that the HDO detect function of water heater is active but nice to have function of reading HDO for other devices in home assistant. For example if HDO is active, turn on floor heating etc.

Thank you.

Hello @LubosD ,

because fork is merged now, i have changed my ESP device to your git code. Is there any chance to repair correctly changing operating modes? Is there any possiblity to read actual HDO state from water heater? Now "Water heater HDO" only tells that the HDO detect function of water heater is active but nice to have function of reading HDO for other devices in home assistant. For example if HDO is active, turn on floor heating etc.

Thank you.

I fixed the issue with operating mode changing in pull request #7

commented

Ahoj Luboši, prosím nedaří se mi spárovat můj bojler s ESP32. Po instalaci displej na kterém se střídá čas a teplota vody, se začne zvláštně chovat, jakoby se zvýrazňovaly číslice jasnějším svitem, ale nezobrazí se žádný PIN. Netuším ani kam bych jej zadal.
Ani tvůj reset příkaz nefunguje "dd if=/dev/zero of=nvs_zero bs=1 count=20480
esptool.py --chip esp32 --port /dev/ttyUSB0 write_flash 0x009000 nvs_zero"
končí informaci "bash: esptool.py: command not found" a dle mne k žádnému restartu a následné možnosti zadání PIN nedojde

EDIT: vyřešeno, děkuji za tvůj komponent pro kotel Dražice