Skip to content
VanadiumJade edited this page Jan 15, 2019 · 7 revisions

Welcome to the UnifiMQTTclient wiki!

This is my first published project, this took me a few hours to get working. I dont normally use python as a language so it probably looks like it was written by a toddler. There is quite a bit of room for improvement. But its functional.

File locations:

  • /usr/sbin/UnifiCamera.json
  • /usr/sbin/UnifiVideo.py
  • /usr/sbin/UnifiVideo.sh

configure:

  • edit py file (only config in this file is location of config file)
  • edit json file (get cameraID from unifi - I got mine from RTSP stream url)
  • run py file manually first and make sure it works - it will keep repeating "starting" if there is any failure
  • "sudo chmod u+x /usr/sbin/UnifiVideo.sh"
  • after its working as expected then add: "@reboot /usr/sbin/UnifiVideo.sh" to "sudo cronjob -e"

json file:

  • json file structured so one single mqtt message can update multiple cameras.
  • I use this to add temperature to my unifi camera feeds, I have one outside sensor and temp details are applied to all outside cameras.

anyways - have a burn if its tickles your fancy - let me know if you have any issues.

future changes:

  • multiple MQTT messages on to one feed. ( will need to configure message template, will need to store previous message )
  • MQTT messages to change camera configuration - turn on motion, continuous record, stream only.
Clone this wiki locally