37 lines
758 B
Python
37 lines
758 B
Python
#!/usr/bin/env python
|
|
# -*- coding: UTF-8 -*-
|
|
import os
|
|
import report
|
|
|
|
__BASEPATH__ = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
MQTT_SERVER = "<mqtt_smarthome_hostname>"
|
|
MQTT_USER = "<mqtt_smarthome_username>"
|
|
MQTT_PASS = "<mqtt_smarthome_password>"
|
|
MQTT_TOPIC = "<mqtt_ambient_info_topic>"
|
|
|
|
DAT_PATH_DHT = None # os.path.join(__BASEPATH__, 'dat', 'dht')
|
|
DAT_PATH_BMP = None # os.path.join(__BASEPATH__, 'dat', 'bmp')
|
|
|
|
try:
|
|
import board
|
|
except ImportError:
|
|
DHT_22_PORT = 4
|
|
USE_PULSE_IO = True
|
|
else:
|
|
# DHT-PORT
|
|
DHT_22_PORT = board.D4
|
|
|
|
|
|
#
|
|
# Logging
|
|
#
|
|
APP_NAME = "ambient_info"
|
|
LOGTARGET = 'stdout' # possible choices are: 'logfile' or 'stdout'
|
|
LOGLVL = 'DEBUG'
|
|
|
|
LOGHOST = 'cutelog'
|
|
LOGPORT = 19996
|
|
|
|
formatter = report.SHORT_FMT
|