After a fair bit of mucking around, I got this mostly working.
The part that was a bit tricky was getting the power board management tools up.
Here’s a quick summary, but will write up a fuller guide…
- install bullseye 64bit and mediamtx
- will also need to publish a thumbnail to raspi nginx server
- set up Homeassistant with generic camera input
- make sure to enable i2c in rapi-config (off by default)
- download the vizypowerboard.py
- create new virtualenv and make sure that
smbus
and wiringpi
are installed with pip
- test from python shell
from vizypowerboard import *
power_board = VizyPowerBoard()
# test buzzer
power_board.buzzer(2000,500)
## turn on/off external IR light
power_board.vcc12(True)
power_board.vcc12(False)
# filter turn off/on
power_board.ir_filter(False)
power_board.ir_filter(True)
# set power to always on
power_board.dip_switches(DIPSWITCH_POWER_DEFAULT_ON)
So, looks good to control the power board with Bullseye. I also tried compiling some of the other libs but got stuck on kcamera. I thought I may need that but it’s not required for the power board control.
Now just a few small tweaks to do
- start mediamtx process on boot
- write some python scripts to execute from HA (e.g. switch filter on/off)
- work out why I have so much infrared spill into the camera from the front light!
- get motion going too for motion detection/automated recording