Forum Home › Forums › Development and Integration › external application requesting sacada data
Tagged: login, scadaclient
- This topic has 25 replies, 4 voices, and was last updated 4 months, 1 week ago by zzz.
-
AuthorPosts
-
April 16, 2024 at 10:23 am #14410JWParticipant
I’m working on external application, What’s the proper way to request current data, hour data and minute data from scada v6?
previously, I just read the dat file from v5, which is the fastest way I think.
this following file descripted the dat format, so it is easy to read.
https://github.com/RapidScada/scada/blob/master/ScadaData/ScadaData/Data/Tables/SrezAdapter.cswhere can I find similar description for v6 dat files?
aslo is there any api that allows external application reading scada data?
April 16, 2024 at 12:48 pm #14415MikhailModeratorHi,
In v6 archives can be of different formats. So it’s not a good way to read dat files. However, their format is here.
If you access data from a web page (or can use cookies from your code), you can use Web API. If you get data from server code, you can request the Server app by TCP. The application protocol is documented, C# library is available.
April 16, 2024 at 3:32 pm #14419JWParticipantThanks Mikhail, the protocol is very detailed.
I am going to try and compare the speed of application protocol and reading file.
April 17, 2024 at 2:47 am #14420JWParticipantdeleted
April 17, 2024 at 3:00 am #14421JWParticipantI am testing the api, have some questions about the strings types.
I tested function code 0x01,03,04, all worked.
but for 0x02 login, the server showed the following error message.
I suspect is the error on my request message.Authentication failed for user estD353B3161AC1FFC43C79CE23FAE333EF Username or password can not be empty
Is there any padding for each string or space between strings before encoding?
Or did I just encode the following string? where user=guest and instance=” by default
guestD353B3161AC1FFC43C79CE23FAE333EF
April 17, 2024 at 9:11 am #14426MikhailModeratorMay be the problem is in password encoding. It is encrypted using the provided Secret Key. If the Secret Key is empty, no encryption is used as I remember.
I suggest to get the request, sent by ScadaTestClient, using WireShark and compare with your request.April 17, 2024 at 1:11 pm #14429JWParticipantwhere can I find the ScadaTestClient?
April 17, 2024 at 1:49 pm #14430JWParticipantI copied the encrypted password string from ScadaAdmin.
username = guest
encrypted password string = D353B3161AC1FFC43C79CE23FAE333EF
Also very weird the error message missed the first 2 letters of the username
estD353B3161AC1FFC43C79CE23FAE333EF
April 17, 2024 at 2:11 pm #14431JWParticipantI downloaded the ScadaTestClient, but get the following error on starting.
https://1drv.ms/i/c/7d196e63b671ad1b/ESoeGQzc1ypPnSTSW0IhcxcBn1E_3c0zCZ4ng3FaE967LQ?e=ZDmeGt
April 17, 2024 at 9:32 pm #14432JurasskParkParticipantIt is recommended to add screenshots to the service https://imgbb.com / If it is convenient for you to use the service onedrive.com to add screenshots, this does not mean that it is convenient for support to view screenshots through this service.
April 18, 2024 at 1:44 am #14433JWParticipantApril 18, 2024 at 11:06 am #14438MikhailModeratorLikely ScadaTestClient.xml contains invalid SecretKey property.
ScadaTestClient source code is here if need.April 18, 2024 at 11:07 am #14439MikhailModeratorYou can try setting SecretKey to an empty string. If ScadaTestClient allowed that (I don’t remember), it would simplify the protocol packets.
April 19, 2024 at 9:29 am #14442JWParticipantStill can get it to work. same error when I use different username and password and key.
The source code example is quite detail for other function codes, but there is no detail of the log in function.
I am using python to work with the API, putting together the commands from bytes, so quite relies on the API documents.
April 19, 2024 at 11:23 am #14444MikhailModeratorIf you run the HelloWorld project and use the default configuration of ScadaTestClient, can you successfully communicate between the client and the server?
-
AuthorPosts
- You must be logged in to reply to this topic.