pauln / esphome-linp-doorbell-g04

ESPHome custom component for Linptech G6L-Wifi doorbell (linp-doorbell-g04)
MIT License
15 stars 4 forks source link

Contacts for flash mode #2

Closed nemoyar closed 2 years ago

nemoyar commented 2 years ago

I can not understand which contacts to close for transfer to flash in the new version. How below? The description says "In order to boot the ESP32 into flash mode (so that you can write ESPHome to it), you'll need to pull the two pins closest the bottom right corner of the ESP32 module to ground" 20220124_134832

nemoyar commented 2 years ago

Connected like this, but the firmware does not go. There is usb-to-TTL in linux, but the firmware is not uploaded. Maybe you can't take 3.3V from a USB-to-TTL adapter? 3,3V is on the doorbell board 20220124_204527 20220124_204548 2

pauln commented 2 years ago

USB-to-TTL adapters often only provide a small amount of current on their 3.3v pin - not enough to power up and flash an ESP32 - so an external supply is recommended. That said, your screenshot doesn't show it getting as far as flashing. Have you successfully flashed other ESP devices from that Raspberry Pi?

nagyrobi commented 2 years ago

The USB-TTL adapter shown in the photo should be strong enough, I have the same type, it's very good.

nemoyar commented 2 years ago

USB-to-TTL adapters often only provide a small amount of current on their 3.3v pin - not enough to power up and flash an ESP32 - so an external supply is recommended. That said, your screenshot doesn't show it getting as far as flashing. Have you successfully flashed other ESP devices from that Raspberry Pi?

no, first time on this. But if command "esphome logs ~/esphome-linp-doorbell-g04-main/doorbell.yaml" and after that connect 3.3V to bell getting it: image

nemoyar commented 2 years ago

not enough to power up and flash an ESP32 - so an external supply is recommended

how much should be and how to check (on which contacts)?

nemoyar commented 2 years ago

Precisely close contacts IO0 and IO2 to GND? 22

pauln commented 2 years ago

But if command "esphome logs ~/esphome-linp-doorbell-g04-main/doorbell.yaml" and after that connect 3.3V to bell getting it:

This looks like you're successfully putting the ESP32 into flashing mode (waiting for download).

Going back to my earlier comment:

That said, your screenshot doesn't show it getting as far as flashing

I don't have a Raspberry Pi myself, so I haven't kept up on what's involved in compiling for ESP32 on a Pi - but as far as I'm aware, there's no "official" xtensa toolchain available for the Pi. You might need to build your own or try a precompiled version such as https://github.com/koendv/xtensa-esp32-elf-raspberrypi (those are both just results of a quick Google search; as such I can't recommend either of them - I'm just sharing them as an example. Please do your own research).

nemoyar commented 2 years ago

I don't have a Raspberry Pi myself

where do you recommend installing esphome for firmware?

pauln commented 2 years ago

I run ESPHome on my laptop, which is running Ubuntu - but the website has instructions for Windows and Mac as well, or if you have Docker set up, you can try pulling the ESPHome image. It sounds like the ARM64 docker image should work on the Pi, so if you really want to run ESPHome on the Pi, that might be the easiest way to get it working.

nemoyar commented 2 years ago

I'm running in Ubuntu and got result. This is correct? 1

pauln commented 2 years ago

Yes, that looks correct. If you remove the short to ground on the corner pins and then power cycle the doorbell, it should boot into ESPHome (and esphome logs doorbell.yaml should show be able to connect and show you the logs, as long as you enabled logging in your config).

nemoyar commented 2 years ago

I opened the contacts, the doorbell blinks orange, in the terminal it writes about the full buffer 22 When press button on doorbell in log message: 4

nemoyar commented 2 years ago

I got an object in HA, switches work when I press the block buttons, but there is no call when I press the call button. In which sensor should the event go when the call button is pressed? Sensor A or B? image

pauln commented 2 years ago

The RMT RX BUFFER FULL messages suggest that there might be a lot of RF noise (or other transmissions) in your area around 433MHz. I haven't seen that myself, so I'm not sure whether you'll still be able to reliably receive the call button transmissions in that state.

Do you see log messages like the following when you press the call button(s)?

[remote.linptech_g6l:068]: Received Linptech G6L: address=0x123456

If so, use that address value to configure your remote_receiver binary sensor(s), recompile/reflash the ESP32 with the updated config, and you should start receiving events in Home Assistant. If you don't see these log lines, try adjusting the remote receiver config - increasing memory_blocks above the default (3) might help, or you might be able to increase the filter time slightly (not much, though, as the transmissions use quite short pulses) to cut out more of the noise.

nemoyar commented 2 years ago

Do you see log messages like the following when you press the call button(s)?

When I click the buttons on base the event in the log look like this image

Update: I logged the Received "Linptech G6L: address=" entry when I clicked the button! Thank You very much!