Ensure you have completed all the steps in the following documents before continuing:
https://R_BROKER_IP:8443/efm-admin
(replacing R_BROKER_IP
with your remote broker’s public IP address) and log in as the efmAdmin
user with the password that was set during installation (kinetic123
)
It is safe to ignore the SSL warning since this lab uses self-signed SSL certificates. In production the EFM server would be provisioned with a valid SSL certificate.
Once you log in, the “radiation”-style warning in the upper right-hand of the page indicates that there are downstream brokers in quarantine.
Permissions > Quarantine > Authorize
Authorize
button at the bottom
You should now see the local broker
l-broker
listed underneath theRoot Broker
in theBrokers
section on the left-hand of the page.
l-broker
from the Brokers
section
Management > links > Install Link
MQTT
from the link
dropdown
mqtt
as the name and click Invoke
It should say success True
if the operation was successful.
Management > links > mqtt > Start Link
Invoke
https://R_BROKER_IP:8443/dataflow.html
(replacing R_BROKER_IP
with your remote broker’s public IP address) and log in again as the efmAdmin
user, if prompted
Data > downstream > l-broker > downstream > mqtt
Metrics
right-click on Broker Enabled: false
, set the value to true
, and click Invoke
mqtt
and select Add Server
local-broker
tcp://localhost
l-broker
Invoke
You don’t need to delete the example placeholder url of
tcp://test.mosquitto.org/
. Just start typing in that field with the correct value and it will replace that setting. You will run into this with other EFM configuration dialogs as well.
You should see your station’s Raspberry Pi status LEDs turn from red to green after enabling the MQTT server on the local broker.
... > mqtt > local-broker > Subscriptions
This
... >
convention means to stay where you were in theData
section, but to dive deeper into the hierarchy. It saves rewriting the entire path when you are not changing your broker focus. In this case, the...
meansData > downstream > l-broker > downstream
Subscriptions
and select Subscribe
sensor
sensor/#
Invoke
control
control/#
Invoke
The active MQTT channel subscriptions will show up under the Metrics
section.
... > l-broker > downstream > dataflow
dataflow
and select Create Dataflow
clear-local-mqtt-logs
and click Invoke
... > dataflow > clear-local-mqtt-logs
clear-local-mqtt-logs
dataflow in the right-hand editor workspace by clicking on its dataflow icon
... > l-broker > sys > links > mqtt
mqtt
, navigate to Log
, and then drag Clear
to the editor workspace Dataflow
section
It may not be obvious exactly how to perform this step. You will left-click and hold the
Clear
menu entry, drag it to the editor workspace, and then let go of the left mouse or touchpad button.
This is a process you will become very familiar with: dragging various functional “blocks” to the editor workspace to build a dataflow, editing their properties, and connecting their inputs and outputs. This is essentially graphical programming and as you will see can perform fairly complex logic and data operations.
clear_log
to clear-mqtt-log
Properties
section:
600
true
As you likely have already figured out, this
clear-local-mqtt-logs
dataflow will clear the MQTT log every 10 minutes. Without this in place the default MQTT DSLink log level would eventually fill up the small amount of storage with embedded platforms like the IR829. This isn’t as much of a concern with our UCS-based installation, but is a good example of how even the built-in capabilities of EFM can be leveraged and extended via custom dataflows.
You can see this log in the EFM System Administrator web interface under the
Life cycle
section for thel-broker
broker’smqtt
link.
clear-local-mqtt-logs
dataflow by clicking the x
icon next to its name above the editor workspace