December 2, 2017 at 10:48 am #2906
Opposite to http://forum.rapidscada.ru/?topic=%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81%D1%8B-%D0%BF%D0%BE-scada-communicator/#post-5065 , I can’t publish proper value to Cayenne dashboard because MQTT driver push floating value with comma decimal point instead dot. Is this Rapid SCADA issue in general or MQTT driver specific? I have also opened the issue in github: https://github.com/bersim/OpenKPs/issues/4 Thanks in advance.December 2, 2017 at 2:09 pm #2908
Try contacting the author of the driver by creating an issue on GitHub.
This error is specific to the driver.December 2, 2017 at 4:40 pm #2912
Thanks for your quick response Mikhail. Rapid SCADA data on Cayenne dashboard look really nice actually https://drive.google.com/file/d/1ZKeZvDKcrqf7rO28j8QGViMIN0yhSuxZ/view
December 3, 2017 at 12:59 am #2914
- This reply was modified 1 week, 4 days ago by kumajaya.
Hi Mikhail, I found nothing in MQTT driver source code but plain double to string conversion https://github.com/bersim/OpenKPs/blob/1c0009699895bcc886c31169565681e76cacfae9/KpMQTT/MQTTPubTopic.cs#L62 and https://github.com/bersim/OpenKPs/blob/1c0009699895bcc886c31169565681e76cacfae9/KpMQTT/KpMQTTLogic.cs#L357 for publishing and plain string to double conversion (with regex filter for commas) https://github.com/bersim/OpenKPs/blob/1c0009699895bcc886c31169565681e76cacfae9/KpMQTT/KpMQTTLogic.cs#L238 for subscribing. Is this related to development environment locale setting? Since I don’t have development environment for building MQTT driver from source, if don’t mind please rebuild MQTT driver on yours machine and share the resulted binary to us. Thanks in advance.December 4, 2017 at 7:20 am #2915
mqtttp.Value.ToString() and Convert.ToDouble(pv) use the default conversion depending on system settings. If you know C#, can you install Visual Studio Community Edition and debug the source code? May be the MQTT Core receives data with comma.
Cayenne dashboard is really nice!December 5, 2017 at 10:56 am #2917
I just opened a pull request to force use periode (.) as decimal separator. Please check https://github.com/bersim/OpenKPs/pull/5/files . Thank you.December 5, 2017 at 4:46 pm #2918
Also you can use CultureInfo.InvariantCulture instead of creating NumberFormatInfo every time.December 5, 2017 at 4:47 pm #2919
Note: I’m not an author of this driver ))December 6, 2017 at 11:39 am #2920
The last release fix the problem. With ThingSpeak help, Rapid SCADA data on home screen looks very nice: https://drive.google.com/file/d/1dm5cWsnaVaxClzg-uqL6XUmPee8KieM1/viewDecember 7, 2017 at 10:10 am #2921
Wow, beautiful!December 7, 2017 at 3:55 pm #2922
Or visualize Rapid SCADA data on Thingsboard dashboard: https://drive.google.com/file/d/1iu7C1IJTgvceWv4o-9pmIizj_fxtT2R3/view
But need MQTT driver change to add message prefix and suffix to reconstruct json formatted payload 🙁
You must be logged in to reply to this topic.