mqtt introduction
MQTT introduction MQTT or Message Queuing Telemetry Transport, is a protocol commonly used in smart home applications to allow various pieces of hardware to communicate with each other. At its core mqtt is a free opensource piece of software which effectively acts as a database on your network. The most commonly used MQTT software is the opensource project "Mosquitto". MQTT allows hardware which supports the MQTT protocol to send and receive commands and data. If a MQTT enabled temperature sensor is connected to the MQTT "broker" (ie. server) it will begin sending the temperature data to the broker, which HomeAssistant will then pickup for use. This is an example of MQTT being used as an output from the device, However data can also be received from the broker, so if a MQTT command is sent to the broker from homeassistant the hardware will receive it from the broker and act upon the command. If a turn on command is sent from homeassistant to a light switch the switch will then receive the command and turn on the the accordingly. One of the main advantages of choosing MQTT enabled devices is it's local nature. If a local MQTT broker is used, no data is ever leaving the home network. This is benefical for security concerns. It is also typically far faster than other alternate protocols which require the request to leave the network travel over the open internet to a server (potentially in another country) before returning to your network and finally reaching the destination hardware.