Merge LibreTiny ESPHome with ESPHome

Does anyone know if it is possible to merge a LibreTiny ESPHome installation with ESPHome?

It has been merged today by the team.

Yes I know that but have several devices in the Libretiny esphome installation. so I mean if you can somehow move them to esphome and then uninstall libretiny.

Just copy the yaml across to the ESPHome dashboard, make sure the name is exactly the same. You can probably just copy the files between the directories, but it’s probably just as easy to make a brand new device.

The yaml files in the libretiny esphome addon are stored in config/libretuya-esphome

The yaml files in the esphome addon are stored in config/esphome

copy away!

I’ve done this (thankfully only the 1 device), however the device is stuck on the 2023.9.0-dev firmware and not updating to released 9.0, 9.1 or now, 9.2 versions

Firmware: 2023.9.0-dev (Sep 29 2023, 09:31:09)

I looked for instructions to migrate from LibreTiny to ESPHome, but couldn’t find any :frowning:

I have :

  • disabled LibreTiny addon,
  • installed ESPHome addon,
  • renamed the /config/libretuya-esphome subdirectory to /config/esphome,
  • started ESPHome addon, checking that both my devices are present and correct
  • uninstalled LibreTiny addon.
  • rebooted the HA machine to ensure that it is now using official ESPHome.

In the YAML code for my Arlec PC191HA power switch device I have changed only the “libretiny:” line to “bk72xx:” and installed.
It all appears to update correctly, however even after multiple attempts it looks as though the device is still running esphome 2023.5.0-dev. Same procedure for my other device, but it is stuck on 2023.7.0-dev

What I have missed ?

Check this

Doh !!! What I missed is that the Arlec PC191HA devices need to be powered off for an unspecified time (could be anywhere from 2 minutes to 8 hours). When powered back on they hopefully restart with the new firmware. If not, power off and wait longer, repeat as necessary.

1 Like

I have 3 Hombli smart plugs flashed with LibreTiny. Now I want to migrate them to ESPHome normal dashboard.

I copied yaml code from LibreTiny addon to a new device in normal ESPHome. Change board rows and it compiled succesfully.

When it starts to upload it results in an error:

ERROR Error sending data: [Errno 104] Connection reset by peer

 ======================== [SUCCESS] Took 167.53 seconds ========================
Warning! Non-Git installations are NOT SUPPORTED.
INFO Successfully compiled program.
INFO Resolving IP address of koelkast.local
INFO  -> 192.168.2.91
INFO Uploading /data/build/koelkast/.pioenvs/koelkast/firmware.uf2 (3125760 bytes)
Uploading: [                                                            ] 0% 
ERROR Error sending data: [Errno 104] Connection reset by peer

When I try to upload uf2 file OTA via webserver I get error Bad Family ID

|16:37:50|[I]|[web_server_base:041]|OTA Update Start: koelkast.uf2|
| --- | --- | --- | --- |
|16:37:50|[W]|[web_server_base:034]|OTA Update failed! Error: Bad Family ID|

How to update these devices to normal ESPHome?

I solved it myself. I used the generic bk72xx as board type. I read on đź’» Chips, boards, features - LibreTiny that specific board types are available. After adapting to wb3s, the migration of the LibreTuya ESPHome devices to the normal ESPHome worked immediately :slight_smile:

I previously upgraded three Arlec PC191HA units (with BK7231) from LibreTiny to ESPHome with relatively little fuss; however I have 2 still running on Tuya firmware … and I’m wondering … what is the “correct” way to add these devices to ESPHome when starting from scratch ?

I assume it is still necessary to install and run cloudcutter to install ESPHome firmware ?
Has a description of this been added to the ESPHome website, the way that Tasmota is ?

Having got ESPHome firmware on the device, it should be easy to add it into HA and ESPHome integration, right ?
The HA ESPHome integration “add device” still does not include BK72xx or RTL87xx chips to be added
image
… and because I happen to know that my device uses a BK72xx I can look for that in the documentation.

Is it really still necessary to install LibreTiny, install the device under LibreTiny, then move the config files to /config/esphome ??