Kind of what the title says.
What kind of methods can two ESPs share sensor data between them without using UDP WIFI?
Can 433 MHz work? Or similar methods?
Does it have to be wireless?
Could you use the UART?
Or I2C?
Yeah… it needs to be wireless with some wall penetration.
Just use the serial bus over wireless
Esp-now? It does not need any additional hardware
ESP-Now use 2.4Ghz, like WiFi, and just a lighter network stack.
The lighter network stack can mean it has it easier to transmit, because the overhead is less, but to get better penetration you need to use a lower frequency and/or transmit with high power.
The 433MHz is a choice for penetration, because it is pretty well supported in hardware, but you might need to do some work for the software.
The higher transmit power can be done by directly increasing the transmit power and/or through the usage of better antennas.
Why not Wifi? Its already there and easily usable and supported without needing extra components…
Also, what kind of sensor data are we talking about here? Floats? Strings? Int? Boolean? Do you need juzt one type or a mix of them? If a mix, which ones?
I want to avoid WIFI because one node should send the values to the other, and the other should pass it to WIFI (if used). The idea is that WIFI should not be required.
If I use ESP-Now then that means I can’t use WIFI also on the “other” node? Or can it?
I believe what I need to pass is a few ints, I can’t imagine anything else right now. Possibly a boolean.
What about simple get request using REST API?
But that requires them both to be on the same network.
Network should be optional. The idea is that they should communicate with each other in [some] way and one of them should be in AP mode or if WIFI is available, be connected to it.
But if WIFI does not exist then they should still function as normal but you can connect to the fallback AP.
I’m not sure if I follow you, but anyway if you count wifi out, 433MHz pair is quite simple and cheap option.
HC12 433 uart bridge could be one option, but there’s always some tinkering with uart receive on esphome.
Esp-now and wifi do work simultaneously, but how it’s implemented/supported on esphome, I have no idea…
Sort of…WiFi needs to be on a locked channel, because ESP-Now has to share the channel and ESP-Now has its channel hardcoded.
The normal way with ESP-now is to use two ESP devices in the bridge, where one handle ESP-Now and the other WiFi and then they are interconnected with UART.
Yep, some limitations there are when working with one single radio.
I tried esp-now and wifi with the “auto-pairing” setup few years ago, it was working well.
But honestly, while it’s possible to use esp-now, wifi and ble “simultaneously”, I’m not going to participate a topic where some-one wants to do that on esphome.
-With Esp32-C6 powered on batteries using modem-sleep…
You probably need to use the same channel for esp-now and your wifi (ap) to coexist.
On the other hand you might also use different channels and handle the situation gracefully. For example having the WiFi connected node “collecting” the measurements every x minutes from the esp-now only node
Latest auto (test) deployed docs atm
The docs (as often) might come in handy here
On dual-core devices the WiFi component runs on core 1, while this component runs on core 0. When using this component on single core chips such as the ESP32-C3 both WiFi and
ble_tracker
must run on the same core, and this has been known to cause issues when connecting to WiFi. A work-around for this is to enable the tracker only while the native API is connected. The following config will achieve this:
As for esp-now, that is not yet (integrated) part of espHome but the ongoing (linked) work seems very promising
You already have some answers to your question, which will maybe work for what you REALLY want.
When faced with a question like this I always ask WHY? to find out what is REALLY needed. Often people ask how to implement what they believe is the solution to the real problem, when it might be a sub-optimal solution to the real problem they want to solve.
What data rate?
What distance?
What error rate?
What latency?
What cost (hardware, non-recurring engineering, maintenance, etc)?
I have used 433MHz (not with esphome, a decade before it was first created). I found it highly NOT reliable, so had to implement processes to improve its reliability. It worked okay, but I was VERY happy when the esp8266 came on the scene and made Wi-Fi devices cheap enough to use them freely. I have some BT and some Zigbee. I find both of them more challenging, but there are some cheap sensors available that are battery powered that work well. Battery powered Wi-Fi is much more challenging.
I couldn’t have said it better myself!!
That is true so often and I see it all the time. People want help and ask questions but, you often do need to see if the question itself is even the right question because if it’s not, no answers they receive will help.
IDK if OP is another one of the relatively new group of people who think using any wifi for communication is somehow having detrimental negative effects on their network speed/performance and wifi communication is out of the question type of people… I have a feeling this is another one of those folks who come to the conclusion that reinventing the wheel is a better option than either 1. Test their hypothesis and see if or how little the effect is on their wifi to begin with before making a declaration that the most commonly used protocol simply isn’t up to the minor tasks being asked of it by some esp32 boards.
- if there seeing a decline from a handful of esp nodes, then they are asking the wrong question here for sure!. The question isn’t “what are wifi alternatives for esp communication?” and instead the question needs to be, “what are some home network and wifi upgrades I should make in order to improve performance of my low end and insufficient networking hardwate”?
When you’re car starts making noises, you don’t upend the way you travel by buying and only using a 10 speed mountain bike and instead you take your car to get the thing fixed!k
Why do they have to be on different networks?
Even that’s possible if both networks are connected to the internet as esphome supports proven techniques such as wireguard