Berto MQTT Bridge

 

The Berto MQTT Bridge driver allows connection to a public or private MQTT broker. The driver has connections for other Berto drivers that use MQTT messaging and IoT to control devices such as Sonoff Relays and the Homekit MQTT Bridge.

A private broker such as Mosquitto can be used to manage connections. The broker is used to send and optionally receive messages based on the Topic specified on the Properties page.

 

Any MQTT client can be used to send and receive messages that can be used in programming. Numerous apps are available for iPhone( iHomeTouch) and Android(MQTT Dash).

 

Properties

  • Client Id - MQTT client Id otherwise defaults to the system MAC address and driver device Id.

  • Quality of Service - MQTT QoS value used for subscriptions.

  • Server - The MQTT Boker to connect to in the form mqtt:// or mqtts:// followed by the hostname:[port]. The port number is optional and defaults to 1883 for mqtt connections and port 8883 for mqtts SSL connections.

  • Username - Broker username.

  • Password - Broker password.

  • Topics - Optional Topics to subscribe to separated by commas. eg. bridge/#

  • Maximum Message Size - Message size limit that will be accepted between 1Mb and 256Mb, default is 1Mb. IoT messages are generally very small, anything from a few bytes to a few hundred.

  • Last Update - Date and time of the last message received.

  • Last Message - Last Topic and Message received from the broker.

 

Programming

 

Messages received update the UPDATE, TOPIC, MESSAGE and NUMBER variables which can be used under programming. The NUMBER variable is any number specified in the MESSAGE received. You can also Publish your own messages to any Topic under programming Actions.

 

There are two events that are fired when a message is received. The GENERAL_MESSAGE_RECEIVED event is fired when a message is received on the one of the topics specified in the Topics property whilst the DEVICE_MESSAGE_RECEIVED is fired when a message is received on the topic from a specific bound device such as the Berto MQTT Relay.

There is also a KEEPALIVE variable which is updated every 10 seconds showing the age of the last keepalive packet received. This can be used to force a reconnection to the broker using the Restart MQTT command.

 

Release Notes

 

v1.00 - 2020-03-15

  • Initial Release.

 

v1.10 - 2020-03-29

  • Auto Update changed to be managed via the Auto Update Time specificed in the Berto Cloud driver.

 

v1.11 - 2020-04-17

  • Added Console option to Debug Mode property to allow for external logging output.