rtlamr fix for missing msg type id
This commit is contained in:
+3
-3
@@ -33,15 +33,15 @@ The `mqtt_password` option defines the password for the MQTT server
|
|||||||
|
|
||||||
### Option: `msg_type`
|
### Option: `msg_type`
|
||||||
|
|
||||||
The `msg_type` option defines the comma-separated list of message types to receive all, scm, scm+, idm, netidm, r900 and r900bcd
|
The `msg_type` option defines the comma-separated list of message types to be processed: all, scm, scm+, idm, netidm, r900 and r900bcd
|
||||||
|
|
||||||
Default value: all
|
If a value is not provided, all message types will be processed
|
||||||
|
|
||||||
### Option: `meter_ids`
|
### Option: `meter_ids`
|
||||||
|
|
||||||
The `meter_ids` option defines the comma-separated list of meter ids to be processed
|
The `meter_ids` option defines the comma-separated list of meter ids to be processed
|
||||||
|
|
||||||
If missing or empty, all found meters will be processed
|
If a value is not provided, all found meters will be processed
|
||||||
|
|
||||||
## MQTT Data
|
## MQTT Data
|
||||||
|
|
||||||
|
|||||||
+3
-4
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "RTLAMR to MQTT Bridge",
|
"name": "RTLAMR to MQTT Bridge",
|
||||||
"version": "0.1.12",
|
"version": "0.1.13",
|
||||||
"slug": "rtlamr",
|
"slug": "rtlamr",
|
||||||
"description": "RF to MQTT Bridge based on RTL_SDR/RTL_433 for RTL2832U based DVB-T USB tuners",
|
"description": "RF to MQTT Bridge based on RTL_SDR/RTL_433 for RTL2832U based DVB-T USB tuners",
|
||||||
"url": "https://github.com/bvlaicu/home-assistant-addons/tree/master/rtlamr",
|
"url": "https://github.com/bvlaicu/home-assistant-addons/tree/master/rtlamr",
|
||||||
@@ -25,15 +25,14 @@
|
|||||||
{
|
{
|
||||||
"mqtt_host": "hassio.local",
|
"mqtt_host": "hassio.local",
|
||||||
"mqtt_user": "",
|
"mqtt_user": "",
|
||||||
"mqtt_password": "",
|
"mqtt_password": ""
|
||||||
"msg_type": "all"
|
|
||||||
},
|
},
|
||||||
"schema":
|
"schema":
|
||||||
{
|
{
|
||||||
"mqtt_host": "str",
|
"mqtt_host": "str",
|
||||||
"mqtt_user": "str",
|
"mqtt_user": "str",
|
||||||
"mqtt_password": "str",
|
"mqtt_password": "str",
|
||||||
"msg_type": "str",
|
"msg_type": "str?",
|
||||||
"meter_ids":"str?"
|
"meter_ids":"str?"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -11,7 +11,7 @@ CONFIG_PATH=/data/options.json
|
|||||||
MQTT_HOST="$(jq --raw-output '.mqtt_host' $CONFIG_PATH)"
|
MQTT_HOST="$(jq --raw-output '.mqtt_host' $CONFIG_PATH)"
|
||||||
MQTT_USER="$(jq --raw-output '.mqtt_user' $CONFIG_PATH)"
|
MQTT_USER="$(jq --raw-output '.mqtt_user' $CONFIG_PATH)"
|
||||||
MQTT_PASS="$(jq --raw-output '.mqtt_password' $CONFIG_PATH)"
|
MQTT_PASS="$(jq --raw-output '.mqtt_password' $CONFIG_PATH)"
|
||||||
MSG_TYPE="$(jq --raw-output '.msg_type' $CONFIG_PATH)"
|
MSG_TYPE="$(jq --raw-output '.msg_type // empty' $CONFIG_PATH)"
|
||||||
METER_IDS="$(jq --raw-output '.meter_ids // empty' $CONFIG_PATH)"
|
METER_IDS="$(jq --raw-output '.meter_ids // empty' $CONFIG_PATH)"
|
||||||
|
|
||||||
|
|
||||||
@@ -37,6 +37,9 @@ LASTVAL="0"
|
|||||||
|
|
||||||
#tail -f /dev/null
|
#tail -f /dev/null
|
||||||
|
|
||||||
|
if [ -z ${MSG_TYPE+x} ] || [${MSG_TYPE} = ""]; then
|
||||||
|
MSG_TYPE="all"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z ${METER_IDS+x} ] || [${METER_IDS} = ""]; then
|
if [ -z ${METER_IDS+x} ] || [${METER_IDS} = ""]; then
|
||||||
ID_FILTER_OPTION=""
|
ID_FILTER_OPTION=""
|
||||||
|
|||||||
Reference in New Issue
Block a user