Git Product home page Git Product logo

starkzarn / amcrest2mqtt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drjeff/amcrest2mqtt

3.0 0.0 0.0 38 KB

A simple app to expose all events generated by an Amcrest device to MQTT using the python-amcrest library.

Home Page: https://github.com/StarkZarn/amcrest2mqtt

License: GNU Affero General Public License v3.0

Dockerfile 4.44% Python 95.56%
amcrest home-assistant mqtt python

amcrest2mqtt's Introduction

amcrest2mqtt

A simple app to expose all events generated by an Amcrest device to MQTT using the python-amcrest library.

It supports the following environment variables:

  • AMCREST_HOST (required)
  • AMCREST_PORT (optional, default = 80)
  • AMCREST_USERNAME (optional, default = admin)
  • AMCREST_PASSWORD (required)
  • MQTT_USERNAME (required)
  • MQTT_PASSWORD (optional, default = empty password)
  • MQTT_HOST (optional, default = 'localhost')
  • MQTT_QOS (optional, default = 0)
  • MQTT_PORT (optional, default = 1883)
  • HOME_ASSISTANT (optional, default = false)
  • HOME_ASSISTANT_PREFIX (optional, default = 'homeassistant')

It exposes events to the amcrest2mqtt/[SERIAL_NUMBER]/event MQTT topic. If the device is an AD110 or AD410 doorbell it will expose the doorbell status to amcrest2mqtt/[SERIAL_NUMBER]/doorbell. If the device supports motion events it will expose motion events to amcrest2mqtt/[SERIAL_NUMBER]/motion.

Device Support

The app supports events for any Amcrest device supported by python-amcrest.

Home Assistant

The app has built-in support for Home Assistant discovery. Set the HOME_ASSISTANT environment variable to true to enable support. If you are using a different MQTT prefix to the default, you will need to set the HOME_ASSISTANT_PREFIX environment variable.

Running the app

The easiest way to run the app is via Docker Compose, e.g.

version: "3"
services:
  amcrest2mqtt:
    container_name: amcrest2mqtt
    image: ghcr.io/starkzarn/amcrest2mqtt:latest
    restart: unless-stopped
    environment:
      AMCREST_HOST: 192.168.0.1
      AMCREST_PASSWORD: password
      MQTT_HOST: 192.168.0.2
      MQTT_USERNAME: admin
      MQTT_PASSWORD: password
      HOME_ASSISTANT: "true"

Out of Scope

Multiple Devices

The app will not support multiple devices. You can run multiple instances of the app if you need to expose events for multiple devies.

Non-Docker Environments

Docker is the only supported way of deploying the application. The app should run directly via Python but this is not supported.

amcrest2mqtt's People

Contributors

dchesterton avatar dependabot[bot] avatar starkzarn avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.