-
Notifications
You must be signed in to change notification settings - Fork 0
/
config-example.yaml
144 lines (142 loc) · 5.45 KB
/
config-example.yaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
system:
unit_system: imperial # Defaults to 'metric' if set to anything other than 'imperial'.
system_name: CobraBay1 # ID of the system. Will be used for MQTT client ID, as well as name in MQTT Topics.
mqtt:
broker: BROKER HOSTNAME OR IP
port: 1883
username: USERNAME FOR BROKER
password: PASSWORD FOR BROKER
mqtt_commands: True # Take MQTT commands to control system and bay. Probably want this one.
interface: eth0 # Interface used to uplink. Used to show status on the display. Default here is probably fine.
homeassistant: False # Integrate with Home Assistant. If yes, will send discovery messages.
# Logging definition
logging:
console: True
file: True
# Can specify the path for the log file. Will default to current system_name (specified above) in the current working
# directory. Log rotation is NOT handled natively, use something external like logrotate.
# Default level for the system. If not included, will default to WARNING.
# file_path: cwd/System_Name.log
# Major components can have logging levels set separately. These are:
# bays - All bays
# config - Configuration processor
# core - Operating core
# detectors - All detectors
# display - The display
# network - The network
# Individual bays or detectors can be included by ID under the appropriate key.
# Triggers for actions. Need to have some enabled otherwise nothing ever happens!
triggers:
# "Sensor" monitors an MQTT topic for a topic changes. Sensors are expected to be a single
# string, ie: "on"/"off" or "True"/"False"
garage_door:
topic: homeassistant/binary_sensor/door_garage/state
type: mqtt_sensor
bay: bay1
to: "on"
when_triggered: occupancy
test:
topic: CobraBay/test
type: mqtt_sensor
bay: bay1
to: "on"
when_triggered: occupancy
# entry_door:
# type: mqtt_sensor
# bay: bay1
# when_triggered: verify
# Range based triggering. If movement is detected, take an action. This requires running the range sensor continually.
# range:
# type: range
# enable: true
# detector: range
# when_triggered: occupancy
# Settings for the display. Only one is supported! If you want to build a multi-panel display, treat it as one and do it
# in hardware.
display:
matrix:
width: 64 # Columns on the Matrix
height: 32 # Rows on the Matrix
gpio_slowdown: 4 # How much to slow down the matrix to prevent flicker.
strobe_speed: 100 ms
mqtt_image: True # Should image updates be sent via MQTT
mqtt_update_interval: 5 s # How often should a new image be spent. Keeps from spamming the server.
# Define detectors. These are individual sensing units that then get assigned to a bay later.
detectors:
range: # Key here is the Bay ID, which is used elsewhere. IF you see a mention of 'bay_id', this is it.
# # Range sensors have a type of Range. Obvs.
type: Range
# # Name is used for reporting MQTT, as distinct from the key. This will be prepended with the Bay's Name and
# # appended with "Detector". So "Range" here for "Bay 1" will become "Bay 1 Range Detector"
name: Range
error_margin: "2 cm" # Amount of distance this sensor detector can vary and still be counted as 'still'
sensor:
type: TFMini
port: serial0 # System will automatically prefix /dev if not included.
baud: 115200
front:
type: Lateral
name: Front
sensor:
type: VL53L1X
i2c_bus: 1
i2c_address: 0x33
enable_board: 0x58
enable_pin: 3
distance_mode: medium
timing: 200ms
middle:
type: Lateral
name: Middle
sensor:
type: VL53L1X
i2c_bus: 1
i2c_address: 0x32
enable_board: 0x58
enable_pin: 2
distance_mode: medium
timing: 200ms
rear:
type: Lateral
name: Rear
sensor:
type: VL53L1X
i2c_bus: 1
i2c_address: 0x31
enable_board: 0x58
enable_pin: 1
distance_mode: medium
timing: 200ms
bays:
bay1:
bay_id: bay1
name: "Bay 1" # Friendly name used in MQTT messages, and used in assembly longer names.
motion_timeout: 30s # How long the range detector should find no change in distance to consider the bay motion complete.
bay_depth: 276 in
stop_point: 42 in
# The two blocks below assign detectors to the bay. Within each block, defaults apply to each detector, unless
# those settings are assigned specifically to a given detector.
longitudinal:
# Longitudinal detectors, those that run parallel to the path of vehicle travel.
defaults:
spread_park: 2 in
detectors:
- detector: range
lateral:
# Lateral detectors are those that run perpendicular to the path of vehicle's travel.
defaults:
offset: 23 in
spread_ok: 1 in
spread_warn: 3 in
side: R # Which side of the bay is the detector on. This is relative to the 'back' of the bay, IE: looking the
# same direction as the longitudinal detectors. Thus detectors marked here as being on the Right would
# be on the left of the vehicle, if one parks front-end-in.
detectors:
- detector: middle
offset: 22 in
intercept: 126 in # Each lateral detector must have an intercept. This is the distance from the longitudinal
# detectors where this lateral detector crosses the bay.
- detector: front
intercept: 77.5 in
- detector: rear
intercept: 215 in