manzari / message-hass-motioneyeos

Alert homeassistant via MQTT
2 stars 1 forks source link
golang motioneyeos mqtt

Motioneye Homeassistant MQTT Sensor

A simple script to update motion state in Homeassistant via MQTT

Its meant to be used by motioneye

Install

Install on a Raspberry Pi running motioneyeos

Pre build binary

curl https://github.com/manzari/message-hass-motioneyeos/releases/latest/download/message-hass --output /data/message-hass \
    && chmod +x /data/message-hass

Build from source

env GOOS=linux GOARCH=arm GOARM=5 \
go build -o ./build/message-hass

Configure

Config File

Edit the file /data/etc/hass.json to suit your needs

{
  "Host": "192.168.178.33:1883",
  "User": "user",
  "Pass": "70p53cr37",
  "Dump": false,
  "Retain": false,
  "BaseTopic": "homeassistant",
  "Cameras": [
    {
      "DeviceName": "entrance_camera_motion",
      "DeiceFriendlyName": "Entrance Motion",
      "DeviceClass": "motion"
    }
  ],
  "AutoConfig": true
}

MotionEye UI

For additional cameras