Setting up new ESP32

Sorry total noob at this

I thought I’d try my hand at incorporating some esp32 devices in my house
I’ve got a few xiaomi BLE temp sensors that are well picked up by the Yeelight gateway but the BT range on my Pi4 is awful

I ordered a “ ESP32-PICO-KIT-F, ESP32 Module, Genuine Espressif, USB, 3D Antenna” from an electronics store on eBay based in Australia

I plugged in the device to the USB on my pi and followed the setup instructions via the ESPHome integration and selected esp32 pico

When I try and flash the firmware into the device using the integration it all goes well then says “error resolving IP address of frontside.local” and then asks if the device is connected to wifi. It’s literally sitting beside my Deco mesh unit so range isn’t an issue…
I’ve tried enabling only the 2.4ghz band and it doesn’t change

Am I meant to put in the wifi details to the device before doing all this setup? I thought the esphome integration made this almost a plug and play solution

Any help is appreciated

I assume you are using the addon. For the first flash with esphome you need to plug the device in and choose the serial port to flash with. Look in the top right corner of the UI, there is a dropdown box which should have a device like /dev/ttyUSB0 available. Choose it. If it isn’t there then restart the addon.

Hmm I don’t see that despite restarting the add on
Am I meant to be connecting the esp device via the usb and micro usb or is it supposed to be connected to the raspberry pi via GPIO pins

At the moment it is connected to a microusb to usbA cable going into to one of the usb3.0 ports on the pi

After about an hour I figured out it was just the cable…I tried three different cables and finally on the third one it registered. Very frustrating but I’ve managed to get one of the sensors up and recognized

I’m trying to figure out the MAC address of the other sensor now using a ble scanner app on my iPad

When I’ve found that or make changes, do you need to upload firmware each time via the esphome integration to make changes (OTA or via usb), or can You just update in the frontnode.yaml file in the esphome folder?

Well done getting it going. FYI some USB cables are for charging only and don’t have data connections within!

If you want to amend the firmware, you need to upload it to the esp. That can be done via cable (as you did the first time) or with OTA. OTA is usually far more convenient.

Thanks
I actually yelled out “yes!!” Loudly when the cable worked haha

Ok good to know RE updates
I think the range of these BLE devices isn’t the best

I’ve managed to get the MAC addresses for both in the ESP32 but pressing the pairing button while it was searching, it showed the mac address for each device

One of the sensors sits in the same room, about 5ft from the esp32 and rpi - it’ll update anywhere from a few seconds to 6-8min
The other one, if I put it in my bedroom (whose door opens to the room where the esp32 is - maybe 10ft separated by a single wall, barely) it stops. On HA it showed the last temp recording as 57min ago
As soon as I moved it into the same room, its not about 5ft away, the last temp recording was 22s ago (ie the time it took to move it and go log in and check on HA)

Quite frustrating…basically means I’m going to need an ESP32 for each room! But the Yeelight BLE gateway can easily pickup BOTH sensors when its two rooms over without issue at all…I must be doing something wrong here!

I am sorry I missed your response. Yes I found the range difficult. I have a Xiaomi ble temp/humidity sensor in my bathroom. I didn’t want to put the esp in there (too damp, AC sockets already occupied with toothbrush chargers) and put the esp out in the corridor where there are plenty of power points - but it was hard to find one that would get info from the sensor.

Good thing ESP32s are cheap!