Home / FactoryTalk Optix / Advanced Topics and Use Cases
Description
Demonstration of the energy management capabilities of Optix Edge and LoRaWAN. Monitor your cabinet Power Meter or Energy Analyzer and be able to parse the JSON object data values with the deserializer library in .NET.
This use case has been developed with the Linkedin article from Darren Ash about deserializer (click here to read on LinkedIN). Optix Edge and FactoryTalk Optix is used to subscribe to the TTN LoRaWAN Network Server and to parse the energy values. Visual Studio Code AI Copilot has helped a lot to parse the values.
Download the sample code:
https://github.com/xavierflorensa/FactoryTalk_Optix_TTN_deserialize
Contributed by Xavier Florensa – YouTube – LinkedIn – GitHub
Transcript
(00:01) Hi everybody. In this video, I will show you how to get data from a power meter or energy analyzer and through factory torque optics be able to retrieve all the uh active power etc etc. So let me show you how to transmit the data. Normally this power meter is in mode bus RTU need a mode bus to Lo one converter then uh L1 gateway and L1 network server to manage the network.
(00:49) This L1 network server it’s an MQTT broker. Then with factory talk optics you can subscribe to this broker to retrieve the data and your display with your factory optics. Uh this project has been inspired in the work by marinage with the the serializer uh JSON object. The JSON object is what we get when we go to this network server to get the data.
(01:39) So here we can take a look at this network server. This case the thing stuck with the payload arriving with active energy instant active power etc. So this is the JSON object we get. Indeed, we get a complete JSON object like this one. This one, it’s long. Here we have the data. It’s a long JSON. So we want to the code to parse this JSON object.
(02:34) So we’ll do it with our application. You have the code here in case you want to try it. You just need your DTN token and change to your application and device. So let’s take a look at the optics application. Here we have from text boxes with the data went to show. Here we have all the received received payload.
(03:08) And we define some variables like energy etc. And when we take a look at the optics runtime application, yes, we update these values as soon as they arrive. Here you see the time when they arrive and so on. If we take a look at our network server each 20 seconds we get some data. So now let’s wait for the Next data now just now.
(04:13) So we can read this 720 this value the last dated value. Okay. Uh let’s take a look at the code. Uh this is done in net logic using a MQTT subscriber and basically using this library which has the D serializer. People make a subscription connection subscription to the broker and here we have the publish received event where we’ll use this realize as explained by Dar ash and this is all you can find this code in GitHub and I hope you enjoy Okay.
(05:17) So, thank you very much.
Tutorial List
- OPC UA to SQL Converter with FT Optix
- Fiix Integration with Device Library
- PowerFlex Direct Drive Connectivity
- Siri Voice Control with FT Optix
- ThinClient to Display FT Optix Runtime
- Deserialize TTN LoRaWan Payload
- Sending FT Optix Messages to WhatsApp
- Sending Emails with FT Optix
- FT Optix and Grafana for Statistical Analytics
- Optix PanelLoader to PLC Tag
- Pushover Notifications from Optix
