Home automation updates
A quite long time have passed since I have updated my blog but now it’s time. Since the last post I have added more things to my HA, the latest and largest part is a Frigate server, a bunch (two installed and a third planned) of surveillance cameras and a Google Coral USB dongle for object detection. Frigate is a simple system to setup and it’s easy to integrate with HA with their HA plugin, the HA plugin can be found here: https://github.com/blakeblackshear/frigate-hass-integration
Frigate configuration
Here is how my Frigate configuration looks like:
mqtt:
host: <ip address>
port: 1883
topic_prefix: frigate
client_id: frigate
ffmpeg:
hwaccel_args:
- '-hwaccel'
- vaapi
- -hwaccel_device
- /dev/dri/renderD128
- -hwaccel_output_format
- yuv420p
input_args:
- -avoid_negative_ts
- make_zero
- -fflags
- nobuffer
- -flags
- low_delay
- -strict
- experimental
- -fflags
- +genpts+discardcorrupt
- -use_wallclock_as_timestamps
- "1"
output_args:
detect: -f rawvideo -pix_fmt yuv420p
record: -f segment -segment_time 60 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
clips: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
rtmp: -c copy -f flv
cameras:
carport:
ffmpeg:
inputs:
- path: rtsp://<user>:<password>@<ip address>/stream1
roles:
- detect
- clips
- rtmp
width: 1920
height: 1080
fps: 5
clips:
enabled: True
pre_capture: 5
post_capture: 5
objects:
- person
retain:
default: 10
objects:
person: 15
rtmp:
enabled: True
snapshots:
enabled: True
timestamp: False
bounding_box: False
crop: False
height: 480
retain:
default: 10
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 270
objects:
track:
- person
- car
- cat
- dog
- bird
baksida:
ffmpeg:
inputs:
- path: rtsp://<user>:<password>@<ip address>/stream1
roles:
- detect
- clips
- rtmp
width: 1920
height: 1080
fps: 5
clips:
enabled: True
pre_capture: 5
post_capture: 5
objects:
- person
retain:
default: 10
objects:
person: 15
rtmp:
enabled: True
snapshots:
enabled: True
timestamp: False
bounding_box: False
crop: False
height: 480
retain:
default: 10
objects:
person: 15
mqtt:
enabled: True
timestamp: True
bounding_box: True
crop: True
height: 270
objects:
track:
- person
- cat
- dog
- bird
detectors:
coral:
type: edgetpu
device: usb
Home Assistant updates
With this Frigate update I toked the opportunity to HA to the latest version which caused some issues with the modbus integration with my Heru ventilation system. The configuration syntax for modbus have been altered a bit so I post my new updated configuration for reference:
modbus:
type: tcp
host: aaa.bbb.ccc.ddd
port: 502
timeout: 2
fans:
- name: Ventilation Overpressure
scan_interval: 10
address: 1
write_type: coil
verify:
- name: Ventilation Boost
scan_interval: 10
address: 2
write_type: coil
verify:
- name: Ventilation Away
scan_interval: 10
address: 3
write_type: coil
verify:
sensors:
- name: Ventilation Outdoors
scan_interval: 60
unit_of_measurement: °C
slave: 1
address: 1
input_type: input
count: 1
scale: 1
offset: 0
precision: 0
data_type: int16
- name: Ventilation Supply air
scan_interval: 60
unit_of_measurement: °C
slave: 1
address: 2
input_type: input
count: 1
scale: 1
offset: 0
precision: 0
data_type: int16
- name: Ventilation Exhaust air house
scan_interval: 60
unit_of_measurement: °C
slave: 1
address: 3
input_type: input
count: 1
scale: 1
offset: 0
precision: 0
data_type: int16
- name: Ventilation Exhaust air out
scan_interval: 60
unit_of_measurement: °C
slave: 1
address: 4
input_type: input
count: 1
scale: 1
offset: 0
precision: 0
data_type: int16
- name: Ventilation Rotor
scan_interval: 60
unit_of_measurement: °C
slave: 1
address: 6
input_type: input
count: 1
scale: 1
offset: 0
precision: 0
data_type: int16