jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.32k stars 590 forks source link

AI-on-the-edge-device operation without WLAN #2780

Open git2fa opened 6 months ago

git2fa commented 6 months ago

The Feature

Referring to the unsolved Solution with UART alternative to WLAN in operation and Start without wifi connection there are a couple of reasons not to use a WLAN dependent solution.

It was not possible for @karstengit to modify the firmware to use the UART to control the AI-on-the-edge-device. To avoid useless WLAN radiation, power consumption and overheating it would be really fine if the firmware would disable the WLAN after a certain time, when it can't establish a WLAN connection.

So it would be perfect to add a configuration parameter that allows to set a certain time or number of retries, after that the WLAN is disabled by the device. When the parameter is 0 (standard) the device has the current behaviour and tries endless to connect to WLAN.

If configuration work is needed, WLAN must be present and the device is simple restarted to search the connection again. When WLAN is off, the measurements can be fetched from the debug output on the UART.

It would be fine if this could be added to the firmware. Thank You!

MisterTechnik commented 5 months ago

I think too, that a no Wi-Fi Mode would would be an amazing enhancement, because I think there would be many use cases. For example my power meter is completely out of range of my Wi-Fi and I could only really power the device with batteries. A on-premise mode would be perfect because it would allow both, far away locations and low power consumption (because no web interface needed and deep sleep possible). I could think of some implementations:

AAPohl commented 5 months ago

One could think of a totally wired solution. Either a device with ethernet or a connection of Power and data (gpio, rx /tx) to mqtt ethernet device.

TBobsin commented 4 months ago

I would also like a wire-bound version. My device is in the electricity meter box. The W-LAN connection is poor there. I have another ESP32 with Ethernet and ESPHOME nearby. It would be great if the data collected by the ESP32-CAM could be read out via a wire connection (UART) after configuration. My water and GAS meters (also with ESP32-CAMs) are also nearby, so I would only have to operate one Ethernet device instead of 4 WLAN devices.

Asphaltsurfer commented 4 months ago

I think a wired solution (LAN with POE) would be best for me.

git2fa commented 4 months ago

There are a lot of other applications possible, when this project could be used as a standalone optical reading device with low power consumption and a simple UART interface. But it seems that an ESP application that does not use permanent WLAN is unthinkable on this planet. :-) In the same way people don't think about the health effects of (needless) WiFi radiation.

A wired solution can work much more reliable, specially when you are not nearby to solve problems with blocked channels or bad signal quality. So why is wireless so attractive and a must have?

SybexX commented 4 months ago

But it's also about the available interfaces, for a lan module such as. w5500 you need SPI and all are already occupied (PSRAM + camera + SD card). In addition, not everyone wants to tear up the basement to lay the LAN cable. The WiFi radiation may not be that nice, but there are plenty of other devices that emit much worse radiation and are accepted by people and used every day. And as long as governments ignore the right to Physical integrity because the consequences would not be good for the economy, nothing will change.

git2fa commented 4 months ago

But it's also about the available interfaces, for a lan module such as. w5500 you need SPI and all are already occupied (PSRAM + camera + SD card).

There is not so plenty of data that you need an ethernet Interface. To solve the problem with the wire distance you can simply use two RS-422-A / RS-485 interface chips like MAX485 or SN75176A. Only a small shielded cable with two wires is needed (shield is GND). Because the interactive use of the ESP UART seems to be impossible, the RS-485 driver can be fixed for sending without receiving data. So no additional software modification is needed on ESP side to switch between sending and receiving. https://www.ti.com/lit/an/snla044b/snla044b.pdf

Screenshot_20240306_123247

SybexX commented 4 months ago

yes, if you just want the value, if you want the website to have convenient settings..., some data will be sent because a lot of the end device is doing to relieve the load on the ESP.