ayasystems / froniushttp Goto Github PK
View Code? Open in Web Editor NEWFronius http phyton domoticz plugin
License: GNU General Public License v3.0
Fronius http phyton domoticz plugin
License: GNU General Public License v3.0
Hi,
after the firmware of Fronius inverter have been updated, 4 days ago, the plugin stopped working.
The problem is on some parameters that now are "null", like P_Grid, P_Load, ErrorCode, LEDColor, ....
This is the string passed from the inverter, as logged by your plugin.
Thanks a lot for your great work!!
Paolo iw3grx
2021-12-16 15:44:48.198 Fotovoltaico: a>'Data':'b'{\n "Body" : {\n "Data" : {\n "Inverters" : {\n "1" : {\n "DT" : 75,\n "E_Day" : 16792,\n "E_Total" : 1419.3194580078125,\n "E_Year" : 5109541.5,\n "P" : 444\n }\n },\n "Site" : {\n "E_Day" : 16792,\n "E_Total" : 1419.3194444444443,\n "E_Year" : 5109541.5,\n "Meter_Location" : "unknown",\n "Mode" : "produce-only",\n "P_Akku" : null,\n "P_Grid" : null,\n "P_Load" : null,\n "P_PV" : 444,\n "rel_Autonomy" : null,\n "rel_SelfConsumption" : null\n },\n "Version" : "12"\n }\n },\n "Head" : {\n "RequestArguments" : {},\n "Status" : {\n "Code" : 0,\n "Reason" : "",\n "UserMessage" : ""\n },\n "Timestamp" : "2021-12-16T15:44:46+01:00"\n }\n}\n''
HI,
I have a fronius TL4.0 inverter with a datalogger unit. I discoverd the messages from the datalogger unit can be retreived with:
<IP>/solar_api/GetInverterRealtimeData.cgi?Scope=System
So I replaced this line in plugin.py, however I get thes errors:
__
2020-07-26 21:51:41.949 (Fronius) Good Response received from Solax, Dropping connection.
2020-07-26 21:51:41.949 Error: (Fronius) 'onMessage' failed 'NameError'.
2020-07-26 21:51:41.949 Error: (Fronius) ----> Line 230 in '/home/pi/domoticz/plugins/froniusHttp/plugin.py', function onMessage
2020-07-26 21:51:41.949 Error: (Fronius) ----> Line 165 in '/home/pi/domoticz/plugins/froniusHttp/plugin.py', function onMessage
2020-07-26 21:51:41.949 Error: (Fronius) ----> Line 287 in '/home/pi/domoticz/plugins/froniusHttp/plugin.py', function processResponse
__
Maybe I need another plugin for python? Or is the data structure incompatible? This is what the datalogger sends to me.
{ "Head" : { "RequestArguments" : { "Scope" : "System" }, "Status" : { "Code" : 0, "Reason" : "", "UserMessage" : "" }, "Timestamp" : "2020-07-26T21:35:18+02:00" }, "Body" : { "Data" : { "PAC" : { "Unit" : "W", "Values" : {} }, "DAY_ENERGY" : { "Unit" : "Wh", "Values" : { "1" : 8139 } }, "YEAR_ENERGY" : { "Unit" : "Wh", "Values" : { "1" : 1687941 } }, "TOTAL_ENERGY" : { "Unit" : "Wh", "Values" : { "1" : 20687944 } } } } }
In DEBUG log I got this (I think maybe this is de Data message that is causing trouble:
2020-07-26 22:07:30.294 (Fronius) ----a>'Content-Type':'text/javascript' 2020-07-26 22:07:30.294 (Fronius) a>'Data':'b'{\n\t"Head" : {\n\t\t"RequestArguments" : {\n\t\t\t"Scope" : "System"\n\t\t},\n\t\t"Status" : {\n\t\t\t"Code" : 0,\n\t\t\t"Reason" : "",\n\t\t\t"UserMessage" : ""\n\t\t},\n\t\t"Timestamp" : "2020-07-26T22:04:31+02:00"\n\t},\n\t"Body" : {\n\t\t"Data" : {\n\t\t\t"PAC" : {\n\t\t\t\t"Unit" : "W",\n\t\t\t\t"Values" : {}\n\t\t\t},\n\t\t\t"DAY_ENERGY" : {\n\t\t\t\t"Unit" : "Wh",\n\t\t\t\t"Values" : {\n\t\t\t\t\t"1" : 8139\n\t\t\t\t}\n\t\t\t},\n\t\t\t"YEAR_ENERGY" : {\n\t\t\t\t"Unit" : "Wh",\n\t\t\t\t"Values" : {\n\t\t\t\t\t"1" : 1687941\n\t\t\t\t}\n\t\t\t},\n\t\t\t"TOTAL_ENERGY" : {\n\t\t\t\t"Unit" : "Wh",\n\t\t\t\t"Values" : {\n\t\t\t\t\t"1" : 20687944\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}'' 2020-07-26 22:07:30.294 (Fronius) Good Response received from Solax, Disconnecting.
Hello,
It's not obvious that one will have only one inverted at 1 adders.
According to documentation DeviceId could be in range from 0 to 99 thus assuming address '1' could lead to potential problems.
My suggestion is to Parse Scope=System request's answer and check how many (and with what addresses) devices there are in the system.
Based on that create devices with proper index.
BR,
jarzyn
I just installed this plugin from git to Domoticz V2020.2 and it's giving me the following errors into the log:
`
2021-09-01 23:09:08.090 (Fronius inventer) Pushing 'onHeartbeatCallback' on to queue
2021-09-01 23:09:08.108 (Fronius inventer) Processing 'onHeartbeatCallback' message
2021-09-01 23:09:08.108 (Fronius inventer) Calling message handler 'onHeartbeat'.
2021-09-01 23:09:08.108 (Fronius inventer) Retrieve solar data from http://10.10.10.185/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=1&DataCollection=CommonInverterData
2021-09-01 23:09:09.320 Error: (Fronius inventer) 'onHeartbeat' failed 'KeyError'.
2021-09-01 23:09:09.320 Error: (Fronius inventer) ----> Line 181 in '/config/plugins/domoticz-fronius-inverter-plugin/plugin.py'
2021-09-01 23:09:09.320 Error: (Fronius inventer) ----> Line 65 in '/config/plugins/domoticz-fronius-inverter-plugin/plugin.py'
2021-09-01 23:09:09.320 Error: (Fronius inventer) ----> Line 125 in '/config/plugins/domoticz-fronius-inverter-plugin/plugin.py'
`
Command curl "http://10.10.10.185/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=1&DataCollection=CommonInverterData" gives:
`{
"Body" : {
"Data" : {
"DAY_ENERGY" : {
"Unit" : "Wh",
"Value" : 30560
},
"DeviceStatus" : {
"ErrorCode" : 307,
"LEDColor" : 1,
"LEDState" : 0,
"MgmtTimerRemainingTime" : 4,
"StateToReset" : false,
"StatusCode" : 3
},
"IDC" : {
"Unit" : "A",
"Value" : 0
},
"TOTAL_ENERGY" : {
"Unit" : "Wh",
"Value" : 3033740
},
"UDC" : {
"Unit" : "V",
"Value" : 1.3999999999999999
},
"YEAR_ENERGY" : {
"Unit" : "Wh",
"Value" : 3033747.75
}
}
},
"Head" : {
"RequestArguments" : {
"DataCollection" : "CommonInverterData",
"DeviceClass" : "Inverter",
"DeviceId" : "1",
"Scope" : "Device"
},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2021-09-01T23:10:43+03:00"
}
}
Device details:
`
Hello, I installed this plugin, then configured it like on the screen
I've got Fronius Symo 6.0-3-M
When I hit enabled and apply - then domoticz stops working - hardware table is empty, when open devices it says loading in endless loop, other tab like temperature utility etc is empty.
Where Can I find logs of this plugin?
Is there something that could I miss? additional library?
IP is corect - I can reach fronius via browser
To get domoticz working again, need to disable FroniusHttp
sudo sqlite3 -header -list domoticz.db "UPDATE Hardware set Enabled = 0 where ID = 6"
then restart domoticz
Hello!
It would be interesting to be able to see in real time the load on the strings, voltage, current from which the power produced results. I noticed that there are API commands that can query to get this data for the two strings of the inverter.
"solar_api/v1/GetStringRealtimeData.cgi"
I would be very happy if you could also implement this information in this plugin.
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.