This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
executable file
·88 lines (68 loc) · 2.4 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
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
#!/usr/bin/env python3
# ========================================================================
# config.py
#
# Description: Configuration file.
#
# Author: Jim Ing
# Date: 2020-02-24
# ========================================================================
try:
import config_local as local
profile = local.profile
except ImportError:
profile = 'test'
dataPath = './data'
logsPath = './logs'
# ------------------------------------------------------------------------
# Pi Camera
# ------------------------------------------------------------------------
cameraRotation = 0
# ------------------------------------------------------------------------
# Enviro+
# ------------------------------------------------------------------------
proximityTrigger = 100 # 0 - 2047
# ------------------------------------------------------------------------
# Sense HAT
# ------------------------------------------------------------------------
ledRotation = 90
# ------------------------------------------------------------------------
# Sense HAT and Enviro+
# ------------------------------------------------------------------------
factor = 1.95 # temperature compensation
# ------------------------------------------------------------------------
# Relay Module
# ------------------------------------------------------------------------
gpioPin = 17 # for toggle relay
hasRelay = True
# ------------------------------------------------------------------------
# Sabre Water Leak Alarm
# ------------------------------------------------------------------------
gpioPinWaterLeakAlarm = 18
hasWaterLeakAlarm = False
# ------------------------------------------------------------------------
# Microsoft IoT Central
# ------------------------------------------------------------------------
secsTooOld = 900 # 3600 = 1 hour, 1800 = 30 mins, 900 = 15 mins, 300 = 5 mins
tokenExpiry = 30 # days
gInterval = 5 # secs
iotc = {
"scope_id": "",
"devices": {
"jim": {
"device_id": "",
"device_key1": "",
"device_key2": "",
"template": "1.1.0"
}
}
}
scopeId = iotc['scope_id']
deviceId = iotc['devices'][profile]['device_id']
deviceKey = iotc['devices'][profile]['device_key1']
# ------------------------------------------------------------------------
# ipify
# ------------------------------------------------------------------------
ipify = {
"api_key": ""
}