Add RTL_433 discovery with Home Assistant convention inspired from rtl_433_mqtt_hass.py (#1379)

This also changes the topic structure when using the macro valueAsATopic=true, it adds as sub-topics the `type, subtype, and channel` when they exist.
The id is the last subtopic to facilitate filtering, as it may change when replacing the batteries.

Co-authored-by: NorthernMan54 <19808920+NorthernMan54@users.noreply.github.com>
This commit is contained in:
FlorianandNorthernMan54 authored and GitHub committed 2023-01-07 20:34:43 -06:00
1 parent ba70d364b1
commit 16815f51da
9 files changed
+389 -103

No files matched your search

+17 -17
View File
@@ -797,30 +797,30 @@ lib_deps =
build_flags =
${com-esp.build_flags}
; *** OpenMQTTGateway Config ***
'-UZmqttDiscovery' ; disables MQTT Discovery
'-DvalueAsATopic=true' ; MQTT topic includes model and device
;'-UZmqttDiscovery' ; disables MQTT Discovery
'-DvalueAsATopic=true' ; MQTT topic includes model and device
'-DLOG_LEVEL=LOG_LEVEL_TRACE'
'-DGateway_Name="OpenMQTTGateway_rtl_433_ESP"'
; *** OpenMQTTGateway Modules ***
'-DZgatewayRTL_433="rtl_433"'
'-DZradioCC1101="CC1101"'
; *** rtl_433_ESP Options ***
; '-DRTL_DEBUG=4' ; rtl_433 verbose mode
; '-DRTL_DEBUG=4' ; rtl_433 verbose mode
; '-DRTL_VERBOSE=58' ; LaCrosse TX141-Bv2, TX141TH-Bv2, TX141-Bv3, TX141W, TX145wsdth sensor
; '-DRAW_SIGNAL_DEBUG=true' ; display raw received messages
; '-DMEMORY_DEBUG=true' ; display memory usage information
'-DDEMOD_DEBUG=true' ; display signal debug info
; '-DMY_DEVICES=true' ; subset of devices
'-DPUBLISH_UNPARSED=true' ; publish unparsed signal details
; '-DRSSI_THRESHOLD=12' ; Apply a delta of 12 to average RSSI level
; '-DAVERAGE_RSSI=5000' ; Display RSSI floor ( Average of 5000 samples )
'-DSIGNAL_RSSI=true' ; Display during signal receive
; '-DMEMORY_DEBUG=true' ; display memory usage information
'-DDEMOD_DEBUG=true' ; display signal debug info
; '-DMY_DEVICES=true' ; subset of devices
'-DPUBLISH_UNPARSED=true' ; publish unparsed signal details
; '-DRSSI_THRESHOLD=12' ; Apply a delta of 12 to average RSSI level
; '-DAVERAGE_RSSI=5000' ; Display RSSI floor ( Average of 5000 samples )
'-DSIGNAL_RSSI=true' ; Display during signal receive
'-DNO_DEAF_WORKAROUND=true'
; *** RF Module Options ***
'-DRF_CC1101="CC1101"' ; CC1101 Transceiver Module
; '-DRF_MODULE_CS=5' ; pin to be used as chip select
'-DRF_MODULE_GDO0=12' ; CC1101 pin GDO0
'-DRF_MODULE_GDO2=27' ; CC1101 pin GDO2
'-DRF_CC1101="CC1101"' ; CC1101 Transceiver Module
; '-DRF_MODULE_CS=5' ; pin to be used as chip select
'-DRF_MODULE_GDO0=12' ; CC1101 pin GDO0
'-DRF_MODULE_GDO2=27' ; CC1101 pin GDO2
; *** RadioLib Options ***
; '-DRADIOLIB_DEBUG=true'
; '-DRADIOLIB_VERBOSE=true'
@@ -837,8 +837,8 @@ lib_deps =
build_flags =
${com-esp.build_flags}
; *** OpenMQTTGateway Config ***
'-UZmqttDiscovery' ; disables MQTT Discovery
'-DvalueAsATopic=true' ; MQTT topic includes model and device
;'-UZmqttDiscovery' ; disables MQTT Discovery
'-DvalueAsATopic=true' ; MQTT topic includes model and device
'-DGateway_Name="OpenMQTTGateway_heltec_rtl_433_ESP"'
; *** OpenMQTTGateway Modules ***
'-DZgatewayRTL_433="rtl_433"'
@@ -860,7 +860,7 @@ lib_deps =
build_flags =
${com-esp.build_flags}
; *** OpenMQTTGateway Config ***
'-UZmqttDiscovery' ; disables MQTT Discovery
;'-UZmqttDiscovery' ; disables MQTT Discovery
'-DvalueAsATopic=true' ; MQTT topic includes model and device
'-DGateway_Name="OpenMQTTGateway_lilygo_rtl_433_ESP"'
; *** OpenMQTTGateway Modules ***