flosch-dev / motion2mqtt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

motion2mqtt

simple python3 script to send motion detect via MQTT python3 module required:

# apt install python3-gpiozero
# apt install python3-paho-mqtt

run: ./motion2mqtt <RPI_GPI> <Sensor#> i.e.

# ./motion2mqtt 27 Sensor1

in order to use with systemd, place motion2mqtt_1.service into /etc/systemd/system/

# mv motion2mqtt_1.service /etc/systemd/system/
# systemctl daemon-reload
# systemctl start motion2mqtt_1.service
# systemctl enable motion2mqtt_1.service

About

License:The Unlicense


Languages

Language:Python 100.0%