Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 1.07 KB

File metadata and controls

19 lines (11 loc) · 1.07 KB

MQTT discovery

Several home automation systems -like Home Assistant- support MQTT discovery. Leveraging this functionality in the PLC programming will automatically provision devices in the supported home automation system.


ℹ️ Function blocks supporting MQTT discovery are marked with a MQTT Discovery badge on their documentation page.


Supported function blocks have a InitMqttDiscovery method. The method needs a FB_PLC_MQTT_DISCOVERY_DEVICE instance to work.

MqttDiscoveryGif

JSON library configuration

In order to support MQTT discovery the 'PRO_JSON' library is used to generate the required json objects. This library is configuration sensitive. Amongst others it required the projectName in its variables to function correctly:

PRO_JSON lib config