Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

Geo SCADA MQTT Topic with nested data

EcoStruxure Geo SCADA Expert Forum

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • Geo SCADA MQTT Topic with nested data
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
sbeadle
Kirk sbeadle Kirk
307
AndrewScott
Admiral AndrewScott
95
BevanWeiss
Spock BevanWeiss
89
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
36
View All
Related Products
product field
Schneider Electric
EcoStruxureâ„¢ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to EcoStruxure Geo SCADA Expert Forum
Solved
ash_aqx
Lieutenant JG ash_aqx
Lieutenant JG

Posted: ‎2021-02-10 06:19 AM . Last Modified: ‎2023-05-03 12:05 AM

0 Likes
9
3794
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-10 06:19 AM . Last Modified: ‎2023-05-03 12:05 AM

Geo SCADA MQTT Topic with nested data

Hi All,

 

I'm wondering whether the MQTT driver is capable of supporting data in nested JSON elements.

The data that I'm receiving is split up a bit differently than what is described in the help files, with timestamps separated from data in the following fashion:

 

{

"payload_fields":{

    "sensor1":67593

    "sensor2":83463

    },

"metadata":{

    "time":"2021-02-10T12:28:16.002839378Z"

    },

}

 

 

I've tried referencing the tag names like this:

  • payload_fields.sensor1
  • payload_fields.sensor2

But that doesn't appear to be working either. My guess is that because the "time" tag is in a different place to the data GeoSCADA is getting confused..

 

Any assistance / pointers would be greatly appreciated!

Labels
  • Labels:
  • Drivers
  • IoT
  • SCADA
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2021-02-11 02:37 PM . Last Modified: ‎2021-02-11 02:39 PM

In response to ash_aqx
1 Like
4
3764
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-11 02:37 PM . Last Modified: ‎2021-02-11 02:39 PM

The trouble(*) is MQTT is really just a transport mechanism like TCP. It is like saying we have a TCP telemetry driver when you're interested in DNP3 but can also consider Kingfisher, Modbus, etc, as its just packaged up differently but it is all the same TCP transport (ignoring choosing serial or UDP options!)

 

Most MQTT communications uses some form of JSON, but I also have to deal with CSV and raw text data and that's before I have to worry about how the data is encoded (e.g. base64) and then what the values mean (e.g. raw readings versus changes since previous reading). Until the various MQTT publishers use standards such as WITS-IoT and SparkplugB dominate, I've yet to interface with a device that uses either, then it is effectively a wild west.

 

As to how you can solve the problem... you can raise a support request for an enhancement, or...

 

You can compile the SparkplugB driver from https://github.com/GeoSCADA, Steve has made it open source. I believe there is a WITS-IoT driver around from Steve too, but not sure of the commercial arrangements of that. You could copy Steve's SparkplugB driver and make the relevant changes, its in C# using the Geo SCADA DDK.

 

Beyond that I do develop our own set of MQTT drivers to interface with the numerous other devices that my customers need to interface with and so its possible you could do the same. or chat to your Schneider rep and they can reach out to me to discuss further depending on which region you're in, or my colleagues elsewhere in the world. Some of our SIs could also help develop a driver if you already have existing agreements with them.

 

(*) I use the term trouble here, but it is also an advantage with significant flexibility which is one reason why MQTT is so popular in IoT

See Answer In Context

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 9
geoffpatton
Captain geoffpatton
Captain

Posted: ‎2021-02-11 01:20 PM

0 Likes
7
3770
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-11 01:20 PM

I was only testing MQTT from a Node-Red application, but if I did not have it formatted from Node-Red exactly as documented I got nothing in ClearSCADA. So I think you are not going to get it to work with your current format.

 

@sbeadlecan probably confirm.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

ash_aqx
Lieutenant JG ash_aqx
Lieutenant JG

Posted: ‎2021-02-11 02:14 PM

In response to geoffpatton
0 Likes
6
3768
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-11 02:14 PM

Thanks for the reply,

I thought this might be the case.

 

Do you know who might be a good contact to get driver enhancements made?

 

It seems like this is a relatively common complaint from people using the MQTT driver.

 

It is a touch rediculous that we would need to use an intermediary processor to handle the limitations of the GeoSCADA driver. The entire point of having a SCADA system is that it does these things natively.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

geoffpatton
Captain geoffpatton
Captain

Posted: ‎2021-02-11 02:30 PM

In response to ash_aqx
0 Likes
0
3765
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-11 02:30 PM

From What I understand this is a first go at MQTT and they are going to enhance it. the problem with MQTT is that the messages can be structured any way you want but designing a can driver that is that flexible and still works otherwise with the software is a lot of development work. I am not sure they are ever going to go to that level.

 

I think they are going to add the the SparkPlug Payload B standard.

 

Contact your support channel and you can ask them to put in a driver enhancement request.

 

Steve Beadle who I tagged in my last message might have some information he can share on this.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2021-02-11 02:37 PM . Last Modified: ‎2021-02-11 02:39 PM

In response to ash_aqx
1 Like
4
3765
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-11 02:37 PM . Last Modified: ‎2021-02-11 02:39 PM

The trouble(*) is MQTT is really just a transport mechanism like TCP. It is like saying we have a TCP telemetry driver when you're interested in DNP3 but can also consider Kingfisher, Modbus, etc, as its just packaged up differently but it is all the same TCP transport (ignoring choosing serial or UDP options!)

 

Most MQTT communications uses some form of JSON, but I also have to deal with CSV and raw text data and that's before I have to worry about how the data is encoded (e.g. base64) and then what the values mean (e.g. raw readings versus changes since previous reading). Until the various MQTT publishers use standards such as WITS-IoT and SparkplugB dominate, I've yet to interface with a device that uses either, then it is effectively a wild west.

 

As to how you can solve the problem... you can raise a support request for an enhancement, or...

 

You can compile the SparkplugB driver from https://github.com/GeoSCADA, Steve has made it open source. I believe there is a WITS-IoT driver around from Steve too, but not sure of the commercial arrangements of that. You could copy Steve's SparkplugB driver and make the relevant changes, its in C# using the Geo SCADA DDK.

 

Beyond that I do develop our own set of MQTT drivers to interface with the numerous other devices that my customers need to interface with and so its possible you could do the same. or chat to your Schneider rep and they can reach out to me to discuss further depending on which region you're in, or my colleagues elsewhere in the world. Some of our SIs could also help develop a driver if you already have existing agreements with them.

 

(*) I use the term trouble here, but it is also an advantage with significant flexibility which is one reason why MQTT is so popular in IoT

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

ash_aqx
Lieutenant JG ash_aqx
Lieutenant JG

Posted: ‎2021-02-11 02:48 PM

In response to AdamWoodland
0 Likes
3
3761
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-11 02:48 PM

Thanks Adam,

 

That's some great insight. Definitely appreciate the complexities. 

 

Maybe a suite of seperate modules (parsers for JSON, CSV, etc that aren't necessarily tied to the MQTT driver) that can accept and process the output from the MQTT driver might be a simpler approach. Then the user could "build" an appropriate parsrer to suite the application.

 

Is it possible to intercept the output from the driver and use GeoSCADA scripting to process the payload?

 

I'll have a look at the driver source that you've linked, might be something there that I can work with.

 

Again, thanks for the response, very helpful!

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

AdamWoodland
AdamWoodland Schneider Alumni (Retired)
Schneider Alumni (Retired)

Posted: ‎2021-02-15 07:49 PM

In response to ash_aqx
0 Likes
2
3713
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-15 07:49 PM

I would love there to be a generic parser but it is beyond my software capabilities (I'm not a product developer, don't worry! 🙂 )

 

I did do something similar to the interception for some events that came in for a specific device, but in that case just shunted the event details to a structured text program as string/DT and the end user to do with the details what they wanted. The problem is there is no native JSON handling in the easily available server-side languages (i.e. structured text) so you don't really have anything to process the JSON unless you write your own .NET/Python/whatever code and then you're almost back at just putting it in the driver.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2021-02-16 01:47 PM

In response to AdamWoodland
0 Likes
1
3705
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-16 01:47 PM

I did look into the possibility of a generic parser a few years ago, and it seemed like it would be reasonably doable actually.

 

Essentially what it would need is to use some kind of grammar descriptor language, like ENBF

https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form

 

The issue then being that it's a bit harder for end-users / integrators to 'develop' because such a descriptor language is often quite disconnected from the language that it is being used to describe (i.e. if using it to describe HTML, it wouldn't look very natural to an HTML 'coder').

 

The real benefit is that it would provide a common platform for AVEVA/Schneider to develop more user friendly interfaces.

The way I'd envisage it would be there would be a drop down of 'common' formats (like xx separated values, or SparkPlugB, etc etc) but then there would also be a 'Custom Format' which would allow the raw ENBF form to be entered / edited.  Ideally the common formats would be implemented in ENBF also, so when transitioning from a common format to 'custom' the ENBF for the common format is shown... hence if just a slight tweak is required to a common format, the end user doesn't have to rewrite it from scratch, they just make the tweak required.

 

There's example parser generators around, like:

https://github.com/cwbaker/lalr   (does a modified BNF, rather than EBNF)

 

It would still only support 'character based' protocols, and I'm sure there would be other issues in getting the character data in the first place, but it at least makes the processing of the message data consistent and flexible.


Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

ash_aqx
Lieutenant JG ash_aqx
Lieutenant JG

Posted: ‎2021-02-16 02:48 PM

In response to BevanWeiss
0 Likes
0
3701
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-16 02:48 PM

Definitely,

A generic string parser of some description would open up a whole range of lesser used protocols and formats for integration.

Something like this would be super convenient and allow developers / integrators a much shorter path for IoT devices.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

ash_aqx
Lieutenant JG ash_aqx
Lieutenant JG

Posted: ‎2021-02-21 03:22 PM

1 Like
0
3641
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2021-02-21 03:22 PM

Hi Everybody,

 

Thanks for your guidance and feedback on this topic point.

After the suggestion from @AdamWoodland I cloned and built the Driver-BasicMQTTClient from this repo https://github.com/GeoSCADA.

 

The good news is that this works perfectly with The Things Stack, providing your region has uplink fields enabled. I used the following topic descriptor: "my-app-id/devices/my-dev-id/up/<field>"

 

You can check if your region supports it by checking out this link: https://status.thethings.network/ 

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of