Jump to content

HTTP POST from Fronius inverter in JSON


sandryseibert

Recommended Posts

I have an inverter from Fronius model Primo and it has an option to post data through http, however I don't have a single idea on how all this data can be separated on ISY.. Can someone give me an idea o how to handle such data?

On Fronius datalogger manual I see two different ways to send data, one is JSON and another one looks to be ID tagged..

Example:

{
  "Head" : {
  "RequestArguments" : {},
  "Status" : {
  "Code" : 0,
  "Reason" : "",
  "UserMessage" : ""
  },
  "Timestamp" : "2014-12-10T11:12:56+01:00"
  },
  "Body" : {
  "Data" : {
  "1" : {
  "DT" : 123,
  "PVPower" : 8200,
  "Show" : 1,
  "UniqueID" : "476",
  "ErrorCode" : 0,
  "StatusCode" : 7,
  "CustomName" : ""
  }
  }
  }
  }

OR

<?xml version="1.0"?>
-<SunSpecData v="1">
-<d t="2017-08-08T17:19:20+02:00" sn="262810007xxxxxxxx" mod="Fronius Primo 6.0-x" man="Fronius">
-<m id="1">
<p id="Mn">Fronius</p>
<p id="Md">Fronius Primo 6.0-1</p>
<p id="Vr">0.x.25.x</p>
<p id="SN">262810007xxxxxxxx</p>
<p id="DA">1</p>
</m>
-<m id="111">
<p id="W">3065.000000</p>
<p id="Wh">14111069.000000</p>
<p id="St">4</p>
<p id="I_AC_CurrentA">13.570000</p>
<p id="I_AC_VoltageA">227.300003</p>
<p id="Hz">50.009998</p>
<p id="DCA">10.070000</p>
<p id="DCV">315.200012</p>
</m>
</d>
Link to comment

Hi Sandry

The ISY can't receive data from an external source directly. It requires a "middleman" host and application:

  • Write a program that parses the XML and pushes it into the the ISY using V4 or V5 variables via the rest API. Note that decimal data is not supported by V4 and data has to be multiplied (by a multiple of 10) before pushing into the ISY
     
  • If you have V5, ask for help in the Polyglot and Nodelink section of the forum in having a nodeserver written for this. Its possible that a polyglot developer or io_guy (nodelink) will add this capability to the growing number of supported devices. Your application looks one way, device->isy, and fairly straight forward. V5 handles decimal numbers.

Paul

 

Link to comment
  • 2 weeks later...
On 07/04/2018 at 9:34 AM, larryllix said:

Does it support Modbus?

Yes, it does support Modbus and I already installed a RS485 to TCP/IP modbus converter... I can read each address using ModScan. Can ISY read Modbus?

 

On 07/04/2018 at 9:38 AM, paulbates said:

Hi Sandry

The ISY can't receive data from an external source directly. It requires a "middleman" host and application:

  • Write a program that parses the XML and pushes it into the the ISY using V4 or V5 variables via the rest API. Note that decimal data is not supported by V4 and data has to be multiplied (by a multiple of 10) before pushing into the ISY
     
  • If you have V5, ask for help in the Polyglot and Nodelink section of the forum in having a nodeserver written for this. Its possible that a polyglot developer or io_guy (nodelink) will add this capability to the growing number of supported devices. Your application looks one way, device->isy, and fairly straight forward. V5 handles decimal numbers.

Paul

 

Thank you Paul, I'll give a try. Have to be honest I'm becoming a little tired on learn so many different languages :P

Link to comment

Yes.. that's what I've said.... or, hey "what's one more language or OS"? :D

That's why I suggested asking the polyglot folks or io_guy... if you can post the api tech reference from the company, and what you want to see in the ISY, someone may do it as its a value add to the ISY's node portfolio... eg, you will probably not be the only person interested

Paul

Link to comment
28 minutes ago, sandryseibert said:

Yes, it does support Modbus and I already installed a RS485 to TCP/IP modbus converter... I can read each address using ModScan. Can ISY read Modbus?

 

Not directly or simply. (ISY)

io_guys has written a basic Modbus node for NodeLink but I am using a SunSpec Modbus protocol with my OutBack equipment  Mate3. This means that items can change Modbus addresses with equipment changes. With tens of thousands of points there was a lot of filtering on the fly.  I wrote a Python3 bridge to interrogate my modbus port and pick out what I need, and then stuff it into my ISY.

If you have any Python3 skills, and the modbus is SunSpec protocol, it could be adapted for your usage.

Link to comment
11 minutes ago, larryllix said:

Not directly or simply. (ISY)

io_guys has written a basic Modbus node for NodeLink but I am using a SunSpec Modbus protocol with my OutBack equipment  Mate3. This means that items can change Modbus addresses with equipment changes. With tens of thousands of points there was a lot of filtering on the fly.  I wrote a Python3 bridge to interrogate my modbus port and pick out what I need, and then stuff it into my ISY.

If you have any Python3 skills, and the modbus is SunSpec protocol, it could be adapted for your usage.

I don't have any Python3 skill.. I did something weird but reliable and far easier using NodeRed which is now managing all my dashboards. NodeRed have a node to read Modbus, so it's straight forward. And also have the ability to put data on ISY.

I mean weird because all my dashboards pull data from ISY and some incompatible equipment have its data converted on the dashboard then I send it to ISY for long term storage.

Python looks easy, but it's another language to mess up my brain :D

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...