Skip to content

thallaa/motion-temperature

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

motion-temperature

A simple Python script which subscribes to two separate MQTT topics and updates Motion video overlay texts when a message is received. This is written for a setup with four cameras, three of which are pointing outside of the house and one is in garage. If you have different amount of temperature data sources, you can easily either add more mqtt client instances or comment out the other one if you only need one.

Requirements

  • Python 3 installed
  • python3-urllib3
  • python3-paho-mqtt

How to set up

This is supposed to be set up in your motionEye host. There are few things you should configure before doing rest of the steps.

  • The mqtt broker address
  • Camera configuration file paths according to your setup
  • The mqtt topics where temperature values are posted (my setup posts just the temperature values as floats)
  • Change on_outdoortemp_message and on_garagetemp_message to update the correct cameras

Then you can install the script.

Create directory

sudo mkdir /opt/motion-temperature

Copy script

sudo cp motion-temperature.py /opt/motion-temperature

Set permissions

sudo chmod -R 755 /opt/motion-temperature

Copy systemd script

sudo cp motion-temperature.service /etc/systemd/system/

Enable service

sudo systemctl enable motion-temperature.service

Start

sudo systemctl start motion-temperature

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages