Integration options
When considering how to integrate a unicontrol device into one's IoT environment, there are multiple implementation options available ranging from a completely segregated offline unit to a full-fledged online solution. The ideal option varies greatly based on the user's experience level, current state of their smart environment, future plans, or simply the purpose of the device.
A critical part of integrating the unicontrol device is ensuring protection against unauthorized access or other vulnerabilities. Check the section on Network security to learn more about this subject.
Standalone modules
The first and simplest option is to have the unicontrol device fully offline with no options for remote monitoring or control. Although this leaves the most powerful capabilities of unicontrol unused, it may still be acceptable in applications where no remote access or internet connection is required.
Although connection to the network and/or internet may be necessary for the device's initial activation and set-up, subsequently it may be operated in a fully offline mode once initialized.
Offline local network
Connecting the unicontrol device to a wireless network (even without internet access) enables an HTTP API. This allows the user to obtain input readings and output states, change settings, or send commands to the device from anywhere within the local network. Hosting a local copy the set-up interface also becomes possible.
Basic online setup
Maintaining an internet connection brings forth further capabilities. At the very least, internet is needed for obtaining the current time in the absence of a dedicated RTC module, which is essential for timed processes. It also extends the usability of the following functionalities to be usable anywhere in the world, as long as an internet connection is available:
- HTTP API - by port forwarding directly to the device (in case a public IP address is available)
- MQTT API - by connecting to an externally hosted MQTT broker
- Programming manager - by port forwarding directly to an externally hosted programming manager like Node-RED or other.
Local MQTT broker
Using MQTT protocol to exchange messages and commands significantly improves the user experience with unicontrol devices, as it allows to comfortably receive the telemetry data collected by the device or change settings and send commands directly from your smartphone using standard third party software available on Google Play or the App Store.
An MQTT broker like Mosquitto
can be easily hosted by a microcomputer connected to your local wireless network.
Although in this set-up the messages will not be available from outside your local network, within it
this configuration will provide all advantages offered by MQTT for a fairly small initial investment and no monthly fees.
Local programming manager
Another significant step up in the smart environment is using a third-party programming tool or manager like Node-RED. This provides a wide variety of additional tools ranging from embedding external data in local algorithms to creating professional custom dashboards.
Node-RED can be hosted in a local network similarly to the MQTT broker and is free of charge as well.
External MQTT broker
When seeking greater mobility, a natural next step is to use an external online MQTT broker accessible from anywhere in the world instead of only within your local network. This can be obtained in multiple ways:
- 1. Locally hosted broker may be forwarded to an external port in case of static external IP address
- 2. Use one of professional MQTT online services
- 3. Use one of free MQTT online broker
Connecting to the external broker is, however, same as connecting to the local one.
Please check Network security to learn more about security aspects of using external MQTT broker
.
Full online setup
Although locally hosted Node-RED offers most of the benefits of having an external MQTT broker
, you may still opt for externally hosted Node-RED
,
especially when accessing the dashboard from outside the local network is required.