Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84650members
353993posts

MQTT Driver in Geo SCADA Expert 2019

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
vpartinov
Crewman
Crewman
0 Likes
11
1545

MQTT Driver in Geo SCADA Expert 2019

Someone having problems with the new MQTT JSON Schema A driver? 

 

I decided to test it, so everything works fine until I found out the data is not stored into historian. The configuration, the broker, the json format, everything is fine, even in the log files it recognizes the values and timestamps, it associated the topics, items and points. No error in the log files but there are nothing in the historian of the points. Also in ViewX the connection with broker is good, but for the current values of the points there are nothing (Waiting for initial data) even though in the log file says that there are data for these points. 

 

Tags (1)

Accepted Solutions
sbeadle
Janeway Janeway
Janeway
0 Likes
10
1517

Re: MQTT Driver in Geo SCADA Expert 2019

Hi,

 

It could be that the data format is incorrect? The format requires a timestamp value and point names/values. If there is no timestamp then data will not be processed.

 

An example is:

{
    "time": 1592493746,
    "Analog1": 51
}

The time is a 'unix epoch' number of seconds since 1 Jan 1970, and the point 'Tag' field should be "Analog1" in this case.

See Answer In Context

Tags (1)
11 Replies 11
sbeadle
Janeway Janeway
Janeway
0 Likes
10
1518

Re: MQTT Driver in Geo SCADA Expert 2019

Hi,

 

It could be that the data format is incorrect? The format requires a timestamp value and point names/values. If there is no timestamp then data will not be processed.

 

An example is:

{
    "time": 1592493746,
    "Analog1": 51
}

The time is a 'unix epoch' number of seconds since 1 Jan 1970, and the point 'Tag' field should be "Analog1" in this case.

Tags (1)
Rich-C
Ensign
Ensign
0 Likes
9
552

Re: MQTT Driver in Geo SCADA Expert 2019

Hello,

 

So I am having the same issues I cant get values to show even though my broker and device are showing healthy communication. 

 

I have 3 sensors Temperature & Humidity , Moisture and C02 values I am trying to show. 

 

How can I check to see if Geo SCADA is pulling the data? 

 

 

 

Thanks, 

sbeadle
Janeway Janeway
Janeway
0 Likes
8
536

Re: MQTT Driver in Geo SCADA Expert 2019

Please check the driver log file, usually at:

C:\ProgramData\Schneider Electric\ClearSCADA\Logs\Drivers\DriverMQTT_001.log (and 002, ...)

The JSON needs to be formatted correctly, and the point configuration needs to match the point names in the JSON string.

Rich-C
Ensign
Ensign
0 Likes
7
503

Re: MQTT Driver in Geo SCADA Expert 2019

Hello, Sbeadle

 

 

Thanks for the response. 

 

might need a little more assistance with matching the JSON string with Tag in GeoSCADA.

 

 

So, after reviewing the logs I can see the ID, class, state and name of the points. what do I have to match in geoscada?  below is the log maybe you can advise me which one?

 

Thanks again..

 

Logging started at 25-AUG-2022 20:27:44.958 (UTC)
File : C:\ProgramData\Schneider Electric\ClearSCADA\Logs\Drivers\DriverMQTT_001.log
System : Microsoft Windows 10 Professional Edition, 64-bit (10.0.19044)
CPU : 1 x Intel Unknown Family 6, Model 165, Stepping 2
Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
ClearSCADA Core : Build 6.83.8017.1 (Release)
Local time zone : UTC-04:00 (Daylight)
Process ID : 16388
Computer : RICH-LAPTOP
Driver : MQTT
Started : 25-AUG-2022 20:27:44.668
Uptime : 0 00:00:00.291

Logging options:
APP : Application
ERR : Errors
OBJ : Database Objects
PNT : Points
REQ : Requests (Actions)
DAT : Point Updates (Data)
PER : Paho Errors
Threads:
16392 : Main
-------------------------------------------------------------------------------
Registry settings:
HKEY_LOCAL_MACHINE\Drivers\ErrorMsgBox = False
HKEY_LOCAL_MACHINE\Drivers\HeartbeatEavesdrop = False
HKEY_LOCAL_MACHINE\Drivers\ServerPollInterval = 5000
HKEY_LOCAL_MACHINE\Drivers\AsyncPointRequests = True
HKEY_LOCAL_MACHINE\Drivers\SecondaryDataMaxPointUpdates = 250
HKEY_LOCAL_MACHINE\Drivers\MaxPendingAsyncPointRequests = 300
HKEY_LOCAL_MACHINE\Drivers\ValueMapScanningInterval = 1000
HKEY_LOCAL_MACHINE\Drivers\SelectBestChannel = False
HKEY_LOCAL_MACHINE\Drivers\BreakDuration = 100
HKEY_LOCAL_MACHINE\Drivers\PostHangupDelay = 0
HKEY_LOCAL_MACHINE\Drivers\TimeJumpLimit = 50
HKEY_LOCAL_MACHINE\Drivers\RequestTimeout = 600
HKEY_LOCAL_MACHINE\Drivers\RequestTimeoutExtn = 300
HKEY_LOCAL_MACHINE\Drivers\ScannerCommandTimeout = 30
HKEY_LOCAL_MACHINE\Drivers\ScannerRequestTimeout = 180
HKEY_LOCAL_MACHINE\Drivers\EavesdropPSTNTimeout = 30
HKEY_LOCAL_MACHINE\Drivers\RxFailureLimit = 10
HKEY_LOCAL_MACHINE\Drivers\TxFailureLimit = 10
HKEY_LOCAL_MACHINE\Drivers\RetryAssignInterval = 30
HKEY_LOCAL_MACHINE\Drivers\RxTimeoutLimit = 20
HKEY_LOCAL_MACHINE\Drivers\TxTimeoutLimit = 20
HKEY_LOCAL_MACHINE\Drivers\GracefulSocketCloseTimeout = 1000
HKEY_LOCAL_MACHINE\Drivers\AllowInboundConFromAllOS = False
HKEY_LOCAL_MACHINE\Drivers\DirectOnDemandRetryPeriod = 120
HKEY_LOCAL_MACHINE\Drivers\PortServerSettingsTimeout = 10
HKEY_LOCAL_MACHINE\Drivers\ComtrolFreeportDelay = 250
HKEY_LOCAL_MACHINE\Drivers\MaxBatchWriteSize = 1000
HKEY_LOCAL_MACHINE\Drivers\ListenPortRangeStart = 0
HKEY_LOCAL_MACHINE\Drivers\ListenPortRangeEnd = 0
HKEY_LOCAL_MACHINE\Drivers\ResolveNameRetryInterval = 300
HKEY_LOCAL_MACHINE\Drivers\ResolveNameRetryTimeLimit = 10
HKEY_LOCAL_MACHINE\Drivers\PointStatInterval = 4
HKEY_LOCAL_MACHINE\Drivers\PointStatTopX = 25
HKEY_LOCAL_MACHINE\DriverMQTT\LogEnableTelnet = False
25-AUG-2022 20:27:46.280 [Main] Database classes (21)...
Name |Type
------------------------+----------------
CProfile |Resource
CProfileFloat |Resource
CProfileULong |Resource
CProfileLong |Resource
CAdvBITValueMap |Resource
CAdvBYTEValueMap |Resource
CAdvWORDValueMap |Resource
CAdvDINTValueMap |Resource
CAdvUDINTValueMap |Resource
CAdvREALValueMap |Resource
CAdvDOUBLEValueMap |Resource
CAdvStringValueMap |Resource
CDynacardStore |Resource
CAdvOutstation |Modem
CSSLCertificate |Resource
CSSLCertificateAndKey |Resource
CMQTTBroker |Channel
CJSONSchemaAPntDigital |Point
CJSONSchemaAPointAnalog |Point
CJSONSchemaAPntCounter |Point
CJSONSchemaADevice |Outstation
------------------------+----------------
25-AUG-2022 20:27:46.287 [Main] Creating all objects
25-AUG-2022 20:27:46.287 [Data Cache] Started new thread (ID=18116)
25-AUG-2022 20:27:46.288 [Main] Creating objects for class "CMQTTBroker"
25-AUG-2022 20:27:46.288 [Main] Creating "Demo.Aranet.MQTT.New Broker" [CMQTTBroker,7524]
25-AUG-2022 20:27:46.289 [Main] Finished creating objects for class "CMQTTBroker", 1 Objects
25-AUG-2022 20:27:46.289 [Main] Creating objects for class "CJSONSchemaAPntDigital"
25-AUG-2022 20:27:46.290 [Main] Finished creating objects for class "CJSONSchemaAPntDigital" 0 Objects
25-AUG-2022 20:27:46.290 [Main] Creating objects for class "CJSONSchemaAPointAnalog"
25-AUG-2022 20:27:46.290 [Main] Creating "Demo.Aranet.MQTT.Co2" [CJSONSchemaAPointAnalog,7529]
25-AUG-2022 20:27:46.291 [Main] Creating "Demo.Aranet.MQTT.Temperature and Humidity" [CJSONSchemaAPointAnalog,7526]
25-AUG-2022 20:27:46.291 [Main] Finished creating objects for class "CJSONSchemaAPointAnalog", 2 Objects
25-AUG-2022 20:27:46.292 [Main] Creating objects for class "CJSONSchemaAPntCounter"
25-AUG-2022 20:27:46.292 [Main] Creating "Demo.Aranet.MQTT.Moisture" [CJSONSchemaAPntCounter,7527]
25-AUG-2022 20:27:46.293 [Main] Finished creating objects for class "CJSONSchemaAPntCounter", 1 Objects
25-AUG-2022 20:27:46.293 [Main] Creating objects for class "CJSONSchemaADevice"
25-AUG-2022 20:27:46.294 [Main] Creating "Demo.Aranet.MQTT.Aranet" [CJSONSchemaADevice,7525]
25-AUG-2022 20:27:46.305 [Main] Finished creating objects for class "CJSONSchemaADevice", 1 Objects
25-AUG-2022 20:27:46.305 [Main] Finished creating all objects
25-AUG-2022 20:27:46.305 [Main] Initialising all objects
25-AUG-2022 20:27:46.309 [Main] (id=7524) SubObj:Demo.Aranet.MQTT.Aranet(id=7525) CDrvMQTTSubscriptionObject::SetSubscriptionState() Disconnected to SUBSCRIBE Pending Healthy Connection
25-AUG-2022 20:27:46.311 [Main] Paho {3} =========================================================
25-AUG-2022 20:27:46.311 [Main] Paho {3} Trace Output
25-AUG-2022 20:27:46.311 [Main] Paho {3} Product name: Eclipse Paho Asynchronous MQTT C Client Library
25-AUG-2022 20:27:46.311 [Main] Paho {3} Version: 1.3.0
25-AUG-2022 20:27:46.311 [Main] Paho {3} Build level: 2019-04-10T12:19:29Z
25-AUG-2022 20:27:46.311 [Main] Paho {3} OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018
25-AUG-2022 20:27:46.311 [Main] Paho {3} OpenSSL flags: compiler: cl
25-AUG-2022 20:27:46.311 [Main] Paho {3} OpenSSL build timestamp: built on: reproducible build, date unspecified
25-AUG-2022 20:27:46.311 [Main] Paho {3} OpenSSL platform: platform: VC-WIN64A
25-AUG-2022 20:27:46.311 [Main] Paho {3} OpenSSL directory: OPENSSLDIR: "D:\dev\SDKs\OpenSSL\misc\64DR"
25-AUG-2022 20:27:46.311 [Main] Paho {3} =========================================================
25-AUG-2022 20:27:46.338 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTBroker::SetConnectionState() Disconnected to Starting
25-AUG-2022 20:27:46.338 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTConnection::Connect()
25-AUG-2022 20:27:46.339 [Main] Finished initialising all objects
25-AUG-2022 20:27:46.339 [Main] Database objects (5)...
Id|Class |State |Reqs|Rply|Name
--------+------------------------+--------+----+----+--------------------------
7524|CMQTTBroker |Synced | 0| 0|Demo.Aranet.MQTT.New Broker
7525|CJSONSchemaADevice |Synced | 0| 0|Demo.Aranet.MQTT.Aranet
7526|CJSONSchemaAPointAnalog |Synced | 0| 0|Demo.Aranet.MQTT.Temperature and Humidity
7527|CJSONSchemaAPntCounter |Synced | 0| 0|Demo.Aranet.MQTT.Moisture
7529|CJSONSchemaAPointAnalog |Synced | 0| 0|Demo.Aranet.MQTT.Co2
--------+------------------------+--------+----+----+--------------------------
25-AUG-2022 20:27:47.924 [18152] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTConnectListener::on_success()
25-AUG-2022 20:27:47.924 [18152] Sending event MQTT connect request succeeded to "Demo.Aranet.MQTT.New Broker" from scanner
25-AUG-2022 20:27:47.924 [18152] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTConnectListener::on_success()
25-AUG-2022 20:27:47.924 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTBroker::SetConnectionState() Starting to Healthy
25-AUG-2022 20:27:47.925 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i Subscribing to topic "Aranet"(Id=7525) using QoS 1
25-AUG-2022 20:27:47.925 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i(id=7524) SubObj:Demo.Aranet.MQTT.Aranet(id=7525) CDrvMQTTSubscriptionObject::SetSubscriptionState() SUBSCRIBE Pending Healthy Connection to Waiting For SUBACK
25-AUG-2022 20:27:48.048 [18152] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTSubscribeListener::on_success()
25-AUG-2022 20:27:48.048 [18152] Sending event MQTT subscribe ack to "Demo.Aranet.MQTT.New Broker" from scanner
25-AUG-2022 20:27:48.048 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i(id=7524) SubObj:Demo.Aranet.MQTT.Aranet(id=7525) CDrvMQTTSubscriptionObject::SetSubscriptionState() Waiting For SUBACK to SUBSCRIBE Succeeded
25-AUG-2022 20:27:48.048 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTSubscriptionObject::HandleSubscriptionAck() succeeded
26-AUG-2022 08:27:44.229 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTConnection::Disconnect()
26-AUG-2022 08:27:44.229 [Main] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTBroker::SetConnectionState() Healthy to Stopping
26-AUG-2022 08:27:44.230 [18148] a18ca05564134879ab3e29cd0971334f.s2.eu.hivemq.cloud:8883,clientId-x73hOp0W7i CDrvMQTTDisconnectListener::on_success()
26-AUG-2022 08:27:44.230 [18148] Sending event MQTT disconnect request succeeded to "Demo.Aranet.MQTT.New Broker" from scanner
26-AUG-2022 08:27:44.435 [Data Cache] Thread terminated (ID=18116)
26-AUG-2022 08:27:44.438 [Main] Driver stopped after 0 11:59:59.770
-------------------------------------------------------------------------------
Logging stopped at 26-AUG-2022 08:27:44.438 (UTC)

sbeadle
Janeway Janeway
Janeway
0 Likes
6
494

Re: MQTT Driver in Geo SCADA Expert 2019

Screenshot 2022-08-30 103653.jpg

 

Check both your topic name and the tag name. The Tag name in the JSON must match the point configuration.

Rich-C
Ensign
Ensign
0 Likes
5
451

Re: MQTT Driver in Geo SCADA Expert 2019

Hello,

 

I need some assistance with adding the geoscada node..I am stuck from moving the box files from github to my pc local folder step.

 

Place the files from the Box folder here into a working folder. I used:??????????????????????????????????

Install Node-Red

This guide is for Windows, on other platforms, please find instructions on the Node and Node-Red web sites.

Install Node

  1. Go to https://nodejs.org/en/#home-downloadhead and select the LTS version (currently 12.18.4 LTS) to download.
  2. Install this – you will then be directed to install the Additional Tools – this may work, but if not and you see "The request was aborted: Could not create SSL/TLS secure channel", then you need to follow these steps for the additional tools:
    1. Download and install the latest Powershell from: https://github.com/PowerShell/PowerShell
    2. Edit the file: "C:\Program Files\nodejs\install_tools.bat" and replace "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" with "C:\Program Files\PowerShell\7\pwsh.exe" in two places on the last line.
    3. Run this batch file and check for success.
    4. (Link to this additional fix: https://github.com/nodejs/node/issues/33140 )

(These commands may not work through a web proxy or PAC file such as in a company network.)

Install Node-Red

Start "Node.js command prompt" from the Start menu (as Admin). Then enter:

npm install -g --unsafe-perm node-red

This will install node-red, taking a few minutes.

Our node needs a package called xml2js, so also run:

npm install -g --unsafe-perm xml2js

(These commands may not work through a web proxy or PAC file such as in a company network.)

Add the Geo SCADA node

Spoiler
Place the files from the Box folder here into a working folder. I used:??????????????????????????????????

C:\Users\<your user id>\AppData\Roaming\npm\node_modules\node-red

The files are in a subfolder named "node-dev-geoscada":

Then from the Node.js command prompt execute:

npm install C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-red\node-dev-geoscada

sbeadle
Janeway Janeway
Janeway
0 Likes
4
392

Re: MQTT Driver in Geo SCADA Expert 2019

Your title implies you want to use MQTT, but the content is from a document describing how to use the Geo SCADA web services with Node-Red. So what do you want to do - MQTT or web services?

Rich-C
Ensign
Ensign
0 Likes
3
344

Re: MQTT Driver in Geo SCADA Expert 2019

Hello, Mr. sbeadle

 

I want to configure MQTT in GeoScada but your instructions are not clear to  me I am not a programmer or developer so I was trying to mimic the screenshot you posted and I saw you were using NODE-Red to show the data tag "Analog1" which I don't see in my logs.

 

I posted my logs of the MQTT driver and you mentioned to match it with the tag in GEOSCADA but the logs do not show the same tag name as the one you have " Analog1". 

 

 

I have tried to match all 3 tag names from my logs to GEOSCADA and I still don't get DATA. 

 

 

sbeadle
Janeway Janeway
Janeway
0 Likes
2
301

Re: MQTT Driver in Geo SCADA Expert 2019

Please see these release notes: https://schneider-electric.box.com/shared/static/2790008bt5j5j5victze9r5cln6bea36.pdf

Find the MQTT section on page 26, and follow the instructions there.

BUT note the command line for mosquitto_pub is incorrect, it should be:

mosquitto_pub -h 127.0.0.1 -p 1883 -t /East\MyDevice1 -m "{\"time\":1559225529, \"Analog1\":12.3}"

 

Rich-C
Ensign
Ensign
0 Likes
1
151

Re: MQTT Driver in Geo SCADA Expert 2019

Hello Support,

 

I have tested moquitto broker and the test was successful with publishing and subscribing the the test data. 

 

I'm still not sure why Geoscada is not getting the data.

 

Is there a support phone number I can call? or a remote support I can schedule?

AndrewScott
Commander
Commander
0 Likes
0
135

Re: MQTT Driver in Geo SCADA Expert 2019

@Rich-C The contact details for customer support are here:

https://community.se.com/t5/Geo-SCADA-Knowledge-Base/Geo-SCADA-Expert-Support/ba-p/279117 


Andrew Scott, Lead Engineer, AVEVA