JSON and MQTT configuration in Embed
In NEW platform, I want to configure JSON and MQTT. How can I find those key parameters in the NEW SmartWorks and fill them in Embed?
Best Answer
-
Hi Robbert,
I am attaching an Embed example as well for your reference.
In this example, Smartworks broker is being used to echo the data
The broker is:mqtt.swx.altairone.com
You need to have an account in Altair Smartworks site:
https://idp.swx.altairone.com/auth/registration
Create a device.
In Embed, place an MQTT Publish and Subscribe block in a diagram and configure as below:
HostName: mqtt.swx.altairone.com
Topic: <The topic you have created in your Smartcore portal. You can retrieve Topic from Things->Details field->href:
Eg: spaces/smartwork/categories/mqtt/things/01GKPF0SX8JKAFVFDNCA42PVGS/data >
Username: <The account username attached to your device. Eg: Embed@smartwork >
Password: <The password for your account>
1
Answers
-
Hi Robbert,
You can find the details to be filled in Embed MQTT Block in Smartworks site as below:
For hostname: mqtt.swx.altairone.com
Username and Password has to be filled from Things -> Interfaces field:
You can retrieve Topic from Things->Details field->href:
And use it as below (Remove "/" before spaces and append "/data" at the end of href):
spaces/smartwork/categories/mqtt/things/01GKPF0SX8JKAFVFDNCA42PVGS/data
For subscription, you need to use the same credential.
For your reference, attached is an image of Embed MQTT Publish block updated with correct details:
1 -
Hi Robbert,
I am attaching an Embed example as well for your reference.
In this example, Smartworks broker is being used to echo the data
The broker is:mqtt.swx.altairone.com
You need to have an account in Altair Smartworks site:
https://idp.swx.altairone.com/auth/registration
Create a device.
In Embed, place an MQTT Publish and Subscribe block in a diagram and configure as below:
HostName: mqtt.swx.altairone.com
Topic: <The topic you have created in your Smartcore portal. You can retrieve Topic from Things->Details field->href:
Eg: spaces/smartwork/categories/mqtt/things/01GKPF0SX8JKAFVFDNCA42PVGS/data >
Username: <The account username attached to your device. Eg: Embed@smartwork >
Password: <The password for your account>
1