Skip to content

Instantly share code, notes, and snippets.

View Teagan42's full-sized avatar

Teagan Glenn Teagan42

View GitHub Profile
@Teagan42
Teagan42 / example.yaml
Last active April 12, 2020 12:13
A custom camera component that allows you to see the detected regions from the OpenCV image processor in Home-Assistant. Add this to your configuration directory: {CONFIG_DIRECTORY}/custom_components/opencv.py
camera:
- platform: opencv
camera: camera.front_door
processor: image_processing.front_door_opencv_faces
# Optional Parameters
name: OpenCV Camera
@Teagan42
Teagan42 / opencv.py
Created May 2, 2017 03:07
OpenCV camera
"""
Component that performs OpenCV classification on images.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/camera.opencv/
"""
import asyncio
import logging
from homeassistant.core import split_entity_id

Controller Limitations:

  • Console.log is unusuable in controller
  • Cannot throw errors explicitly
  • Controller can only contain methods, no constants (not sure about helper)

Component Limitations:

  • Cannot utilize javascript callouts
  • Cannot retrieve element from events, i.e. click a link
find $HOME/.steam/root/ubuntu12_32/steam-runtime/*/usr/lib/ -name "libstdc++.so.6" -exec mv "{}" "{}.bak" \; -print
# Install Dependencies
sudo apt-get update
sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev \
libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev \
libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
mkdir /tmp/ffmpeg_sources
# YASM
sudo apt-get -y --force-yes install yasm