As of writing this article this feature is only found in the dashboard-v3 branch. The default Shinobi installation location is /home/Shinobi.

Shinobi has two new sections relating to this. MQTT Inbound and MQTT Outbound. As the names imply one is for recieving MQTT events and the other is for sending them out. Here's how to use them.

Enabling MQTT in Shinobi (Inbound and Outbound)

1. To reveal the features you will need to open terminal and run these commands. In future you may not need to do some steps.

cd /home/Shinobi
npm install [email protected]
node tools/modifyConfiguration.js addToConfig='{"mqttClient":true}'
pm2 restart camera.js

2. Now that its enabled Login to Shinobi and open your Account Settings. You should now see MQTT Inbound and MQTT Outbound sections.

Setting up MQTT Inbound

1. Set the Enable toggle to Yes and click Add New.

2. Now you should see a row of fields.

  • Host : Generally this is the IP Address of your MQTT Server.
  • MQTT Subscription Key : the handler in your MQTT that you want to get triggers from.
  • Type : Select what kind of message will be coming to your Shinobi server. At the time of writing this article you can do Plain and Frigate.
    • If you choose to use Frigate you will need to set the MQTT Subscription Key to frigate/events
  • Monitors : Select which Monitors will be triggered.

Setting up MQTT Outbound

1. Set the Enable toggle to Yes and click Add New.

2. Now you should see a row of fields.

  • Host : Generally this is the IP Address of your MQTT Server.
  • MQTT Subscription Key : the handler in your MQTT that you want to send triggers to.
  • Message From : Select that will trigger on your MQTT Subscription Key.
  • Monitors : Select which Monitors will be triggered. Some actions will ignore this field because they do not apply to a Monitor directly.

Setting up the Monitor Settings for a Camera to only use MQTT Inbound events to begin recording

1. Open the Monitor Settings for a Camera. Then in the bottom right set Simple to Advanced. This will reveal some more options.

2. Scroll down to Detector Settings section.

3. Ensure that "Send Frames" in the Detector Settings is set to No (do not confuse this with "Save Frames") and "Use Built-In" within Motion Detection section is set to No.

4. Object Detection's "Enabled" set to No.

  • However if you would like to make MQTT trigger object detection you can set this to Yes and enable "Check for Motion First". This will allow the MQTT trigger to be the prelminary trigger since Motion Detection was disabled in step 3.

5. Optional : To configure the buffer record time you can change the "Buffer Time from Event" value in the Detector Settings. By default this is "5" meaning 5 seconds before the trigger. This value is in seconds.