Connected Switchgear
Itouch Home Automation
Table of Contents
1 Additional Resources ................................................................................................................... 2
2 Current Hardware ......................................................................................................................... 2
2.1 Electronic Wall Switches (MiWi Panels) .................................................................................. 2
2.2 Dimmer Switches (MiWi Panels) ............................................................................................. 2
2.3 Power Outlets (MiWi Panels) .................................................................................................. 2
2.4 Raspberry Pi – Gateway ......................................................................................................... 2
3 Typical Installation (any number/configuration of panels) ............................................................. 3
3.1 Important Design Parameters ................................................................................................. 3
4 MQTT Setup – Current ................................................................................................................. 4
4.1 Architecture Diagram .............................................................................................................. 4
4.1 System Setup Procedure ........................................................................................................ 4
4.2 Steps to Create MQTT Architecture ........................................................................................ 5
4.3 Gateway Logic – Raspberry Pi3 .............................................................................................. 6
pg. 1
1 Additional Resources
Download Brochures at https://www.itouchhome.com.au/downloads/
2 Current Hardware
2.1 Electronic Wall Switches (MiWi Panels)
2.2 Dimmer Switches (MiWi Panels)
2.3 Power Outlets (MiWi Panels)
2.4 Raspberry Pi – Gateway
pg. 2
3 Typical Installation (any number/configuration of panels)
Cloud MQTT
Broker
Secondary Connection Method
MQTT Bridge (When no local network detected)
Via Internet
Primary Connection Method
Home Modem Router
Wifi Enabled
Device Client
LAN Cable
Raspberry Pi 3 Gateway
Local Broker
MiWi Panels
MiWi Mesh Network
3.1 Important Design Parameters
3.1.1 Itouch hardware and system is designed to operate independently of an
internet connection for reliability of service.
3.1.2 The gateway and mobile app can only be used in conjunction with the itouch
hardware
3.1.3 The current mobile app has been developed to use the local network
connection as the primary connection and this should not change
3.1.4 Existing API’s are for cloud mqtt server, there no existing API’s for http cloud
based services
3.1.5 Gateway will be sold pre-programmed with Flask with customers cloud mqtt
credentials, once programmed the Flask username and password is
generated and provided to customer for first time login
pg. 3
4 MQTT Setup – Current
4.1 Architecture Diagram
Local Broker
(R-PI gateway) MQTT MQTT Client
Bridge (CloudMQTT
With MQTT Bridge
that pub’s to Remote Shared instance)
Broker
Port Topics Port
pub’s back to
i.e.37846 I.e. 37846
MySQL Protocol Protocol
DB mqtt mqtt
TLS /SSL Bridge
Protocol
Protocol
wss (TLS)
Port ws
8884 Port i.e.27846
MQTT
Client
4.1 Cloud Broker Prerequisites
4.1.1 MQTT Bridge port ie 37846 between local broker and cloud broker
4.1.2 MQTT Port 1883
4.1.3 MQTT SSL/TLS port 8883
4.1.4 Web socket port 11443/443
4.1.5 Mosquito Protocol v5.0
4.1.6 Open all ports
4.1.7 Disable loop back messaging to local broker
4.1.8 Clients need full access to subscribe and publish all topics
4.2 System Setup Procedure
4.2.1 Install Itouch hardware panels
4.2.2 Install Raspberry Pi Gateway and connect to Home Modem Router (Wifi enabled)
via LAN cable
4.2.3 Ensure your DHCP Server does not issue an IP Address or range that includes
the Itouch gateway static IP address
pg. 4
4.3 Steps to Create MQTT Architecture
4.3.1 Create a cloud MQTT account with www.myaccount.Crystalmq.com
4.3.2 Under the Overview Tab select TLS Enable
4.3.3 No need to download Certificate
4.3.4 MQTT over TLS Port 8883
4.3.5 MQTT over Secure Websocket Port 443
4.3.6 If 11443 is the port contact support and have them open port 443 also, also to
upgrade to Mosquitto Protocol Version 5.0 to ensure that there is no loop back
messaging from the cloud mqtt to the local broker, as is the case with protocol
3.0/3.1
4.3.7 Under the Security Tab add an Authentication Access Key and Access Token.
Note anyone with these credentials will be able to access the MQTT
4.3.8 Under Access Control ensure the MQTT Username created as # allow for Publish
Topics and Subscriptions.
4.3.9 Install Flask on the gateway
4.3.10 When prompted to set up a cloud broker select yes and enter the credentials
from your Crystalmq instance:
Cloud Host – Host Address
Username – Access Username
Password – Access Token
SSL Port 8883
Websocket Port 11443/443
Record the Flask username and password issued
4.3.11 Connect your smart device to the local network
4.3.12 Open the iTouch app and enter the IP address and Flask username and
password
4.3.13 You should be connected to the gateway.
Contributors from Butterfly
Valentina Taranova
Thomas Dittmar
Da Ming Lee
Contributors from CSG
Peter Birrell
pg. 5
4.3 Gateway Logic – Raspberry Pi3
1. 2 3 4
User registration Single login page Create google and Develop Geo fence
page - manually to login to Alex Alexa Skill to hook feature in React
register using and/or Google to existing cloud Native code to trigger
gateway ID accounts MQTT broker the “home” and “way”
username and Endpoints commands through
password
pg. 6
Cloud instance User
Database and single
Alexa Skills Google Skills login page
Cloud MQTT
Broker
Primary Connection Method
pg. 7