libretiny-eu / libretiny

PlatformIO development platform for IoT modules
http://docs.libretiny.eu/
MIT License
405 stars 60 forks source link

Pullup does not work in ESPHome on WB3S #135

Open dungeon77 opened 1 year ago

dungeon77 commented 1 year ago

Hello, Kuba. Thank you for the great work! I can't get one moment. I have a lamp on a wb3s chip, it has an IR receiver on pin P1. In ESPHome, the receiver does not want to work, no matter what settings I make. But it works fine in Openbecken. And also it starts working in ESPHome if I solder a 10k resistor from the data leg to 3.3v Tell me, what am I doing wrong? Maybe you can advise something

kuba2k2 commented 1 year ago

Can you post your config?

dungeon77 commented 1 year ago

It's useless, I've tried everything. For example,

remote_receiver:

kuba2k2 commented 1 year ago

It's possible that pull-up doesn't work with interrupts. It's being fixed on the AmebaZ2 branch, but it's not ready yet. You could test it if you wanted, but that requires a fair bit of setup.

dungeon77 commented 1 year ago

if it's in my power - of course

dungeon77 commented 1 year ago

just tell me what I should do :)

kuba2k2 commented 1 year ago

Install https://github.com/kuba2k2/libretiny/tree/family/ambz2 in PlatformIO And install https://github.com/afflux/ltchiptool/tree/amebaz2 with pip install -e . And use version: latest in your yaml instead of dev

dungeon77 commented 1 year ago

OK, I'll try))

dungeon77 commented 1 year ago

Kuba, I'm sorry, but what if I don't use PlatformIO? I have libretiny (although still libretuya)) installed on python in windows. As well as the libretiny addon in homeassistant. I have platformio installed, but my knowledge of it is extremely small

kuba2k2 commented 1 year ago

Yeah - it requires some complicated setup. The best solution for you would be to wait until we merge the changes :smiley:

kuba2k2 commented 1 year ago

@dungeon77 can you check if it works on latest LibreTiny version? (1.2.1 right now)

dungeon77 commented 1 year ago

I still have the old version. How can it be updated? I have the Libertiny ESPHome addon in Home Assistant. Or just wait?

PLATFORM VERSIONS:

kuba2k2 commented 1 year ago

Update the addon then. You might need to clear its data too.

catalin2402 commented 1 year ago

Or simply uninstall and reinstall it. This way all the cached data is wiped and only the configs will be retained

dungeon77 commented 1 year ago

the addon has been updated. And libretiny is still 1.0.1 How to update it? I thought the addon would download, but it's not

catalin2402 commented 1 year ago

Uninstall and reinstall it. It will retain your configs and it will delete all the cached build files (cached platofrms, libraries, etc.)

dungeon77 commented 1 year ago

Sorry, a lot of work and little free time. In general, it turned out to update all the components, I flashed one of the lamps with a new firmware, but... The first attempts failed. While the remote does not react the same way as before. When there is more time, I will make more attempts.

HARDWARE: BK7231T 120MHz, 256KB RAM, 1.03MB Flash

Config:

remote_receiver: id: ir_rec pin: number: P1 mode: pullup: true input: true inverted: true dump:

dungeon77 commented 1 year ago

with this configuration, but with a soldered resistor, the receiver works fine