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

MQTT Sparkplug B Driver - Security Setup

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
  • MQTT Sparkplug B Driver - Security Setup
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
Back to EcoStruxure Geo SCADA Expert Forum
CamJam
Ensign CamJam
Ensign

Posted: ‎2023-02-25 02:10 AM . Last Modified: ‎2023-05-02 11:48 PM

0 Likes
9
2068
  • 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: ‎2023-02-25 02:10 AM . Last Modified: ‎2023-05-02 11:48 PM

MQTT Sparkplug B Driver - Security Setup

Hey, 

I have managed to stumble through the Sparkplug B driver documentation and created the driver without editing the source code provided. Has anyone had this working with security (TLS/SSL) yet? 

Specifically I am just after how the CA certificate and Client certificate fields are populated. Looks like they are defined as a string in the driver, and then created on the go?

With the native MQTT driver the security setup has the option to create certificate variables and then link to these in the broker. Is this an option that can be added to the sparkplug driver?

 

Cheers,
Cam

Attachments
Labels
  • Labels:
  • Drivers
  • 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
Replies 9
sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2023-02-27 03:06 AM

0 Likes
1
2048
  • 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: ‎2023-02-27 03:06 AM

Hi Cam,

First - well done!

Second - there's a native built-in Geo SCADA driver for Sparkplug in the 2022 release and this may be the best option for you.

Third - if you still want to use the driver code (and you are welcome to!), it may be because you want to customise it or use it with earlier Geo SCADA/ClearSCADA versions.

The certificate stuff is just exposing the M2MQTT .Net library call parameters, so it's all down to whether the underlying open source .Net library works the way you want/expect it to work. There's nothing in the Sparkplug driver code on GitHub which you can tweak if the library doesn't support what you need. See their github page at: https://github.com/eclipse/paho.mqtt.m2mqtt

Reply

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

CamJam
Ensign CamJam
Ensign

Posted: ‎2023-02-27 02:46 PM

In response to sbeadle
0 Likes
0
2042
  • 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: ‎2023-02-27 02:46 PM

Thanks Steve, 

Our customer is using v2020 with a 2021 update, so looks like we are stuck with building and testing the driver at this stage. 

I am not so proficient in C# or building drivers, so i don't see this going far. Is there any chance the v2022 Sparkplug driver can be compatible with previous versions of Geo SCADA?

 

What i did manage to do is get Node-red working as a Sparkplug MQTT client with SSL and was able to see the message data as needed from the devices were are trying to talk to.

I guess the next step could be to use this data from Node-red (or decode first) and then push to GeoScada using some other protocol (OPC-UA, modbus).  

Reply

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

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2023-02-28 02:26 AM

0 Likes
1
2035
  • 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: ‎2023-02-28 02:26 AM

Drivers can only work with their released software versions.

Getting the Sparkplug DDK driver working is not so hard - see the PDF document and videos should help.

Download PDF by getting 'product' at: https://shop.exchange.se.com/en-US/apps/61786/ecostruxure-geo-scada-expert-sparkplug-b-sample-driver

 

See: https://www.youtube.com/watch?v=tVEIMkj9PnM&list=PLa7UGrWOTyjnPpCJxnTZkdBM_6D70qoKl&index=11

 

and: https://www.youtube.com/watch?v=8gXaw6seCfc&list=PLa7UGrWOTyjnPpCJxnTZkdBM_6D70qoKl&index=12

 

Reply

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

CamJam
Ensign CamJam
Ensign

Posted: ‎2023-02-28 04:47 PM

In response to sbeadle
0 Likes
0
2031
  • 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: ‎2023-02-28 04:47 PM

Hi Steve, 

I had followed those videos and pdf file - hence the question around the ssl/tls and certificates, as I can't see any examples of this being used or noted how to setup in the pdf/videos.

All I am really after is how the certificate fields in the Geo SCADA need to be filled in. Are they a file location to where the certificates need to be? or are they the name of the files - if this is the case, where do we put these files?

 

Or do I need to call a different M2MQTT client function to get this functionality into the driver and database?

 

Cheers,
Cam

Reply

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

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2023-03-01 05:55 AM

0 Likes
3
2021
  • 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: ‎2023-03-01 05:55 AM

I believe you pass in certificate filenames in these fields, so the files are read by the driver, so they need to be in locations the driver can read. e.g. in ProgramData

Reply

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

CamJam
Ensign CamJam
Ensign

Posted: ‎2023-03-08 03:15 AM

In response to sbeadle
0 Likes
2
1968
  • 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: ‎2023-03-08 03:15 AM

Hey Steve, 

I have managed to get the security working. I believe the field names for the certificates need to be the path, as GeoScada kept throwing errors until I included the path - something like C:/ca.crt

 

As a bit of background we are using mosquitto as a broker and i couldnt get GeoScada to connect with the cert files, so i added the cert files to the trusted root certificates of both broker and Geo Scada PC

 

Now for the next part, hopefully you can point me in the right direction.

The device we want to talk to is a flow meter, its using sparkplug topic structure but the documentation also says its not sparkplug compliant!

Using Node-red i can see the message payload and it seems slightly different to some of the node-red layout I can see in the sparkplug youtube video. 

 

 

Here is a snip from Node-red

Node Red Payload.jpg

 

An this is a snip from the device documenation

EH Signal Defintion.jpg

And I can see the broker sending GeoScada the data

Mosquitto to GeoScada.jpg

 

I have had a bit of a play with trying to setup this tag in GeoScada, but not getting anywhere. The auto setup didnt pick up any devices, so i manually tried to create the device, which seems ok, just getting the message to an analog sparkplug doesnt seem to work. Any ideas for what I can try?

GeoScada Signal Setup.jpg

  

Cheers,
Cam

 

Reply

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

CamJam
Ensign CamJam
Ensign

Posted: ‎2023-03-08 06:01 PM

In response to CamJam
0 Likes
1
1963
  • 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: ‎2023-03-08 06:01 PM

So an update to this, looks like the flow meter doesn't quite follow the Sparkplug message structure, so I managed to play with the Driver and adjust the decode function to accept the correct parts. Now i am getting an error from the driver logs about logging into to something - i imagine this is the driver trying to log into GeoScada to make changes to tag structure? Where do these usernames and passwords reside in the driver? or can i just hard code something for now to get going.

 

Sparkplug driver log.jpg

 

Cheers,

Cameron

 

Reply

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

CamJam
Ensign CamJam
Ensign

Posted: ‎2023-03-08 06:14 PM

In response to CamJam
0 Likes
0
1963
  • 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: ‎2023-03-08 06:14 PM

Ok found out it username and password just needs to be added to the device setup.

 

Now i have the device created automatically in GeoScada. All seems to be working nicely!

 

Cheers,
Cam

Reply

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

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2023-03-09 12:28 AM

0 Likes
0
1956
  • 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: ‎2023-03-09 12:28 AM

Brilliant! Well done.

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