Skip to content

Commit

Permalink
[RF] rtl_433_ESP to version 0.3.0 (1technophile#1668)
Browse files Browse the repository at this point in the history
Update to rtl_433_ESP 0.3.0
Resolves issue with sx127x chipset and receiving higher frequencies
Includes support for receiving FSK signals, requires compiler directive OOK_MODULATION=false to switch to FSK mode
Adds unit of measure for rtl_433/battery_ok devices RTL_433_ESP Battery Auto Discovery Missing Unit of Measurement 1technophile#1644
Updates value template for rtl_433/battery_ok in openHab mode
Resolves out of stack space crash lilygo-rtl_433 crash after chacon remote control button pressed 1technophile#1655
  • Loading branch information
NorthernMan54 authored and Mirdinus committed Jun 8, 2023
1 parent a6a14eb commit cbbb929
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion main/ZgatewayRTL_433.ino
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ void launchRTL_433Discovery(bool overrideDiscovery) {
DISCOVERY_TRACE_LOG(F("idWoKey %s" CR), idWoKey.c_str());
String value_template = "{{ value_json." + String(parameters[i][0]) + " | is_defined }}";
if (strcmp(parameters[i][0], "battery_ok") == 0) {
value_template = "{{ float(value_json." + String(parameters[i][0]) + ") * 99 + 1 | is_defined }}"; // https://github.com/merbanan/rtl_433/blob/93f0f30c28cfb6b82b8cc3753415b01a85bee91d/examples/rtl_433_mqtt_hass.py#L187
if (OpenHABDisc) {
value_template = "{{ value_json." + String(parameters[i][0]) + " * 99 + 1 }}"; // https://github.com/merbanan/rtl_433/blob/93f0f30c28cfb6b82b8cc3753415b01a85bee91d/examples/rtl_433_mqtt_hass.py#L187
} else {
value_template = "{{ float(value_json." + String(parameters[i][0]) + ") * 99 + 1 | is_defined }}"; // https://github.com/merbanan/rtl_433/blob/93f0f30c28cfb6b82b8cc3753415b01a85bee91d/examples/rtl_433_mqtt_hass.py#L187
}
}
String topic = subjectRTL_433toMQTT;
# if valueAsATopic
Expand Down
7 changes: 7 additions & 0 deletions main/ZwebUI.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,13 @@ void webUIPubPrint(const char* topicori, JsonObject& data) {
}
}

float moisture = data["moisture"];
if (data.containsKey("moisture") && moisture <= 100 && moisture >= 0) {
char moist[5];
dtostrf(moisture, 3, 1, moist);
line3 += "moist: " + (String)moist + "% ";
}

line3.toCharArray(message->line3, WEBUI_TEXT_WIDTH);

// Line 4
Expand Down
2 changes: 1 addition & 1 deletion main/config_RF.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const char parameters[40][4][24] = {
{"temperature_2_C", "temperature", "°C", "temperature"},
{"temperature_F", "temperature", "°F", "temperature"},
{"time", "timestamp", "", "timestamp"},
{"battery_ok", "battery", "", "battery"},
{"battery_ok", "battery", "%", "battery"},
{"humidity", "humidity", "%", "humidity"},
{"moisture", "moisture", "%", "humidity"},
{"pressure_hPa", "pressure", "hPa", "pressure"},
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ smartrc-cc1101-driver-lib = SmartRC-CC1101-Driver-Lib@2.5.7
stl = https://github.com/mike-matera/ArduinoSTL.git#7411816
shtc3 = https://github.com/sparkfun/SparkFun_SHTC3_Arduino_Library
somfy_remote=Somfy_Remote_Lib@0.3.0
rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.2.1
rtl_433_ESP = https://github.com/NorthernMan54/rtl_433_ESP.git#v0.3.0
emodbus = miq19/eModbus@1.0.0
gfSunInverter = https://github.com/BlackSmith/GFSunInverter.git#v1.0.1
decoder = https://github.com/theengs/decoder.git
Expand Down

0 comments on commit cbbb929

Please sign in to comment.