ya. The esp32 is running BLE at max power, while also running wifi/mqtt and webserver. The developer of the NimBLE library mentioned similar comments. The BLE power can be reduced in the code, if it causes issues
if you only have curtain, bot, and/or meter that shouldnt be a problem though
The one part i struggle with every time is upgrading the actual vis studio side of things.
I seem to have to start from scratch every time, download the files from GitHub.
delete the existing files “SwitchBot-BLE2MQTT-ESP32 folder” and then make a new project and rebuild the whole thing from scratch with just coping past the config that i saved in notepad
yes you need to copy paste your settings from version to version. As long as I didnt add a new variable you can copy paste the variables names etc from your last file
This is my first esp/arduino project and making values configurable through a webpage wasnt really a design plan to avoid issues during development
you can use a program like “Beyond compare” or “winmerge” to compare your last file against the latest version and easily copy your settings over that way
Hello, i have two switchbot bots that i managed to integrate into home assistant using a custom addon that in my opinion works better than the official one.
Unfortunately, Bt range is very poor, so i donwloaded the project and followed the istructions for Visual Studio Code PlatformIO.
I have two Esp2 boards, both from Azdelivery (ESP32 NodeMcu WiFi and D1 Mini Esp32) with CP2102.
I changed Mac addresses and the required settings, the process went smoothly with both boards, and i only got some yellow warnings (forgive me but i’m totally noob with esp32 and Mqtt).
After flashing, in both cases i can get the ipaddress of the board, but i only get a linkquality entity in Home Assistant (i.e. -65 rssi), with no other entity related to my bots (see picture).
I double checked the Mac Addresses and flashed many times the two boards, using different project tasks for the first board (esp32, azdelivery-devkitv4, etc) and Wemos D1_mini_32 for the second board, but i didn’t find a way to get the bot entities.
I didn’t set any password for them.
Am I missing something?
So far, I think this is a great project, but I’m struggling.
Got my first SwitchBot item, which is the SwitchBot Meter Plus.
Below is the area that I put it in for the code, and the Mqtt Explorer information.
I see the switchbot gateway in my MQTT area on my Home Assistant, but not the meter.
Is the Meter Plus not supported? Do I need to put it some place else in the code? The ESP and the Meter are right not to eachother. For reference, the ESP board I’m using is https://www.amazon.com/gp/product/B07QCP2451/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
the bots are not being discovered by BLE. not sure why but I can only guess incorrect MAC. Make sure you use “:” inbetween the MAC address, I accidentaly used a “;” once and it will do that
the mqtt settings look correct because you got the wifi rssi entity of the esp32 board. Since you aren’t seeing any messages on homeassistant then the device hasnt been found
Are u placing the esp32 close to at least one of the bots?
Hey so the switchbot meter plus is brand new and there is no specific documentation for it
it may provide slightly different data then the normal meter, I dont know. If so then it may not work without a couple changes
If you want to send me some screenshots of the BLE advertising data using an app called “nRF connect” on your android or iphone I can look at implementing it
Understand. I ended up with the device so I figured I would try.
I’m not entirely sure what you need. I tried to clone, but it didn’t like that so I took a screenshot.
Let me know if there is something else that I can try to provide.
both those screenshots work, but if u can send a couple and label them that will help alot
I am looking for the part that says “Service Data:”
from screenshot 1, or the the line where it says 0x16 in screenshot 2
the service data will update when the temp or humidity value changes etc.
so take a screenshot and mark the current temp and humidity, then hold the meter in your hand or something to increase the temp. Then take another screenshot and mark the temp and humidity. Rescan in between each screenshot
I have two switchbots, both work with app (seen as Bot 1a and Bot B4) and home assistant custom integration (https://github.com/cagnulein/switchbot_press), but with poor bt range
Battery is new and firmware is 4.9, may I provide other information?
I had an issue with an ESP32 running a PMS5003 and DHT22 that kept losing connection. Oddly enough I have 4 exact same ESP32’s with Exact same setup that were not having that problem. One of which was even at a greater distance from an AP then the one losing connection.
After a bit of google-ing I added the following line under
wifi:
ssid:
password:
power_save_mode: none
for now that seems to have done the trick. on that specific ESP32 module.