I have read that most of the solar inverters implement a “sun-spec” for management over modbus.
Does anyone know how standardized this standard is and how closely Fronius follows this standard?
There seem to be multiple implementations (one with float values and one with “int + SF”. Also in my case I can choose to use rtu or tcp flavour for representation in the ip packets.
Do you know whether Fronius shares any documentation on their sun-spec-mod-bus-over-tcp implementation?
I saw People here reporting successfully using the modbus binding with solaredge inverters, but it looked like a “one configuration for one box” instead of “on configuration for all sun-spec”
Assuming your inverter is connected to your LAN and you are interested reading values, I would recommend using their Solar API v1 which returns JSON messages.
Shop for your parameters in and pick a report (example uses GetPowerFlowRealtimeData).
Use the Paper UI to install Bindings->HTTP and Transformations->JSONPATH.
I’m just figuring stuff out as well being about a week into using openHAB having converted from Home Assistant. Seems less fluffy but more powerful. Not requiring re-start all the time makes progress less frustrating.
2017-05-14 15:25:44.334 [ERROR] [b.core.service.AbstractActiveService] - Error while executing background thread HTTP Refresh Service
java.lang.IllegalArgumentException: host parameter is null
at org.apache.commons.httpclient.HttpConnection.(HttpConnection.java:206)[57:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpConnection.(HttpConnection.java:155)[57:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.SimpleHttpConnectionManager.getConnectionWithTimeout(SimpleHttpConnectionManager.java:175)[57:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)[57:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)[57:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)[57:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.openhab.io.net.http.HttpUtil.executeUrl(HttpUtil.java:195)[189:org.openhab.core.compat1x:2.0.0.b5]
at org.openhab.io.net.http.HttpUtil.executeUrl(HttpUtil.java:130)[189:org.openhab.core.compat1x:2.0.0.b5]
at org.openhab.binding.http.internal.HttpBinding.getCacheData(HttpBinding.java:347)[190:org.openhab.binding.http:1.9.0.b5]
at org.openhab.binding.http.internal.HttpBinding.execute(HttpBinding.java:160)[190:org.openhab.binding.http:1.9.0.b5]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:157)[189:org.openhab.core.compat1x:2.0.0.b5]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173)[189:org.openhab.core.compat1x:2.0.0.b5]
how looks your sitemap ? I tried:
Text item=PV_Current label=“PV Leistung: [%s]” icon="none"
Showing only value without Text "PV Power " like defined in items
thank you (yes, i am a beginner)
can you tell me how I can make a rule to get each 5 seconds the update value shown in the basic UI from my PV_Current which is now a NUMBER value in my items.
thanks:
actual I have this in my default:
Text item=PV_Current label=“PV Leistung: [%.0f]” icon=“none”
when using http-cache, you will have to change the updateInterval (that is in msec), to retrieve the information every 5 seconds, but be aware that this will increase the load on openHAB, Fronius and LAN.
However, Basic UI will not update every 5 Seconds, and I doubt if the values delivered by Fronius are that accurate anyway.
ok, so with http-cache the basci UI is updated that interval I defined ?
In my items I defined 5sec. for getting data via http json object from inverter. I thought there is a rule necessary for updating it on the basic ui…
There is another update interval in the items definition (also set to 30000 msec) which also has to be changed to 5000msec, sorry, forgot that part in first place…
Thank you for your help.
How Can I calculate (W in kwH) ?
I tried a rule:
rule "pv-berechnung in kWh"
when
Item PV_DaySum received update
then
var PV_DaySumCalculated = PV_DaySum/1000;
end
in sitemap I use PV_DaySumCalculated instead of PV_DaySum.
Rule shows error in log:
2017-11-25 13:51:13.380 [ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘pv-berechnung in kWh’: An error occurred during the script execution: The name ’ / ’ cannot be resolved to an item or type.
When updating the state of an item, you have to use either sendCommand or postUpdate, where the former will result in a command sent to every binding which is bound to the item and the latter only will change the state without sending this to the bindings.
So, the rule should be like
rule "pv-berechnung in kWh"
when
Item PV_DaySum received update
then
PV_DaySumCalculated.postUpdate((PV_DaySum.state as Number)/1000)
end
2017-11-26 11:23:02.335 [ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘pv-berechnun g in kWh’: An error occurred during the script execution: The name ‘PV_DaySumCalculated’ ca nnot be resolved to an item or type.
2017-11-26 11:23:32.322 [ERROR] [.script.engine.ScriptExecutionThread] - Rule ‘pv-berechnung in kWh’: An error occurred during the script execution: The name ‘PV_DaySumCalculated’ cannot be resolved to an item or type.
Where do I have to initialize PV_DaySumCalculated and how ?
thanks,
You have to define PV_DaySumCalculated as an item in an .items file (same as the other items)
UIs do only display Items, so every value, which shall be displayed has to be stored in an item.
This item is not bound to any binding, so there is no {} part:
Number PV_DaySumCalculated "Tagessumme [%.1f kWh]" <inverter>