Based on the MAC addresses registered at your Fritz!Box, this library will start or stop Motion, on your MotionEye system.
- The powerup/shutdown is the entire Motion/MotionEye services, not just pausing Motion
Python3.
git clone this repository to your folder of likings.
sudo pip3 install -r requirements.txt
Ensure the file fbhomerecognition.py
is executable:
chmod +x fbhomerecognition.py
Run manually with ./fbhomerecognition.py
If you can, run it via /etc/init.d
or some other automated start-up script.
/path/to/fbhomerecognition.pi
in your start-up script
Or, add it to your start-up scripts.
See the .service
file. Adjust the variables to what you need, and copy it to
/etc/systemd/system/fritzmotionhome.service
Then run the following:
sudo systemctl daemon-reload
sudo systemctl enable fritzmotionhome
sudo systemctl start fritzmotionhome
Copy example.env
to .env
, and adjust the settings as needed.
Either configured in your .env
, or in a separate devices.json
file
in json format:
[
"00:00:00:00:00",
"11:11:11:11:11"
]
To enable MQTT reporting, add the information to your .env
file, like so:
mqtt='123.123.123'
mqtt_topic='mytopic/name/here'
Replace the values of mqtt with the IP of your MQTT host, and the topic with what you want the topic to be.
Should work. Logs are in /var/log/fbhome.log
To get an output while working in the console,
set the environment in your .env
to "dev"
Copy the file fbhome
to /etc/logrotate.d/fbhome
Test with the following command:
sudo logrotate -d /etc/logrotate.d/fbhome
WTFPL
You rock!
/( ,,,,, )\
_\,;;;;;;;,/_
.-"; ;;;;;;;;; ;"-.
'.__/`_ / \ _`\__.'
| (')| |(') |
| .--' '--. |
|/ o o \|
| |
/ \ _..=.._ / \
/:. '._____.' \
;::' / \ .;
| _|_ _|_ ::|
.-| '==o==' '|-.
/ | . / \ | \
| | ::| | | .|
| ( ') (. )::|
|: | |; U U ;|:: | `|
|' | | \ U U / |' | |
##V| |_/`"""`\_| |V##
##V## ##V##