Moved config to external file
This commit is contained in:
9
src/config.py.example
Normal file
9
src/config.py.example
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Config section
|
||||||
|
# Uncomment these lines if your MQTT server requires authentication
|
||||||
|
#MQTT_USER="mqtt-user"
|
||||||
|
#MQTT_PASS="mqtt-password"
|
||||||
|
MQTT_HOST="mqtt.example.com"
|
||||||
|
MQTT_PORT=1883
|
||||||
|
MQTT_TOPIC="sensors/rtl_433"
|
||||||
|
MQTT_QOS=0
|
||||||
|
# End config section
|
||||||
@@ -8,15 +8,7 @@ import paho.mqtt.client as mqtt
|
|||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
# Config section
|
from config import *
|
||||||
# Uncomment these lines if your MQTT server requires authentication
|
|
||||||
#MQTT_USER="mqtt-user"
|
|
||||||
#MQTT_PASS="mqtt-password"
|
|
||||||
MQTT_HOST="mqtt.example.com"
|
|
||||||
MQTT_PORT=1883
|
|
||||||
MQTT_TOPIC="sensors/rtl_433"
|
|
||||||
MQTT_QOS=0
|
|
||||||
# End config section
|
|
||||||
|
|
||||||
rtl_433_cmd = "/usr/local/bin/rtl_433 -G -F json" # linux
|
rtl_433_cmd = "/usr/local/bin/rtl_433 -G -F json" # linux
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user