Closed felipecrs closed 1 year ago
Most likely they changed something in ESPHome latest versions, which requires setenv() and tzset() now. I'll need to provide dummy implementations of these methods.
I think this is something related to RTL chips, on Beken the compilation works without a problem using the sntp platform.
confirmed, compiled time
for Beken yesterday with no problem
I don't know what even defines tzset()
on Beken. VSCode can't find it (and underlines the function as undefined), but somehow it compiles properly. It's in time.h
which has an #ifndef __STRICT_ANSI__
statement, and __STRICT_ANSI__
is apparently defined, so I don't know why that function still exists.
Oh, I forgot to mention, this is my libretuya esphome config:
libretuya:
board: wr2e
framework:
version: dev
Should be fixed in da95cc30d3818eea5a44aa10bdf34d947d3290f4.
Is there anything I need to do to make ESPHome pull the fix?
Yes, you need to install LibreTuya again. platformio platform install -f https://github.com/kuba2k2/libretuya
should do the job.
Hm... As I'm using the hass add-on, I guess this is part of the docker build. I'll rebuild with no cache and try again.
No, this is part of PlatformIO. I don't know how to update PlatformIO packages within the container.
I think PlatformIO packages are installed during docker build too:
Well, either I wasn't able to pull in the latest changes or they didn't fix the issue for me. I will investigate it a little more later today.
This is for global libraries, not platforms. It would be quite useless to include all platforms (esp32, esp8266, pi pico) in every docker image.
Does the libretuya.framework.version
ESPHome config attribute makes any difference in this case?
latest
is using whatever the installed version is, and dev
is using the latest version (at the time of installation) from the repo. I don't know if it makes any difference.
Got it. It makes sense then. I uninstalled the add-on and installed it again. This causes the persistent /data
folder to be deleted and therefore, next time ESPHome executes, it needs to pull in all platforms again.
Using latest
:
Using dev
:
So, I guess the correct option is dev
in this case. Now I'll check if the build works.
Right. latest
doesn't touch the installed version, unless there's nothing installed, in which case it pulls from PIO registry. That's why I made dev
the default option.
Done. No errors this time. Thanks a lot!
Lovely! Thanks for the report.
If I put this on my LibreTuya ESPHome
device.yaml
:The compilation fails with:
Full logs are: