-
Notifications
You must be signed in to change notification settings - Fork 1
/
leviot_conf.py.template
96 lines (77 loc) · 2.5 KB
/
leviot_conf.py.template
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
from binascii import hexlify
from machine import unique_id
from micropython import const
## Wi-Fi configuration
# Wi-Fi mode: sta (client) or ap (access-point)
wifi_mode = "ap"
# Device hostname
hostname = "LevIoT"
# Wi-Fi name and password
wifi_ssid = "LevIoT"
wifi_key = "veryl33t"
# Wi-Fi parameters for AP mode - ignored in sta mode
# Authentication mode
# - open (DON'T)
# - wep (DON'T)
# - wpa_psk (avoid)
# - wpa2_psk
# - wpa_wpa2_psk (best compromise, avoid if possible)
wifi_authmode = "wpa2_psk"
# Wi-Fi powersave - listen_interval
# See this for details:
# https://github.com/micropython/micropython/blob/6896bc37c3431ec472d32b6c8e081d52c1c6de6d/docs/library/esp32-lowpower.rst
# If set to -1, the radio will always be active
# If set to x > 0, the radio will turn off and wait x beacons before waking up again. Avg delay x * 100 ms
# If set to 0, it will use the access point DTIM value as listen interval
wifi_listen_interval = 0
## Server configuration
http_listen = "0.0.0.0"
http_port = 80
http_basic_auth = "user:pass" # None to disable
# MQTT configuration
mqtt_enabled = False
mqtt_config = {
'client_id': b"leviot_" + hexlify(unique_id()),
'server': None,
'port': 0,
'user': '',
'password': '',
'keepalive': 60,
'ping_interval': 0,
'ssl': False,
'ssl_params': {},
'response_time': 10,
'clean_init': True,
'clean': True,
'max_repubs': 4,
}
# Topic prefix prepended to all topics
mqtt_prefix = "leviot"
# Topic identifier for this device
# Must comply with the homie topic id specification: https://homieiot.github.io/specification/#topic-ids
mqtt_identifier = "air-purifier"
# Friendly device name for Homie
homie_friendly_name = "Levoit Air Purifier"
# Enable Homie autodiscovery protocol.
# Status topic will still follow the Homie specification even if disabled.
homie_autodiscovery = True
## Firewall configuration
# Only allow HTTP connections from private IP addresses
private_nets_only = True
## CPU frequency "scaling"
cpu_freq_perf = 240000000
cpu_freq_idle = 80000000
## Autoboot - set to False to prevent loading LevIoT on startup
autoboot = True
## Touchpad sensitivity configuration
touchpads_sensitivity = {
"FILTER": 0.05161943319838057,
"POWER": 0.05604203152364273,
"LOCK": 0.046486486486486484,
"FAN": 0.0511482254697286,
"TIMER": 0.055322715842414084,
"LIGHT": 0.04321728691476591,
"NIGHT": 0.04085603112840467,
}
## SysLog remote server address - set to None to prevent SysLog server configuration
syslog = 'syslog.local'