Downloads3
Subscribe
0
Bookmark
1
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own responsibility.
Details
Releases
Reviews
Issues
Videos
Articles
Reports

What's new in this version

Initial Release

Gitter Quality Gate Status Reliability Rating

iris-iot-sample

This is a sample of InterSystems IRIS Interoperability solution for IoT using MQTT. It consume a MQTT message and send other MQTT message as response.

Installation: ZPM

  1. Open IRIS Namespace with Interoperability Enabled.
  2. Open Terminal and call:
USER>zpm "install iris-iot-sample"

Installation: Docker

  1. Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/iris-iot-sample.git
  1. Open the terminal in this directory and run:
$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up -d

How to Run the Sample

  1. Open the production and start it. It will start observing the MQTT topic /DeviceStatusInputTopic and it will produce responses to MQTT topic /DeviceStatusOutputTopic. See:

Production

  1. Use a MQTT client to send a message and test the production. For this, into your Google Chrome browser access https://chrome.google.com/webstore/detail/mqttbox/kaajoficamnjijhkeomgfljpicifbkaf. It is the Chrome Plugin MQTTBox. Click Add to Chrome and after Add App.

MQTTBox

  1. In your Google Chrome browser access chrome://apps/ and select MQTTBox (if required, click Open Anyway).

Open MQTTBox

  1. Click Create MQTT Client button.

Click Create Client

  1. Configure the MQTT connection with these settings:
  • Client name: Local
  • Protocol: mqtt / tcp
  • Host: localhost:1883
  • Username: admin
  • Password: admin
  • All other settings are the default values

MQTTBox Settings

  1. Configure the MQTT topics to send and receive MQTT messages:
  • Topic to publish: /DeviceStatusInputTopic
  • Topic to subscribe: /DeviceStatusOutputTopic
  • Payload:
{
"deviceId":"Air Conditioner Level 1",
"statusDate":"2023-01-07 14:03:00",
"status": 0
}

MQTTBox Topics Config

  1. Click the button Subscribe to listen messages on the topic /DeviceStatusOutputTopic. Now the UI changes to wait for messages on this topic.

MQTTBox Wait messages

  1. Click the button Publish to send a message to /DeviceStatusInputTopic and see the results produced by IRIS production on /DeviceStatusOutputTopic

MQTTBox Topic results

  1. See the message processing session on IRIS Management Portal Visual Trace

Production Visual Trace

ZPM installation
zpm "install iris-iot-sample"
Rating
5 (1)
ObjectScript quality test
Passed
Updated on 03 February 2023
ObjectScript quality report
Category
Technology Example
Works with
InterSystems IRISInterSystems IRIS for HealthHealthShare
Tags
Info
Version
1.0.0
Last updated
2023-01-10
Repository
Open
Documentation
Open
License
Link