-
Notifications
You must be signed in to change notification settings - Fork 26
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
Separate basic decoding functions from complete weather sensor runtime application #217
Comments
The required interface to the decoding part is not 100% clear to me. If you replace the radio object by a dummy, where do you get the sensor messages from? In general, it should be possible to exclude some parts of the code (including unwanted dependencies) by adding another |
The whole receive infrastructure (also init and configuration of chip) is done within standard Tasmota system. Tasmota gets frame from Bresser Weather sensor. This frame will be injected into your library and the result is handled in standard Tasmota way. To make it short, best would be a only decoding module without operating system, radio library or storage stuff. |
Hmm, maybe we could separate the sensor structure and the decoder methods from Did you consider using source code from https://github.com/merbanan/rtl_433 as an alternative? |
"Did you consider using source code from https://github.com/merbanan/rtl_433 as an alternative?" |
I normally use Tasmota as code base for ESP/ESP32 applications, so I tried to integrate "WeatherSensorDecoders" in a "HELTEC LoRa 32" system together with a BMP280 pressure sensor. The processing host for weather data is a linux node-red machine. ESP32 should be only a mqtt gateway (868Mhz-Mqtt), rain/lightning statistics stored at node-red system (not necessary at ESP32). The display of "HELTEC LoRa 32" should be controlled by node-red.
This means I need only raw Bresser decoding functions from library!
In the end, it works, all features of Tasmota (rule, display, mqtt, wifi,..) are available:
09:26:03.469 MQT: tasmota/stat/Weather/SENSOR = {"Time":"2025-01-02T09:26:03","Bresser":{"123456":{"ch":0,"battery_ok":1,"rssi":-113.00,"snr":-20.00,"stype":"1","temp_c":4.1,"humidity":95,"wind_gust":1.2,"wind_avg":1.2,"wind_dir":192.0,"uv":0.0,"light_lux":796.0,"rain":1273.3}}}
09:26:03.645 MQT: tasmota/stat/Weather/SENSOR = {"Time":"2025-01-02T14:17:44","Bresser":{"54320866":{"ch":1,"battery_ok":1,"rssi":-98.00,"snr":-20.00,"stype":"4","temp_c":18.70,"moisture":73}}}
09:26:04.735 MQT: tasmota/tele/Weather/SENSOR = {"Time":"2025-01-02T13:55:55","BMP280":{"Temperature":27.9,"Pressure":979.7},"PressureUnit":"hPa","TempUnit":"C"}
The PROBLEM is, that I need to use nearly all sources and includes, for decoding a single 868-Bresser-weather frame.
The request would be to have an encapsulated decode "library" (for example use in Tasmota) inside a full blown "Mathias-bs/WeatherSensor" library. I think the first step is done with WeatherSensorDecoders.cpp, but there are still too many dependencies.
I would like that this example would be possible, without too much overhead:
OVERAL: Integration in Tasmota is not a big deal, all we need is still there ("LoRa Bridge", xdrv_73_9_lora.ino).
Decoding Bresser protocol plus Tasmota features (Display, Sensors, Scripting, Rules, Mqtt,...) brings a lot of advantages. I am running "Mathias-bs Bresser decoding" inside Tasmota on a "HELTEC LoRa 32" with a bm280 pressure sensor. The "Weather calculations" (rain, pressure, wind, ..) are done with node-red via mqtt. Some weather parameters (temperature, pressure, rain) are set from node-red to tasmota-display (HELTEC LoRa 32). I am using a 6in1 Bresser sensor plus an additional hygrometer sensor. Data send to "wunderground.com" ...
The text was updated successfully, but these errors were encountered: