Author Topic: Fronius Solar inverter integration  (Read 119 times)

Offline tmorberg

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Fronius Solar inverter integration
« on: April 19, 2017, 01:51:26 am »
Hello

I have started to integrate my Fronius solar inverter to Vera edge (UI7).

I have changed the file from user reneboer (http://forum.micasaverde.com/index.php?topic=40611.0)
uploaded it, and created a new device as described in the post.

However, i do not get it to work properly.
 - The device says "it is not configured"
 - I can not see any log (ALTUI) for the device
 - Opening the uploaded xml file in the GUI (apps->develop app->luup files) says that there is a error on line 122 and that seems to be the "&" sign.
 - Testing the actual line of code in random lua test bench works fine.
 - Actual new code that i have changed (reading from the inverter and changed json conversion) working flawlessy.

Any suggestions on how to proceed to get it work?

The fronius API is described here:
http://www.fronius.com/cps/rde/xbcr/SID-A761BF1D-F8F8FEE6/fronius_international/42_0410_2012_318486_snapshot.pdf

The changed xml file is attached.

Offline tmorberg

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Fronius Solar inverter integration
« Reply #1 on: April 19, 2017, 02:16:30 pm »
Well... Changed the request to the server with this line instead excluding the "&" sign that seemed to be the issue in the file.  "GetInverterRealtimeData.cgi?Scope=System"

Now the module seems to start at least.

Offline reneboer

  • Hero Member
  • *****
  • Posts: 1031
  • Karma: +52/-30
Re: Fronius Solar inverter integration
« Reply #2 on: April 20, 2017, 05:16:55 am »
Hi,

The Vera does not like some HTML specific characters in the XML files even when they are within strings. You will have to replace them with the HTML equivalent.

Two typical ones are & and <
   & becomes &amp;
   < becomes &lt;

Give that a shot.

Note that is you would write the same code in a .lua file, you must use the original characters.


Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline tmorberg

  • Newbie
  • *
  • Posts: 11
  • Karma: +0/-0
Re: Fronius Solar inverter integration
« Reply #3 on: April 22, 2017, 02:58:11 pm »
Thanks! Yes, changed the syntax and the file looks ok in the Vera viewer.  ;D

The files is uploaded, device created, but i do not see anything in the logs. I am very new for the LUA files but as i have understood the file shall depending on day/night update the values automatically (no need for external calls?). The log is not showing anything also when i changed the log level to 10.

The variables for the device are created according to the definition in the file.

Maybe i have misunderstood something fundamental with the vera plugin concept?


Offline reneboer

  • Hero Member
  • *****
  • Posts: 1031
  • Karma: +52/-30
Re: Fronius Solar inverter integration
« Reply #4 on: April 24, 2017, 05:05:09 am »
Hi,

Try reloading luup and at the same time keep an eye on the log file to see if anything on your device shows. It should at a minimum report that it is starting and the IP address it will be using.

If it still says not configured, make sure the IP attribute in the Advances tab is populated with the IP address of your solar device.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.