-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_example.toml
197 lines (163 loc) · 7.78 KB
/
config_example.toml
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# All configuration options not commented out do not have a default value and
# must be provided. Commented out values show the default value.
# A temperature can be given in two formats in the config file. If a number is
# given, it is assumed to be in Celsius. If you wish to be explicit as to the
# unit, you can wrap it in a map, like so:
# { celsius = -40 }
# { fahrenheit = -40 }
[camera]
# The kind of camera being used.
# Can be one of "grideye", "mlx90640", or "mlx90641".
kind = "grideye"
# The I2C bus number the camera is connected to.
# If you're using RaspiOS, you're probably using bus 1.
bus = 1
# The I2C address of the camera.
# For GridEYEs, only 0x69 and 0x68 are valid. For Melexis cameras (MLX90640 and
# MLX90641), 0x33 is the default address, but any address is allowed as long as
# the cameras has been previously configured to use that address.
address = 0x69
# The frame rate the camera is run at.
# GridEYEs can only run at 1 or 10 FPS.
# Melexis cameras (MLX90640 and MLX90641) can run at 0.5, 1, 2, 4, 8, 16, 32, or
# 64 FPS, but higher frame rates require that the I2C bus is configured to run
# at a higher clock speed. The MLX90641 can go up to 64 FPS on a 400kHz clock
# speed, but the MLX90640 requires a 1.2MHz I2C clock to be able to go above 16
# FPS (or 32 FPS using interlaced mode. See the `mode` setting below).
# Higher frame rates generally have more noise, but there's less lag before
# detecting a person. Conversely, lower frame rates have less noise, but more
# lag.
#frame_rate = 10
# Rotate the image to match how the camera is oriented. Rotation is specified in
# degrees clockwise, and only 0, 90, 180, and 270 are accepted.
#rotation = 0
# Mirror the image horizontally.
#flip_horizontal = false
# Mirror the image vertically.
#flip_vertical = false
# (MLX90640 only)
# The MLX90640 can update its pixels in a chess-board pattern or by interlaced
# rows. The chess-board pattern is more accurate (and the default), but the
# interlaced pattern is slightly more efficient to access (and thus allows
# higher frame rates).
# The allowed values are either "chess" or "interleave" (or "interlace").
# mode = "chess"
# If set, the thermometer temperature will be rounded to the given value. For
# example, `round_temperature = 0.5` would round to the nearest half degree.
#round_temperature
[streams]
# The address to bind to for serving MJPEG streams. The default isn't very
# useful, as it is only available on the device itself. If you want the MJPEG
# stream to be available on *all* addresses, "0.0.0.0" is the value to used.
#address = "127.0.0.1"
# The port to serve the MJPEG stream from.
#port = 9000
# As a note, in TOML you can define maps in different ways. So writing:
#[streams.mjpeg]
#enable = true
# Is the same as
#[streams]
#mjpeg.enabled = true
[streams.mjpeg]
# Whether or not to enable the MJPEG stream.
# The stream is available from http://HOSTNAME:PORT/mjpeg
#enabled = true
# Limit the frame rate to the specified rate per second. This value can take
# floating point numbers, so if you want the stream to be slowed to 1 frame
# every 4 seconds, 0.25 is completely valid.
# The default is no limit.
#frame_rate_limit
[render]
# The color scheme to map temperatures to. Any gradient (in other words,
# non-sequential) name from [colorous] is valid.
# [colorous]: https://docs.rs/colorous/1.0.5/colorous/
#colors = "turbo"
# The upper limit of the scale used to map temperatures to colors. If not given,
# the limit of the scale will be dynamically chosen from the range in the
# current image.
#upper_limit = <temperature>
# The lower limit of the scale used to map temperatures to colors. If not given,
# the limit of the scale will be dynamically chosen from the range in the
# current image.
#lower_limit = <temperature>
# The size (in pixels) each pixel of the thermal image will be elarged to.
#grid_size = 50
# This is an exception to the rule on commented out values in this config file.
# The absence of this key means the temperature of each grid square will not be
# drawn. If the string "celsius" or "fahrenheit" are given, the temperature of
# each grid will be displayed in that temperature scale.
#units = "celsius"
# Select a method of upscaling the thermal image.
# The thermal cameras used with r-u-still-there have low resolutions, so they're
# enlarged for the video stream. This setting selects the resizing method.
# Nearest neighbor scaling is the simplest method that has the lowest CPU usage
# (and is the default). If you want a smoother image, "mitchell" is a decent
# option but it requires a faster CPU.
# Valid options are "nearest", "triangle" (or "linear"), "catmull_rom" (or
# "bicubic"), "mitchell", or "lanczos3" (or "lanczos3").
#scaling_method = "nearest"
[tracker]
# It is possible to modify the background model parameters, but the default
# values should work for most cases. If you think you need to modify them, you
# should investigate the source code, specifically the `GmmParameters` structure
# in the src/occupancy/gmm.rs file.
#background_model_parameters = {}
# A threshold value for the probability of a value being part of the background.
#background_confidence_threshold = 0.001
# When correlating successive frames of video, a distance measure is calculated
# between possible objects. This is the maximum distance to be considered the
# same object between two frames.
# The distance being calculated covers not only the position of the objects, but
# also their size and shape.
#maximum_mavement = 16.0
# If specified, this is a minimum value in number of pixels an object must
# exceed to be considered a person. This can be used to ignore small objects
# (like pets). If not set, there is not a minimum size and any moving object is
# considered a person.
#minimum_size =
# After not moving for this many seconds, an object is considered "not a person"
# anymore. The default is three hours.
#stationary_timeout = 10800
[mqtt]
# The name of this device for the MQTT broker. It cannot contain any of `/#+`,
# control characters, or Unicode non-characters, and must be at least one
# character long.
name = "RPi 4B Development"
# A URL for the MQTT broker. If connecting over TLS, use `mqtts` as the scheme,
# otherwise use `mqtt`. The default port for plain MQTT is 1833, and the default
# for MQTT over TLS is 8883.
# NOTE: Connecting over TLS via an IP address isn't supported yet.
# Multiple examples are shown below.
#server = "mqtts://tls.mqtt.example.com"
#server = "mqtt://with_port.mqtt.example.com:12345"
#server = "mqtt://192.0.2.1"
server = "mqtt://mqtt.example.com"
# A username to authenticate to the MQTT broker with. If you don't need a
# username for your broker, don't define one.
#username = "r-u-still-there"
# The password to connect to the MQTT broker. If you don't need a password,
# don't define one.
# You can specify the password either as a string or as an absolute path to a
# file that contains the password. Leading and trailing whitespace (including
# newlines) are trimmed from the contents of the file. Examples of both are
# given below.
#password = "hunter2"
#password = { file = "/path/to/mqtt-password" }
# The interval for sending broker keepalive messages in seconds.
# When not given, a reasonable default is chosen. Explicitly setting it to 0
# disables keepalive messages.
#keep_alive = 60
[mqtt.home_assistant]
# Enable Home Assistant MQTT discovery.
#enabled = true
# The discovery topic used for Home Assistant discovery.
# The default for r-u-still-there matches the default for Home Assistant, so
# most users do not need to set this.
#topic = "homeassistant"
# The units to use for temperatures sent to Home Assistant. Valid choices are
# "celsius" and "fahrenheit"
#unit = "celsius"
# A unique ID used to identify this device to Home Assistant (when enabled).
# This is normally automatically generated, and most users do not need to define
# it.
#unique_id =