In this age of cloud, devices, and things, every tiny thing can be connected and made “smart” by providing information aboutitself and the surrounding environment. The goal of RoboMQ is to make these connections as simple and seamless as using an app. If you happen to have read our blog Device to Dashboard – Real Time Analytics, you might be interested in the guaranteed delivery of sensor data withno programming needed. Today we can make it even simpler by using one of the industrial grade device and IoT gateway platform from B+B Smartworx (now acquired by Advantech).
RoboMQ has been successfully partnering with B+B SmartWorx for over a year. The B+B Wzzardis an easy to use, completely wireless sensor connectivity platform for the rapid deployment of scalable, intelligent, and reliable IoT networking in remote and demanding environments. It support variety of connectivity protocols including mesh networks, Wi-Fi, Cellular, and wired. This blog will illustrate, in just a few simplesteps, how to connect B+B Wzzard devices with RoboMQ and send data through our distributed,guaranteed delivery integration platform.
This article assumes that you have signed up a free trial or a subscription of RoboMQ. If you have not, please signup for a free trial. The free trial will allow you to connect up to 5 devices. It is a great way to get started and build your prototype and MVPs.
(Note:This article will be mainly focused on the integration between B+B Smartworx andRoboMQ. If you have questions specifically about B+B Smartworx not covered in this blog, you may refer to its documentation at http://bb-smartsensing.com/technical-documentation/ )
Figure 1: B+B Smartworx IoT gateway and Edge nodes
Ok… Solets get to work and get started. The setup is as simple as 1-2-3…
- Wire your sensors to a B+B edge node.
- Configure the gateway to connect to RoboMQ Integration Middleware.
- Configure the nodes to connect to the IoT gateway and send the data of interest.
Let’s further break down each step with more details:
1) Wire your sensors to a B+B edge node
B+B Smartworx documentation provides elaborate wire specification for each node model on how to connect the sensors and use the inbuilt sensors. You should read the B+B Smartworx documentation to accomplish step 1. Typically, an edge node will provide voltage, ground, digital input and analog input pins. Some modelsalso come with pre-installed sensors. You will have multiples choices to configure and customize your edge nodes.
2) Configure the IoT gateway to connect to RoboMQ integration middleware
Once the sensor setup is done, connect your laptop or computer to the IoT gateway over the Ethernet port, and open http://192.168.1.1 in your browser. It will lead you to the configuration page of the IoT gateway. Click User Modules -> IoT Gateway, and you will see the page below.
Figure 2: Setting up IoT Gateway
Follow the instruction below to fill out the form, then save it.
- Network ID& Join Key: Remember them! Nodes will connect to the gateway using these as the credential. This is the credential and joining key for local mesh network.
- MQTT BrokerEnable & MQTT Broker Port: Keep the “MQTT Broker Enable” to Off.
- MQTT BridgeEnable: On. (This is needed to have the device nodes and the gateway connect to RoboMQ)
- MQTT BridgePort: 1883
- MQTT BridgeAddress: The IP address or FQDN of broker. You must configure DNS server for the gateway if you choose FQDN.
- MQTT BridgeUser: Your RoboMQ tenant ID + “:” + Your RoboMQ username.
- MQTT BridgePassword: Your RoboMQ tenant password.
- MQTT BridgeClient Identifier: Unique ID for each B+B Smartworx gateway.
- Click Save.
After a few seconds, you will be able to see theMQTT connection established from the gateway to RoboMQ on the RoboMQ management UI. The URL to the management UI along with the credentials is provided upon signing up for RoboMQ free trial or subscription.
Figure 3: RoboMQ management UI showing established connection from IoT Gateway
3) Configure the nodes to connect to the IoT gatewayand send the data of interest
Now go back to the edge node. Install a WzzardSensor APP on your Android device then follow the below instructions toconfigure the node.
1. The APP willscan for B+B nodes over the bluetooth. Long press configuration button on the node to prepare it for configuration, then select the node in the APP.
Figure 4: Select the edge node for configuration
On the next screen Select “Radio Setup” to go to the detailed configuration page.
Figure 5: Select Radio Configuration option
2. Once on the Radio Setup screen, input the Network ID and Network Join Key that you configured and took note while configuring the IoT gateway. Also enter theUsername and Password. If you have not already changed it, then the default username is “admin” and the default password is “admin”. Click “Save” once you're done.
Figure 6: Radio configuration on the edge node
3. Now go back to “Select a category screen” as shown in Figure 5 and select “Sensor Setup”. It should present you with the screen as shown below.
Figure 7: Sensor configuration
On this screen, configure “Publish Interval” and the sensor-specific data rules and formats.
At this point, you have completed the setup and you are all set!
B+B Wzzard will now collect sensor data and publish to it RoboMQ at the configured time intervals. Below is a snippet of the MQTT messages that you will receive on RoboMQ queues. As you can see, the MQTT topic is the node ID and message payload is JSON formatted sensor data.
You could not consume these messages and build applications using IoT device data. For example, you will be able to build IoT visualization, as shown, below in couple of minutes to monitor the sensor data.To do so simply follow the second half of our previous blog Deviceto Dashboard – Real Time Analytics.
Once you have configured RoboMQ “Device toDashboard” real time analytics and visualization engine, you should be able to visualize your sensor stream real-time with absolutely no programming needed!
Figure 8: RoboMQ Device to Dashboard real time analytics and visualization engine
With RoboMQ, you have endless options for the useof the sensor data. You could use the real-time analytics engine as mentionedabove. You could alternatively integrate the sensor data with Salesforce, CRM,relational databases, MongoDB, CouchDB, analytics engines, or operationalsystem. RoboMQ provides the Things Connect suite of adapters and connectors toconnect all SaaS and enterprise systems with Internet of Things over anystandard integration protocol. You may refer to our blog on how to connect your device data to Salesforce at http://robomq.blogspot.in/2015/04/hello-i-need-help-iot-devices-talking.html. This blog talks about the use case of a devicecreating a case in Salesforce upon observing an abnormal environmental condition.
As you might have experienced yourself by now, Any-to-Any integration is extremely easy with RoboMQ. Sign up for a free trial today and please feel free to reach out to us at firstname.lastname@example.org for further assistance. If you need more assistance, you may engage us for a proof of concept to give us an opportunity to show how we can help you realize your next IoT killer app!