dbuezas / eq3btsmart

62 stars 9 forks source link

[EQ-3] Error updating: Device not found #71

Open andycockerill-cpi opened 1 year ago

andycockerill-cpi commented 1 year ago

I'm using an Esphome BT proxy with the following config:

esphome:
  name: office-bluetooth
  friendly_name: office-bluetooth

esp32:
  board: esp32dev
  framework:
    type: esp-idf

logger:

api:

ota:

wifi:

  ap:

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms
    active: true

bluetooth_proxy:
  active: true

I get entries in the HA logs like:

This error originated from a custom integration.

Logger: custom_components.dbuezas_eq3btsmart.climate
Source: custom_components/dbuezas_eq3btsmart/climate.py:326
Integration: eQ-3 Bluetooth Smart Thermostats (dbuezas) (documentation, issues)
First occurred: 15:30:10 (2 occurrences)
Last logged: 15:40:13

[EQ-3] Error updating: Device not found

I'm running HA in K8S on a Raspberry PI 4.

dbuezas commented 1 year ago

To ensure it is not a signal issue, put the btproxy right next to the eq3 and let it autodiscover (remove the eq3 from integrations first and restart HA). If it doesn't discover it, there is an issue.

andycockerill-cpi commented 1 year ago

Thank you for the fast response. I followed your instructions and it discovered straight after a restart.

dbuezas commented 1 year ago

And does it connect and communicate correctly?

andycockerill-cpi commented 1 year ago

I'll leave it connected and get back to you when I have more info.

andycockerill-cpi commented 1 year ago

Further info: in the Logbook, at the same time as the error in the system log, I'm seeing: Screenshot from 2023-11-23 16-12-28

dbuezas commented 1 year ago

Try going to the options and clicking "keep connection open". I think btproxys can keep at least 3 open connections at once. You can also reduce the scan interval to 5 minutes, which will prevent disconnections.

Hopefully that makes it more stable. Note that I'm not using blproxys myself, I found usb dongles to work better

andycockerill-cpi commented 1 year ago

Thank you for the info, I'll try those.

andycockerill-cpi commented 1 year ago

I increased the scan level to 10 minutes (it was set to 1 as default) and selected "keep Bluetooth connections open". Errors have now stopped. I think it's probably worth noting this in the README for users of BT Proxy? Thanks once again for your prompt replies.

dbuezas commented 1 year ago

Oh cool to hear. Feel free to post your experiences there

dbuezas commented 1 year ago

One thing to take into account is that if your update rate is 10 times slower, you'll get a tenth of the warnings just because there's a tenth of things happening (you won't get a warning while the integration isn't doing anything)

It may well be that the esp32 was getting drown in work so it started failing, so reducing update frequency really solves things.

EuleMitKeule commented 10 months ago

I receive this error even with "Keep bluetooth connection open" enabled.

I think the problem does not lie in eq3btsmart or even python_eq3bt, at least when "Bluetooth adapter" is set to "Automatic".

When this is the case the exception is raised when homeassistant.components.async_ble_device_from_address does not return a BLEDevice. To my understanding this will occur when the Home Assistant bluetooth component does not see any bluetooth advertisements from the thermostat. If I am correct about this, it would mean that the issue lies either in the bluetooth component of the Home Assistant core itself or with the thermostat hardware failing to advertise itself.