-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a Bridge #149
Comments
ESP resources are insufficient to serve the full TCP / IP networks specification. For toys only. |
For the reference, I use Raspberry Pi with bluewalker sniffing the broadcast data, and pushing it to telegraf socket, which sends them to influxdb. It's often overkill, but I have the Raspis anyhow in my home automation setups. |
ESP32 is known for high loss mostly because it uses the same radio module for BLE and WiFi in a shared way. There are many Bluetooth implementations for ESP at various qualities of handling this. You can still get good BLE performance on ESP32 if you're not using WiFi at all, but use an Ethernet module instead. Look for Olimex ESP-32-POE, WirelessTag WT32-ETH01, TTGO T-Internet-POE ESP32 or similars. It will disable wifi completely and radio will only do BLE. It will not catch all the messages but will be perfectly usable for room temperature control in everyday life, multiple messages per minute will surely arrive into the system from each sensor advertising. Place it in a central location at relatively similar distance from most of them. Avoid placing the ESP node in racks, too close to switches or other network equipment as EMI interference may degrade signal reception. Run ESPHome with Ethernet configuration and use For ESP32 node with Ethernet LAN connection, use Do not add web server or any other component which is not absultely necessary as 10 pieces of Xiaomi LYWSD03MMC, Before installed them in various places around the house: Fixing method: |
Tests have shown the ESP32 to be the worst of the few SoCs when running BLE only. When testing, the transfer of the counter of received advertising packets to the UART was used. |
The purpose is to have a lot of BLE sensors around the house to do the measurements. Those are the ones that need to be low power consumption, and battery powered to be able to put them in optimal measurement places. A bridge's purpose is to gather data from BLE sensors and forward them to the home automation system. Often it has to be in a separate location than the server where the HA system is (server in basement for example, poor RF coverage, not to speak about virtualisation issues etc.). A bridge could be placed in the center of the house and does not need to be battery powered. Just choose a place with good RF sights and wall or PoE power. It will gather BLE data and forward it down to the server, preferably by LAN cable. I really don't care about how much power eats an ESP32 as a bridge... it's still way less than a raspberry for example, which also can have a lot more other problems on long term like failing SD cards and boot issues after long operation times. Having a full blown linux running up just to gather data from BLE devices and forward them on to another system is an overkill and source for operational troubles on long term. ESP32 agree it's not perfect, but it's a kind of set it and forget it solution which can be reliable enough for most people, with a much longer lifespan than a full-blown operating system solution will ever have. Additionally combined with a PoE network switch one can run the entire system from a common managed power source protected with a UPS etc. |
I consider this as an advantage because many people know it well, has great open source community support and knowhow is very wide. Agree that newer chips are more modern and can do much more in a much better way but are still kind of exotic for the majority of the users. It will take more time to get widely supported by open source projects like ESPHome or Tasmota, and by that time they will be also considered antique. It's an endless loop :-) |
It does nothing for the main audience. Using ESP requires tools and specialized knowledge. ESP cannot be flashed from a smartphone. |
Well you probably didn't study deep enough the ESPHome project. Everybody who can deploy a Home Assistant instance by themselves, will be able to auto-generate preconfigured firmwares for any kind of custom ESP solution, one needs just a USB cable (or an USB-TTL adapter at most). Firmware can be flashed directly from the browser. I'm not talking theoretics, I do have my WT32-ETH01 running and forwarding sensor data from several LYWSD03MMC to Home Assistant as native sensors. Things I've mentioned do matter for this kind of audience, which is not small at all. |
Here I have a ESP32 module from the store. Plugged it into a USB charger. There is a smartphone. How to flash? |
This becomes offtopic ftom the original OP question. I presented a viable solution to @CSchoch and I'm terribly sorry you dont like it - but the fact is, it works and can be implemented relatively simply and cheap. My post wasn't intended to offend you in any way, please excuse me if I made it feel that way. I'm not contradicting any of your statements. |
I also devoted a lot of time to ESP - more than 5 years. Based on this, I describe the problems that exist there. And the goals are not in the offtopic, but in finding solutions to these issues. And look around - the main questions and problems occur among ESP users. |
Well, if you mean first time - yes, you must connect it via UART and program it. But all later versions go via OTA and thus also via phone - connect to module via IP and upload new version - if that's what you mean. If you mean change only minor things - yes, ESPHome is built in a way that each and every thing requires upload whole bin file again and again... i hate this part, too. Tasmota is more flexible in this regard - it allows many changes via console. |
I'd be happy if you could post us a link to such a product which can forward BLE data to Home Assistant - nothing more. |
If you dig deeper, then a typical module is sold with "AT" firmware. Includes OTA. But you need to send the command via USB-UART. And in OTA there is a link to the URL, which can be redirected in the program on the smartphone. |
@Protoncek I think this shows us this conversation is not objective. |
As a result, the only remaining solution for BLE is the use of RPi and ready-made analogues like "Home Assistant Blue". |
Well that's not the category of "you press a couple of buttons on the phone and everything works" lol. |
Hm... i guess that it's true if you intend to do more with BLE. However, just for xiaomi temperature and moisture reading my ESP32 with tasmota reads values quite perfectly. No need for anything else. Also, after reboot (or startup of ESP32) all values are shown in a matter of seconds (unlike when using ESPHome, where getting all data could take as long as 5 minutes. |
@Protoncek under current ESPHome (2022.3 at time of writing) values show instantly after the node boots up. |
Isn't there a pre-installed program in these devices? Need something to solder and an extra computer? There are other options for the price of an ESP32 device - Xiaomi Gateway3. Fully serviced from a smartphone. |
No there isn't - on raspberrys at least... Thanks for the tip, but that costs more than 5 times than an ESP32 Nodemcu, and almost 3 times more than a WT32-ETH01 for this region - but that's again, offtopic. And there's no open source firmware alternative for it. No chinese cloud managed stuff allowed here, sorry. Has to be able to operate off the cloud from the very first boot. An RPi is also a solution but a big overkill for just forwarding data. |
|
Not qualifying: All Xiaomi devices must be linked to an account via the Mi Home app, otherwise they don't send data. Also it's not a firmware, just an extra binary you can hack onto the device to add some extra functionality. |
@pvvx you can try as hard as you want, you won't convince us. |
Is that so? I must test it then. Is there anything that has changed in ESPHome? From my understanding bad drivers are(were?) the main cause for bad working... |
I'm not going to convince. I'm looking for normal solutions, not toys in ESP. There are many Tuya Smart Plug devices on the market. They have a BK7231x chip installed. It supports BLE and WiFi. Full replacement ESP32 has the ability to build a BLE-WiFi gateway. Initial Open Source Integration: |
ESPHome project starts to support RP2040. I wouldn't be surprised to cover BK7231x too in the future. |
The ESPHome project should force sellers to sell ESP32 modules with open OTA firmware. And also supply a power supply and a case. Then it might be worth considering. |
You're offtopic again. There are products which come with ESPHome preinstalled. Same with Tasmota. And I don't thing forcing anything ever leads to anything good... |
Coercion is due to popularity, price and consumer qualities. ESP32 does not have this today. Only in narrow specific circles, and not for the mass user. |
Well that's only how you see it. |
I not only see it, but I can participate and correct this process. This is not the first time and there is a lot of experience in such cases. :) |
Hi,
Which Hardware as Esp32 replacement would you use to build a proper Bridge to Wlan or Lan.
Considered the high loss of esp32.
Kr
Christian
The text was updated successfully, but these errors were encountered: