Documentation ¶
Overview ¶
Package cameraapp demonstrates an app that can send images from a connected webcam to Home Assistant. It exposes the camera entity (through which images are published) as well as start and stop button entities for starting/stopping the camera respectively.
It uses the excellent github.com/vladimirvivien/go4vl package for camera access.
Unfortunately, this example app only runs on Linux.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupportedOS = errors.New("example camera app only runs on Linux")
Functions ¶
This section is empty.
Types ¶
type CameraApp ¶
type CameraApp struct {
// contains filtered or unexported fields
}
CameraApp is our struct that represents an app to Go Hass Anything.
func New ¶
New sets up our example app. It creates entities for the camera images and start and stop buttons.
func (*CameraApp) Configuration ¶
func (*CameraApp) States ¶
States is unused in this example app. This could be used to take an image snapshot via the webcam or expose other camera information as entities...
func (*CameraApp) Subscriptions ¶
func (a *CameraApp) Subscriptions() []*mqttapi.Subscription