Nest RTSP Documentation

MQTT

Since v1.1

MQTT allows you to automate Nest RTSP and build automations based on events which occur in Nest RTSP. In order to use the MQTT integration, you must have an MQTT Broker like Mosquitto.

Connecting to the MQTT Broker

In the top right corner of the GUI, you now have the button. Clicking on this button will open the following menu:

In the form, enter your MQTT broker connection details. Turning on the

switch will automatically start the connection to the MQTT broker when the Nest RTSP application is started (if it is shutdown). Once you have saved and enabled your connection details, you will see the enable. Press it to initialize the connection to the MQTT broker. Once connected, the MQTT Menu button will change to , and the menu will look as follows:

You may restart the connection by using the button. In order to disconnect, press the button. You will not be able to make changes to the MQTT connection while the connection is connected / running.

MQTT Events

Nest RTSP uses the nest-rtsp/ namespace to both broadcast and listen to topics.

The feed-status Topic

This event is triggered whenever the feed status of a feed changes. The nest-rtsp/feed-status topic has a JSON payload with the following properties:

Property Description
from Describes which Nest RTSP instance broadcasted the event
event Describes which event Nest RTSP broadcast
args An array of information related to the event
args[0].feed The Google SDM Device Identifier
args[0].path The path that Nest RTSP is to publish the feed
args[0].status The New Status of the Feed
{ "from": "nest-rtsp_zit9GdgWe", "event": "feed-status", "args": [ { "feed": "enterprises/********/devices/********", "path": "/example", "status": "PID 563884" } ] }
Example Payload

MQTT Commands

Nest RTSP listens for the following command topics:

Command Topic Payload Properties Example Payload
Start streams for all devices nest-rtsp/start/all
nest-rtsp/start/all
Topic
{}
Payload
Start streams for a specific devices nest-rtsp/start The payload must have one of the following properties:
  • path The RTSP Path of the camera which you want to start
  • id The device ID of the camera which you want to start
nest-rtsp/start
Topic
{"path":"/example"}
Payload by Path
{"id":"enterprises/********/devices/********"}
Payload by ID
Stop streams for all devices nest-rtsp/stop/all
nest-rtsp/stop/all
Topic
{}
Payload
Stop streams for a specific devices nest-rtsp/stop The payload must have one of the following properties:
  • path The RTSP Path of the camera which you want to stop
  • id The device ID of the camera which you want to stop
nest-rtsp/stop
Topic
{"path":"/example"}
Payload by Path
{"id":"enterprises/********/devices/********"}
Payload by ID