The MQTT Interface

All camera functions of your INSTAR Full HD camera can be controlled through the HTTPS CGI interface. This is the interface that is used by the webUI and all INSTAR smartphone and desktop apps. But in the Smarthome and Internet-of-Things (IoT) realm there is another protocol that is widely in use and that offers a few advantages over the classic HTTP - this protocol is called MQTT (Message Queuing Telemetry Transport). Adding an MQTT interface * to our Full HD cameras makes adding those cameras to an existing Smarthome - almost - too easy :)

INSTAR MQTT Server für INSTAR Full HD Kameramodelle

In MQTT you control your camera by publishing updates to MQTT Topics. The value you want to update such a topic to is formatted in JSON and added to the Message Payload. So instead of sending a CGI command like param.cgi?cmd=setmdattr&-name=1&-enable=${"{val}"} to either activate (val=1) or deactivate (val=0) Motion Detection Area 1 you publish this update to the topic alarm/area1/enable formatted like {"{val:1}"} or {"{val:0}"}.

Addressing the right Camera

To make sure that this update is received by the correct device on your MQTT network, we first have to prefix the topic with instar - this makes sure that your camera will try to match the update to an internal function - like updating the state of an detection area. Secondly, we have to state what camera we want to address by either saying all to update all INSTAR cameras on your network or picking a specific one by it"s MAC address, e.g. 000389888811. You can find the MAC address of your camera under System/Overview - simply remove the colons, e.g. 00:03:89:88:88:11.

INSTAR MQTT Server für INSTAR Full HD Kameramodelle

If you want to address the camera that is running your MQTT broker, you can also use the prefix local instead. The complete topic will then look like this:

  • instar/all/alarm/area1/enable /* - to address all INSTAR Full HD cameras on your MQTT network (all have to be connected to the same MQTT broker).
  • instar/000389888811/alarm/area1/enable - to address a camera with the (LAN) MAC address 00:03:89:88:88:11.
  • instar/local/alarm/area1/enable /* - to address the cameras that runs the MQTT broker on your network.

/* An example for the use of the ALL Topic and LOCAL Topic can be found in our - MQTT Guide for Node-RED

You can find the allowed payloads for each MQTT topic in the table below. The second table below that displays the corresponding CGI command to each topic (if you are already familiar with the HTTP API and are looking for a specific command).

Status, Command or Raw Topics

Once you update a COMMAND Topic like instar/000389888811/alarm/area1/enable you will see that you receive an update on the STATUS Topic instar/000389888811/status/alarm/area1/enable once you camera received the command and updated its settings.

INSTAR MQTT Server für INSTAR Full HD Kameramodelle

If your application doesn"t support sending command payloads in the JSON format, you can use the RAW Topic by adding raw to the end of the topic and use the value as a string directly:

  • instar/000389888811/alarm/area1/enable/raw - the message payload here is simply either 1 or 0 instead of {val:1} or {val:0}.
Mike Polinowski
MQTT Topic: Alarm Schedule
Firmware Update
Full HD Series
Mike Polinowski
INSTAR MQTT: Topic Added

Added missing topic for the alarm schedule:

Your camera has 2 alarm schedules - one that determines whether the alarm detection is armed or not and a back-up schedule of the setting you set. This way it is possible to manipulate the alarm schedule for a short time ("Snooze" function) and then restore it from the BackUp. The value displayed in the WebUI is always the BackUp schedule. If you make changes to the schedule via the MQTT API, you should accordingly always switch both schedules at the same time. This is now possible with the following topics:

  • alarm/schedule/dayoftheweek
  • alarm/schedule/dayoftheweek/webui

The latter is intended for the back-up schedule, which is used, among other things, for the display in the WebUI. And the value dayoftheweek is for the day of the week you want to adjust: monday, tuesday, wednesday, usw..

Update your first MQTT Topic

To update a topic you can use a desktop software like the MQTT Explorer or MQTT.fx for Windows, macOS or LINUX. Or one of the many available Smartphone Apps. These allow you to try out the MQTT API without the need of additional Hardware (Smarthome Gateways) and quickly debug your MQTT network.

Configure and test your MQTT Broker

Konfigurieren und testen Sie Ihren MQTT-Broker

INSTAR MQTT - Windows macOS and LINUX Apps

MQTT v5 Topics und Message Payloads (WQHD Serie)


MQTT v3 Topics, Message Payloads and CGI Commands (Full HD Serie)


Compatible Software

INSTAR MQTT - Android Apps
INSTAR MQTT - Home Assistant
INSTAR MQTT - Athom Homey
INSTAR MQTT - ioBroker
INSTAR MQTT - FHEM House Automation

External MQTT Broker

All INSTAR Full HD cameras come with a full MQTT Broker. It is not necessary to install an external broker to use the INSTAR MQTT Service. But there are situations where you might want to use e.g. an already existing broker on your network. The following examples show you how to set up HiveMQ, Mosquitto or the Internet-based CloudMQTT service to work with your INSTAR camera.

Bauen Sie Ihr eigenes MQTT-Netzwerk auf

INSTAR MQTT - Mosquitto
* Eclipse Mosquitto

Die INSTAR MQTT-Schnittstelle baut auf dem Eclipse Mosquitto Open Source MQTT Broker auf. Der Quellcode kann von Github heruntergeladen werden und ist unter der Eclipse Public License 2.0 verfügbar.