fsaris / EspHome-AwoX-BLE-mesh-hub

Custom component for ESPhome that can act as a AwoX BLE mesh hub (Telink mesh)
54 stars 16 forks source link

Update ESPHome to 2024.2.0 #74

Closed Dillton closed 8 months ago

Dillton commented 8 months ago

Hello @fsaris

There seems to be some problem after ESPHome update. ESP is not able to connect to mesh. Below you can find logs but I am not sure if it will be useful somehow.

I will try to roll back to previous version once I get home later today. logs_awox-ble-mesh-hub_run.txt

I have found this regarding BLE in release notes so maybe it has something to do with this issue. https://github.com/esphome/esphome/pull/5277

FrederikPM commented 8 months ago

Just chiming in that I'm experiencing the same issue. err.txt

Dillton commented 8 months ago

Just chiming in that I'm experiencing the same issue. err.txt

Hello @FrederikPM If it's possible for you can you restore ESPHome addon to previous version, compile the package and manually install via USB to try if it will work?

I tried to do this wirelessly but it's not possible as there is mismatch in OTA version. Anyway I will try later today when get back home as I mentioned above.

michalpulda commented 8 months ago

I can confirm the issue.

I can confirm that restoring to the previous version of the ESPHome and flashing it using USB connection works.

fsaris commented 8 months ago

probably related to internal changes in https://github.com/esphome/esphome/pull/5277

will investigate during the weekend

Dillton commented 8 months ago

Also can confirm that restoring the previous version works. You can also update ESPHome addon to 2024.2.0 but not the ESP itself.

fsaris commented 8 months ago

dev branch works with ESP 2024.2.0

https://github.com/fsaris/EspHome-AwoX-BLE-mesh-hub/commit/0400acef87110077f7bf8952be7d833064ce88ff

Dillton commented 8 months ago

Confirm dev branch is working. So it was really about on line of missing code? 😄

fsaris commented 8 months ago

So it was really about on line of missing code?

Not really missing but a backwards incompatible change in esphome that now requires this call. This will break for older versions of ESPHome

hosebei commented 8 months ago

same here, works with dev branch.

TotalPanther317 commented 8 months ago

Can also confirm this working, maybe clone the current code to a second branch and commit the new thing to main?

Jinguba commented 8 months ago

How can we install the dev branch?

TotalPanther317 commented 8 months ago

Make it this:

external_components:
  - source:
      type: git
      url: https://github.com/fsaris/EspHome-AwoX-BLE-mesh-hub
      ref: dev
Jinguba commented 8 months ago

Thank you that has worked. With the latest version I'm no longer getting disconnects.

jekkel commented 8 months ago

Unfortunately I had no luck with v2024.2.1 (with dev branch of course, even did clean the build files): almost no connection, pretty unusable. But the downgraded version still works very reliably.

fsaris commented 8 months ago

almost no connection

What is "almost"?

Do you have some logs?

jekkel commented 8 months ago

Sorry for the vague description, I am aware this is not very helpful in fixing an issue. Since I had only a short amount of time I've been in a hurry to downgrade instead of taking the time to gather debugging data. I probably can do so later this week. Until then just the following observations:

btw. Is there anything in the logs one should redact for privacy reasons?

alka79 commented 8 months ago

Hi, dev branch works fine for me with ESPHome 2024.2.1

I learned a couple of things with this:

  1. Don't update if it works !
  2. In case of trouble, go to github first : it saves hours of scratching head
  3. I don't know how to restore a previous version from my backups :(
hosebei commented 8 months ago
  1. I don't know how to restore a previous version from my backups :( My way was:
  2. Restore ESPHome to working version (through home assistant)
  3. reinstall ESP Device with working version
  4. Optional: Save Image file for future use
  5. Optional: Upgrade ESPHome to newest version for usage on other devices.

@fsaris : sorry for hijacking this Issue discussion.

fsaris commented 8 months ago

Fixed merged to main https://github.com/fsaris/EspHome-AwoX-BLE-mesh-hub/releases/tag/2024.2.1

fsaris commented 8 months ago

btw. Is there anything in the logs one should redact for privacy reasons?

@jekkel maybe only the wifi info. The Bluetooth Mac addresses are no issue.

jekkel commented 6 months ago

@fsaris Sorry for the (very...) late reply. Today I tried latest main version and still had no luck. Find a log attached. Downgrading firmware to previous version still makes thing work pretty reliable again (even with most recent EspHome and HomeAssistant). logs_esp32-01_logs.txt

Any idea what's going wrong? Any further info I can provide?

fsaris commented 6 months ago

@jekkel what method do you use for flashing the new version, OTA or wired?

And the only difference (in yaml config etc) is the version of this component?

jekkel commented 6 months ago

yes, the new version got flashed via OTA, I once stored the old firmware binary locally so I don't have to downgrade EspHome back and forth all the time, so I flashed the old version via USB.

My working backup firmware was built with EspHome 2024.1.4 and commit 37a4e6b6f07c70bba14135ddfb6b544f80c1db70 and works reliably still today.

I tried yesterday with latest main (as in not providing any specific ref) and latest EspHome and the posted logs were the result of it.

I did not make any yaml changes as far as I can tell.