OtavioF

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • in reply to: MQTT not reading messages #10505
    OtavioF
    Participant

    Hello, Mikhail.

    On the dll file properties, version is 1.0.0.0, last modified at july 28, 2020.

    Bigger part of the configuration file, excluding MQTT server username and password:

    <?xml version="1.0" encoding="utf-8"?>
    <DevTemplate>
    	<MqttParams Hostname="node02.myqtthub.com" ClientID="---" Port="1883" UserName="otaviofolharini" Password="---"/>
    	<RapSrvCnf ServerHost="127.0.0.1" ServerPort="10001" ServerUser="ScadaComm" ServerPwd="12345"/>
    	<MqttSubTopics>
    		<Topic TopicName="/mesparam1" QosLevel="0" NumCnl="666"/>
    	</MqttSubTopics>
    	<MqttPubTopics>
    	</MqttPubTopics>
    	<MqttPubCmds>
    	</MqttPubCmds>
    	<MqttSubCmds>
    	</MqttSubCmds>
    	<MqttSubJSs>
    	</MqttSubJSs>
    </DevTemplate>

    The communication line log:

    2022-08-22 08:52:39 Initialize communication line 10 "MQTT"
    Send packet
    Send packet
    Connection established
    2022-08-22 08:52:42 Start communication line 10 "MQTT"
    
    2022-08-22 08:52:42 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Send packet
    
    2022-08-22 08:52:43 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Receive packet
    
    2022-08-22 08:52:43 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Receive packet
    
    2022-08-22 08:52:44 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Receive packet
    
    2022-08-22 08:52:44 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Send packet
    
    2022-08-22 08:52:44 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Send packet
    
    2022-08-22 08:52:45 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Send packet
    
    2022-08-22 08:52:45 Communication session with the Device 5 "MQTTCascata", type: KpMqtt
    Receive packet
    [...]

    Device info:

    Device 5 "MQTTCascata"
    ----------------------
    DLL           : KpMqtt
    State         : normal
    Comm. session : 22/08/2022 08:54:30
    Command       : time is undefined
    
    Comm. sessions (total / errors) : 295 / 0
    Commands       (total / errors) : 0 / 0
    Requests       (total / errors) : 146 / 0
    
    Current device tags data
    +--------+------------+-------+---------+
    | Signal | Name       | Value | Channel |
    +--------+------------+-------+---------+
    | ******** GroupMQTT ****************** |
    +--------+------------+-------+---------+
    |      1 | /mesparam1 |   --- |     666 |
    +--------+------------+-------+---------+
    
    No archive data
    
    No events
    
    No commands

    Here is a print from MyQtt Web Interface, that allowes me to publish messages to topics.
    https://imgur.com/W8XuWXn

    I’ll give a try on the new MQTT driver. Hope it works!
    Thank you.

    in reply to: Grafana (backend) and Rapid SCADA #9091
    OtavioF
    Participant

    Hi cooldjmc

    If you’re running on Windows, run the curl command over Command Prompt (cmd.exe) using administrator rights.

    in reply to: Grafana (backend) and Rapid SCADA #7941
    OtavioF
    Participant

    Hello!

    The time format was indeed wrong. However, it was easier (at least for me) to change the expected input format in GrafanaDataProvider than change it on the Grafana plugin. I’m more familiar to C# than go-lang.

    In the other hand, now GrafanaDataProvider doesn’t work when receiving requests from the original Simple Json Database. I’ll make some improvements as soon as I can.

    Thank you for all your support, Mikhail.

    in reply to: Grafana (backend) and Rapid SCADA #7749
    OtavioF
    Participant

    Hi,

    This seems to be something with the date format that the datasource sends to GrafanaDataProvider.

    On GrafanaDataProvider, the grafanaArg.range.from value is always 01/01/0001 00:00:00. When it’s converted to Unix in TrendsController.cs (line 227), it gets a negative value, which is expected.

    Tomorrow begins Christmas break on my company, so I’ll be back on this issue by January 4th.

    Thank you for all your attention. I hope I’ll comeback with a solution in mind.

    Happy New Year, Mikhail.

    in reply to: Grafana (backend) and Rapid SCADA #7746
    OtavioF
    Participant

    Hi,

    The description of the exception is:

    Newtonsoft.Json.JsonReaderException: 'Could not convert string to DateTime: 1608121200227. Path 'range.to', line 1, position 53.'

    Using the PDB and source code of the Newtonsoft, Visual Studion points the error occurring in this function (marked with some “<<<” on the line)

    internal DateTime? ReadDateTimeString(string s)
            {
                if (string.IsNullOrEmpty(s))
                {
                    SetToken(JsonToken.Null, null, false);
                    return null;
                }
    
                if (DateTimeUtils.TryParseDateTime(s, DateTimeZoneHandling, _dateFormatString, Culture, out DateTime dt))
                {
                    dt = DateTimeUtils.EnsureDateTime(dt, DateTimeZoneHandling);
                    SetToken(JsonToken.Date, dt, false);
                    return dt;
                }
    
                if (DateTime.TryParse(s, Culture, DateTimeStyles.RoundtripKind, out dt))
                {
                    dt = DateTimeUtils.EnsureDateTime(dt, DateTimeZoneHandling);
                    SetToken(JsonToken.Date, dt, false);
                    return dt;  <<<<<<<<--------
                }
    
                throw JsonReaderException.Create(this, "Could not convert string to DateTime: {0}.".FormatWith(CultureInfo.InvariantCulture, s));
            }

    As requested, the exception stack is as it follows:

    >	Newtonsoft.Json.dll!Newtonsoft.Json.JsonReader.ReadDateTimeString(string s) Line 856	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.JsonTextReader.FinishReadQuotedStringValue(Newtonsoft.Json.ReadType readType) Line 729	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.JsonTextReader.ReadAsDateTime() Line 467	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.JsonReader.ReadForType(Newtonsoft.Json.Serialization.JsonContract contract, bool hasConverter) Line 1217	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, string id) Line 2378	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, object existingValue) Line 485	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, object target) Line 1004	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, string id) Line 2331	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, object existingValue) Line 485	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Newtonsoft.Json.JsonReader reader, System.Type objectType, bool checkAdditionalContent) Line 167	C#
     	Newtonsoft.Json.dll!Newtonsoft.Json.JsonSerializer.DeserializeInternal(Newtonsoft.Json.JsonReader reader, System.Type objectType) Line 901	C#
     	System.Net.Http.Formatting.dll!System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStream(System.Type type, System.IO.Stream readStream, System.Text.Encoding effectiveEncoding, System.Net.Http.Formatting.IFormatterLogger formatterLogger)	Unknown
     	System.Net.Http.Formatting.dll!System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStream(System.Type type, System.IO.Stream readStream, System.Net.Http.HttpContent content, System.Net.Http.Formatting.IFormatterLogger formatterLogger)	Unknown
     	System.Net.Http.Formatting.dll!System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.ReadFromStreamAsync(System.Type type, System.IO.Stream readStream, System.Net.Http.HttpContent content, System.Net.Http.Formatting.IFormatterLogger formatterLogger)	Unknown
     	System.Net.Http.Formatting.dll!System.Net.Http.Formatting.MediaTypeFormatter.ReadFromStreamAsync(System.Type type, System.IO.Stream readStream, System.Net.Http.HttpContent content, System.Net.Http.Formatting.IFormatterLogger formatterLogger, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Net.Http.Formatting.dll!System.Net.Http.HttpContentExtensions.ReadAsAsyncCore<object>(System.Net.Http.HttpContent content, System.Type type, System.Net.Http.Formatting.IFormatterLogger formatterLogger, System.Net.Http.Formatting.MediaTypeFormatter formatter, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Net.Http.Formatting.dll!System.Net.Http.HttpContentExtensions.ReadAsAsync<object>(System.Net.Http.HttpContent content, System.Type type, System.Collections.Generic.IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter> formatters, System.Net.Http.Formatting.IFormatterLogger formatterLogger, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(System.Net.Http.HttpRequestMessage request, System.Type type, System.Collections.Generic.IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter> formatters, System.Net.Http.Formatting.IFormatterLogger formatterLogger, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.ModelBinding.FormatterParameterBinding.ReadContentAsync(System.Net.Http.HttpRequestMessage request, System.Type type, System.Collections.Generic.IEnumerable<System.Net.Http.Formatting.MediaTypeFormatter> formatters, System.Net.Http.Formatting.IFormatterLogger formatterLogger)	Unknown
     	System.Web.Http.dll!System.Web.Http.ModelBinding.FormatterParameterBinding.ExecuteBindingAsyncCore(System.Web.Http.Metadata.ModelMetadataProvider metadataProvider, System.Web.Http.Controllers.HttpActionContext actionContext, System.Web.Http.Controllers.HttpParameterDescriptor paramFromBody, System.Type type, System.Net.Http.HttpRequestMessage request, System.Net.Http.Formatting.IFormatterLogger formatterLogger, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.ModelBinding.FormatterParameterBinding.ExecuteBindingAsync(System.Web.Http.Metadata.ModelMetadataProvider metadataProvider, System.Web.Http.Controllers.HttpActionContext actionContext, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.Controllers.HttpActionBinding.ExecuteBindingAsyncCore(System.Web.Http.Controllers.HttpActionContext actionContext, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.Controllers.HttpActionBinding.ExecuteBindingAsync(System.Web.Http.Controllers.HttpActionContext actionContext, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.Controllers.ActionFilterResult.ExecuteAsync(System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.ApiController.ExecuteAsync(System.Web.Http.Controllers.HttpControllerContext controllerContext, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Net.Http.dll!System.Net.Http.HttpMessageInvoker.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Net.Http.dll!System.Net.Http.DelegatingHandler.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.dll!System.Web.Http.HttpServer.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Net.Http.dll!System.Net.Http.HttpMessageInvoker.SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)	Unknown
     	System.Web.Http.WebHost.dll!System.Web.Http.WebHost.HttpControllerHandler.ProcessRequestAsyncCore(System.Web.HttpContextBase contextBase)	Unknown
     	System.Web.dll!System.Web.TaskAsyncHelper.BeginTask(System.Func<System.Threading.Tasks.Task> taskFunc, System.AsyncCallback callback, object state)	Unknown
     	System.Web.dll!System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()	Unknown
     	System.Web.dll!System.Web.HttpApplication.ExecuteStepImpl(System.Web.HttpApplication.IExecutionStep step)	Unknown
     	System.Web.dll!System.Web.HttpApplication.ExecuteStep(System.Web.HttpApplication.IExecutionStep step, ref bool completedSynchronously)	Unknown
     	System.Web.dll!System.Web.HttpApplication.PipelineStepManager.ResumeSteps(System.Exception error)	Unknown
     	System.Web.dll!System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext context, System.AsyncCallback cb)	Unknown
     	System.Web.dll!System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest wr, System.Web.HttpContext context)	Unknown
     	System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)	Unknown
     	System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)	Unknown
     	[Native to Managed Transition]	
     	[Managed to Native Transition]	
     	System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)	Unknown
     	System.Web.dll!System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(System.IntPtr rootedObjectsPointer, System.IntPtr nativeRequestContext, System.IntPtr moduleData, int flags)	Unknown
     	[AppDomain Transition]	
    
    in reply to: Grafana (backend) and Rapid SCADA #7736
    OtavioF
    Participant

    Hi,
    I disabled “Just My Code” on Debug Options and managed to get a few more info.

    Now I get this messages on every Grafana’s refresh:

    Exception thrown: 'Newtonsoft.Json.JsonReaderException' in Newtonsoft.Json.dll
    Exception thrown: 'Newtonsoft.Json.JsonReaderException' in Newtonsoft.Json.dll
    Exception thrown: 'Scada.ScadaException' in ScadaData.dll

    The soap opera continues…

    in reply to: Grafana (backend) and Rapid SCADA #7734
    OtavioF
    Participant

    Hi,
    I’m getting no output.

    I’ve compiled Log(Release) > ScadaData(Release) > GrafanaDataProvider(Debug), attached to process the w3wp.exe but I’m getting no output. Am I missing something?

    in reply to: Grafana (backend) and Rapid SCADA #7724
    OtavioF
    Participant

    Hello!

    Could you describe how to debug the GrafanaDataProvider on Visual Studio? I got it running on my PC, Google’d some how-to but no success.

    in reply to: Grafana (backend) and Rapid SCADA #7512
    OtavioF
    Participant

    Something to think about: I’ve tested the database with the Fake Simple Json Datasource and its working flawlessly.

    in reply to: Grafana (backend) and Rapid SCADA #7511
    OtavioF
    Participant

    Hi,
    I don’t have Visual Studio on this PC yet. After I install it, I’ll try to debug and will get back with updates.

    Thank you for all your help, Mikhail

    in reply to: Grafana (backend) and Rapid SCADA #7501
    OtavioF
    Participant

    I hope flooding with updates on this matter is not against the rules of the forum. hehehe

    After changing RapidScada’s port to 10001 (which includes ScadaWeb, GrafanaDataProvider and within Administrator), Grafana is finally receiving data!

    However, it’s fetching the wrong minute .dat file.

    2020-11-05 15:45:40 Receive input channel 298 trend from SCADA-Server. File: m010101.dat

    The fetched file should be m201105.dat

    in reply to: Grafana (backend) and Rapid SCADA #7500
    OtavioF
    Participant

    Indeed there was a conflict with the TCP ports. Now I’m able to access the Web application and there’s no error whatsoever on RapidScada.

    Now I’m trying to display the values on Grafana. Maybe now it’s the problem that you mentioned before, about request’s format to GrafanaDataProvider.

    I’ll send updates when there is any.

    in reply to: Grafana (backend) and Rapid SCADA #7499
    OtavioF
    Participant

    Hello.

    I think I found the problem and its on the TCP port. The plugin after build generates an .exe file that, when its running, I ran the CurrPorts (software to monitor the TCP/UDP ports) and the plugin’s exe is using the TCP port 10000.

    I’ll have a look at the source code to see if I can change it without messing with the RapidScada. If I can’t find it, I’ll change RapidScada’s settings and see if it works.

    I’ll report back with news (let’s hope they’re good ones)

    in reply to: Grafana (backend) and Rapid SCADA #7494
    OtavioF
    Participant

    Hi!

    I’m not the author of this plugin. I believe the way it works should be close to the original Simple Json database used to develop the GrafanaDataProvider app. The difference is that this plugin has support for alerts and annotations, so it’s a “backend” database plugin.

    I think I’ll have to analyze the source code of the plugin and try to identify what’s causing the conflict.

    in reply to: Grafana (backend) and Rapid SCADA #7473
    OtavioF
    Participant

    Hello!

    The SCADA-Server log at the same period of time is like this:

    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> ScadaServerService 5.1.2.1 is started
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Check the existence of the data directories is completed successfully
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Check the existence of the configuration database files is completed successfully
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Input channels are read from the configuration database. Active channel count: 81
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Ouput channels are read from the configuration database
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Users are read from the configuration database
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Formulas are read from the configuration database
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> The formulas source code has been compiled
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Connection listener is started
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Start server
    2020-10-21 16:39:44 <ENGENHARIA-03><SISTEMA><ACT> Current data are loaded

    It seems that there is nothing wrong with Server. When checking Instance Status, Server status its “Normal”, but Communicator appears “Error”.

Viewing 15 posts - 1 through 15 (of 18 total)