-
Notifications
You must be signed in to change notification settings - Fork 56
/
config.py
62 lines (44 loc) · 1.65 KB
/
config.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
56
57
58
59
60
61
62
# Access point WiFi name (SSID)
AP_SSID = 'ExoSensePy'
# Access point WiFi password
AP_PASSWORD = 'exosense'
# Access point WiFi channel
AP_CHANNEL = 7
# Duration of access point mode, is seconds.
# Values below 120 (2 mins) are ignored.
AP_ON_TIME_SEC = 600
# Time (seconds) after power-on after which access point mode is enabled
# if the module is configured and no Modbus RTU request is received or
# if cannot connect to WiFi (Modbus TCP).
# Set to 0 to disable access point mode.
AP_ON_TIMEOUT_SEC = 300
# Web server credentials
WEB_USER = 'exo'
WEB_PASSWORD = 'sense'
# FTP server credentials
FTP_USER = 'exo' # Set to '' to disable FTP server
FTP_PASSWORD = 'sense'
# LED status when working normally
HEARTBEAT_LED = False # LED off
# HEARTBEAT_LED = True # LED short blue blink on every Modbus request
# Temperature offset (°C)
TEMP_OFFSET = 0
# Elevation from sea level in meters, for atmospheric pressure calculation
ELEVATION = 103
# Modbus RTU parameters
MB_RTU_ADDRESS = 0 # Set to 0 to disable
MB_RTU_BAUDRATE = 19200
MB_RTU_DATA_BITS = 8
MB_RTU_STOP_BITS = 1
MB_RTU_PARITY = 1 # 1 = even, 2 = odd, 3 = none
# Modbus TCP parameters
MB_TCP_IP = '' # Modbus TCP disabled
#MB_TCP_IP = 'dhcp' # Use DHCP to obtain IP address
#MB_TCP_IP = '192.168.1.100' # Static IP address
MB_TCP_MASK = '255.255.255.0' # Network mask
MB_TCP_GW = '192.168.1.1' # Gateway IP address
MB_TCP_DNS = '192.168.1.1' # DNS IP address
MB_TCP_PORT = 502 # Port for Modbus TCP requests
MB_TCP_WIFI_SSID = 'MyWiFi' # SSID of the WiFi network to connect to
MB_TCP_WIFI_PWD = 's3cretP4ssw0rd' # WiFi password
MB_TCP_WIFI_SEC = 3 # WiFi security: 0 = Open, 1 = WEP, 2 = WPA, 3 = WPA2