-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathconfig_example.py
55 lines (46 loc) · 2.17 KB
/
config_example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from sys import platform
###
# Uncomment optional configurations to change their default value.
# See pysmartnode/config_base.py for more configuration options.
###
# Required custom configuration
WIFI_SSID = "SSID" # optional on esp8266 if it has been connected once
WIFI_PASSPHRASE = "PASSPHRASE" # optional on esp8266 if it has been connected once
MQTT_HOST = "BROKER-IP"
MQTT_PORT = 1883
MQTT_USER = "" # optional if no authentication needed
MQTT_PASSWORD = "" # optional if no authentication needed
###
# Optional configuration
###
# MQTT_KEEPALIVE = const(120)
# MQTT_HOME = "home"
# MQTT_AVAILABILITY_SUBTOPIC = "available" # will be generated to MQTT_HOME/<device-id>/MQTT_AVAILABILITY_SUBTOPIC
# MQTT_DISCOVERY_PREFIX = "homeassistant"
# MQTT_DISCOVERY_ENABLED = True
# MQTT_RECEIVE_CONFIG = True
###
# RECEIVE_CONFIG: Only use if you run the "SmartServer" in your environment which
# sends the configuration of a device over mqtt
# If you do not run it, you have to configure the components locally on each microcontroller
###
# WIFI_LED = None # set a pin number to have the wifi state displayed by a blinking led. Useful for devices like sonoff
# WIFI_LED_ACTIVE_HIGH = True # if led is on when output is low, change to False
# WEBREPL_ACTIVE = False # If you want to have the webrepl active. Configures and starts it automatically.
# WEBREPL_PASSWORD = "" # Be aware that webrepl needs 1.4kB of RAM! Also password can't be more than 9 characters!
RTC_TIMEZONE_OFFSET = 1 # offset from GMT timezone as ntptime on esp8266 does not support timezones
RTC_DAYLIGHT_SAVINGS = False # True will add +1 hour to timezone during summer time.
# 10min, Interval sensors send a new value if not specified by specific configuration
# INTERVAL_SEND_SENSOR = const(600)
###
# Name of the device
##
# DEVICE_NAME = None
###
# set to a unique device name otherwise the id will be used.
# This is relevant for homeassistant mqtt autodiscovery so the device gets
# recognized by its device_name instead of the id.
# It is also used with the unix port instead of the unique chip id (which is not available
# on the unix port) and it therefore has to be UNIQUE in your network or
# it will result in problems.
###