Berto IoT Gateway

The Berto IOT Gateway driver provides integration with a variety of IoT devices running the Tasmota firmware such as the Sonoff range of hardware, Shelly IOT devices, Sonoff DIY range, Lifx Lights and Flicsmart buttons. Drivers are available for relay, sensor, button and light devices which all link via the gateway driver.

Integration to Google Assistant via the Berto Assist service and to Apple Homekit is also available for a list of devices that you select. Integration with Google Assistant, Home Assistant and Flic buttons requires a Berto Hub which can be installed on your own hardware or virtual machine instance from the Action tab. The install option requires that the targeted system is running Raspberry Pi OS or Ubuntu 18.04. Alternatively you can purchase a pre-installed Raspberry Pi 4 with POE and case, see the Subscription Plan property in the Berto Cloud driver. The Berto Hub can be accessed from a browser at https://berto-iot.local:10000 or using Putty SSH, username "admin" and password "bertoiot". There is no setup needed from the Webmin interface, this is purely supplied for simple management of the device and changing the password.

The following devices are currently supported :-

Tested Shelly devices include:-

Tested Sonoff DIY devices include:-

 

Tested Tasmota Modules include:-

 

All Lifx light devices should be supported that are compatible with version 2 of the Lifx LAN Protocol.

For each device you need to install a Berto IOT GenericBerto IOT Light or Berto IOT Dimmer driver which linkes to the IOT Gateway.

Devices are discovered and controlled using a variety of protocols depending on the device. For Shelly and Tasmota devices the recommended method is to use an MQTT Broker as this method provides instant realtime feedback when the device state is changed external to the Control4 system. An IoT hub can be automatically installed and configured from the Actions menu which installs the required software on a Raspberry Pi models 3 and 4. Once the Pi is installed it will automatically reboot. You will then need to enter the IP address in the MQTT Server property, you do not need a Username or Password. The installed MQTT server also provides the necessary software for integration with Apple Homekit and Flic smart buttons.

Devices can also be controlled directly using HTTP such as the Sonoff DIY range of hardware but also Shelly and Tasmota devices. External device feedback can be received by polling the devices at the frequency defined in Properties. Sonoff DIY devices provide feedback using mDNS broadcasts meaning those devices do not need to be polled. Using HTTP control negates the need for an MQTT broker. By default Tasmota devices do not respond to mDNS discovery broadcast unless option 55 is turned on using the SetOption55 On command on the console.

Devices can also be entered manually using their IP address causing the gateway to attempt to autodetect the type of device to see if it is supported.

The capabilities of discovered devices are read automatically from the device ie. number of relays, inputs, sensors or the type of light, colour, dimmer etc.

When using an MQTT Server you can also specify additional topics in the Custom Topics property which will cause the gateway to accept messages on those topics and update the MESSAGE and TOPIC variables and also fire the CUSTOM_MESSAGE_RECEIVED event.

When starting the discovery process all supported devices and protocols are scanned, in the case of Flic buttons the Berto Hub is put into pairing mode and pressing the Flic button will cause the pairing process to start. Pairing Flic buttons requires that the Flic is not already connected to an existing bluetooth hub, see Flic troubleshooting to factory reset a button.

The gateway also supports the Sonoff RF bridge and the April Brother bluetooth gateway is in development. To add devices that use a bridge to connect to the gateway the RF and bluetooth codes need to be learned. To do this you need to select the bridge device in the Devices property which will show some additional properties and put the gateway into learning mode. In learning mode you should tigger the device so the RF or bluetooth code is transmitted and recorded for selection in the Close and Open state properties. Select the appropriate code for Close and Open, along with a device name, and then Add Device in the Action property to add the device to the Devices list. Buttons should be added with the close code selected only and contact sensors, such as door & window contacts, motion sensors etc. require both the close and open code. Up to 8 pairs of codes can be added to a device covering 4 button key fobs allowing groups of up to 8 contacts or motion sensors to be assigned to a single device. The codes generated by the device are displayed in the LUA window.

If you are upgrading from a previous release then please check the Upgrade Instructions before proceeding.

Properties

  • Devices - List of available IOT devices found on the network.

  • Address - IP Address of device. This is the address found or address of a device you wish to attempt to autodetect.

  • Description - Device description.

  • Sleepy - Defines whether the device is always on or only wakes when triggered eg. battery powered devices. These devices are excluded from polling.

  • Name - Name of device to be added. (RF & Bluetooth learning mode only).

  • Close Code - The code transmitted code that triggers the close state for the device. (RF & Bluetooth learning mode only).

  • Open Code - The code transmitted code that triggers the open state for the device. (RF & Bluetooth learning mode only).

  • Action - Option to manually refresh the state of the device, add or remove the device from the Devices list.

  • Polling Frequency - The frequency in seconds for which devices that do not support realtime feedback will be polled, a value of 0 disables polling.

  • Use mDNS Discovery - Enable mDNS device discovery and realtime feedback for devices that support it such as Sonoff DIY.

  • MQTT Server - The MQTT Broker 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. If you have a Berto Hub you should enter it's IP address here in the format mqtt://{ip address}.

  • Username - Broker username.

  • Password - Broker password.

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

  • Custom Topics - Additional MQTT topics that will be subscribed to, multiple topics can be separated with commas.

  • Tasmota Full Topic - This os the Full Topic as defined on all your Tasmota devices. eg. tasmota/%prefix%/%topic%/

  • Tasmota Group Topic - This is the Group Topic used by all your Tasmota devices. The Group Topic can be set from the console using cmnd/{name}/GroupTopic {group}. eg. cmnd/ledlamp/GroupTopic tasmotas

  • Exposed Devices - The devices that you want to expose to the enabled external integration services for control and querying.

  • Add Room Watch Devices - Automatically add all available watch devices for each room.

  • Add Room List Devices - Automatically add all available watch devices for each room.

  • Berto Assist Token - The system generated token created when linking the driver Berto Assist.

  • Homekit Pin Code - The pin code used to identify the Berto Hub as a Homekit accessory which is automatically created by the Berto Hub.

  • Home Assistant Discovery Topic - Discovery prefix topic setup in Home Assistant.

  • Status - Gateway status updates.

 

Actions

  • Start Discovery - Attempt to discovery all compatible devices on your local network and MQTT broker server. Discovery will run for 60m seconds unless stopped manually. Some devices, such as battery operated devices, may need to be activated or powered off and back on to issue a device announcement.

  • Stop Discovery - Stop device discovery

  • Push Devices - Push available devices to slave IOT drivers.

  • List Device Mappings - List devices assigned to driver mappings.

  • Clear Devices - Clears available devices list.

  • Export Devices - Exports the configuration and devices found to a JSON formatted file at http://{Controller Address}/imagetmp/config.json.

  • Import Devices - Imports the configuration and devices from a JSON formatted file at http://{Controller Address}/imagetmp/config.json.

  • Install IOT Hub - Install the required software on a Raspberry Pi model 3 or 4 or Debian/Ubuntu distribution. You will need to enter the IP Address, username and password of the Raspbery Pi. The user will need to have the required the permissions to sudo to the root user. The default Raspberry Pi user is "pi" and the password is "raspberry". The webmin package is installed allowing management of your Pi at https://{Controller Address}:10000. Installation progress can be seen in the LUA output window.

  • Integration Menu - Link to Berto Assist and Publish Exposed Device configuration to Berto Assist and Apple Homekit.

 

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 specified in the Berto Cloud driver.

 

v1.11 - 2020-04-17

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

 

v1.12 - 2020-06-05

  • Added mDNS support and native support for Sonoff DIY devices.

  • Added support for HTTP control of Shelly and Tasmota devices.

  • Removed need to enable features as the driver will disable any protocols that are not used by any devices discovered.

 

v1.13 - 2020-06-11

  • Added Home Assistant support.

 

v1.14 - 2020-06-12

  • Fixed issue with polling timer not working on some devices.

 

v1.15 - 2020-06-15

  • Fixed issue with Berto Hub install script no installing screen command.

 

v1.16 - 2020-06-17

  • Fixed issue with feedback on Homekit devices.

  • Added support for Google Assistant only enabled if Berto Assist Token registered.

  • Added support for Homekit only enabled if Homekit Pin Code registered entered.

  • Added support for Home Assistant only enabled if Home Assistant Discovery Topic entered.

v1.17 - 2020-06-23

  • Added external integration support for light drivers outlet_dimmer, outlet_dimmer_module, outlet_switch_module, outlet_wireless and outlet_wireless_dimmer.

v1.18 - 2020-06-30

  • Added Google Assistant support for additional device types - Curtains, Blinds, Windows, Doors, Locks, Gates, Garages, Fans, Heaters, Water Heaters, Switches and Fireplaces. The Berto Assist service has be certified by Google.

  • Add Secure Devices property to select those devices that require Google Two factor authentication using a pin code defined in the Assist Pin Code property.

  • Fixed issue with Homekit Pin Code property not get populated on Hub reset.