Fronius inverter integration

Here are sensors I use from Fronius:

1 Like

I used the “rest” sensor component to get the data, but because the inverter switches off during night time the sensor kept on giving me errors. So I created a Nodered flow that request the data from the inverter and sends it via MQTT to Home Assistant.

Copy the text in the fronius Node red Flow file and in node red select, Import - Clipboard - and paste the text in the screen - Import

MQTT Sensor.yaml (161 Bytes)

Fronius Node Red Flow.yaml (5.4 KB)

I tried to copy your flow but the link does not work. I will get my fronius soon. Does it always switch off during night?

Hi, think is is to save power. I will include the node red flow in this email. Remember to change your ip address.

[{“id”:“9593ad35.c187”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“AC Power (W)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.PAC.Value”,“x”:850,“y”:300,“wires”:[]},{“id”:“5dfa164.58095e8”,“type”:“inject”,“z”:“5948f6d6.2e0478”,“name”:“10s Ping”,“topic”:"",“payload”:"",“payloadType”:“date”,“repeat”:“10”,“crontab”:"",“once”:false,“onceDelay”:0.1,“x”:110,“y”:150,“wires”:[[“37ae92a9.d7d7de”]]},{“id”:“7ac6d5d5.9a5c6c”,“type”:“http request”,“z”:“5948f6d6.2e0478”,“name”:“Fronius”,“method”:“GET”,“ret”:“txt”,“url”:“http://192.168.0.11/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData",“tls”:"",“x”:505,“y”:151,“wires”:[[“a9cfbdae.041d5”]]},{“id”:“a9cfbdae.041d5”,“type”:“json”,“z”:“5948f6d6.2e0478”,“name”:"",“property”:“payload”,“action”:"",“pretty”:true,“x”:651,“y”:149,“wires”:[[“bd52e4dc.fa7728”,“9593ad35.c187”,“c41d832.acd468”,“e19ca8a1.3dfcd8”,“7f4bc525.ae3afc”,“6861e9ee.053448”,“fc1983d6.6b2fa”,“709c31ca.5787b”,“2e949744.f43168”,“d06d091c.fa9428”,“a89e54a4.f47088”]]},{“id”:“bd52e4dc.fa7728”,“type”:"mqtt out”,“z”:“5948f6d6.2e0478”,“name”:"",“topic”:“tele/fronius/STATE”,“qos”:“0”,“retain”:“false”,“broker”:“63c06b21.e27344”,“x”:850,“y”:150,“wires”:[]},{“id”:“c41d832.acd468”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“Day Energy (W)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.DAY_ENERGY.Value”,“x”:850,“y”:350,“wires”:[]},{“id”:“e19ca8a1.3dfcd8”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“Error code”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.DeviceStatus.ErrorCode”,“x”:840,“y”:200,“wires”:[]},{“id”:“7f4bc525.ae3afc”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“Freqency (Hz)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.FAC.Value”,“x”:850,“y”:400,“wires”:[]},{“id”:“6861e9ee.053448”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“AC Current (I)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.IAC.Value”,“x”:850,“y”:450,“wires”:[]},{“id”:“fc1983d6.6b2fa”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“DC Current (I)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.IDC.Value”,“x”:850,“y”:500,“wires”:[]},{“id”:“709c31ca.5787b”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“AC Volt (V)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.UAC.Value”,“x”:840,“y”:550,“wires”:[]},{“id”:“2e949744.f43168”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“DC Volt (V)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.UDC.Value”,“x”:840,“y”:600,“wires”:[]},{“id”:“d06d091c.fa9428”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“Total Power (W)”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.TOTAL_ENERGY.Value”,“x”:850,“y”:650,“wires”:[]},{“id”:“2abda7a9.5dcfc8”,“type”:“comment”,“z”:“5948f6d6.2e0478”,“name”:“Status codes”,“info”:“0-6 Startup \n7 Running \n8 Standby \n9 Bootloadingd \n10 Error “,“x”:1040,“y”:250,“wires”:[]},{“id”:“a89e54a4.f47088”,“type”:“debug”,“z”:“5948f6d6.2e0478”,“name”:“Status code”,“active”:false,“tosidebar”:true,“console”:false,“tostatus”:true,“complete”:“payload.Body.Data.DeviceStatus.StatusCode”,“x”:840,“y”:250,“wires”:[]},{“id”:“cbb73493.5d5608”,“type”:“comment”,“z”:“5948f6d6.2e0478”,“name”:“Error Code”,“info”:“0 OKAY Request successfully finished, Data are valid \n1 NotImplemented The request or a part of the request is not implemented yet \n2 Uninitialized Instance of APIRequest created, but not yet configured \n3 Initialized Request is configured and ready to be sent \n4 Running R equest is currently being processed (waiting for response) \n5 Timeout Response was not received within desired time \n6 Argument Error Invalid arguments/combination of arguments or missing arguments \n7 LNRequestError Something went wrong during sending/receiving of LN-message \n8 LNRequestTimeout LN-request timed out \n9 LNParseError Something went wrong during parsing of successfully received LN-message \n10 ConfigIOError Something went wrong while reading settings from local config \n11 NotSupported The operation/feature or whatever is not supported \n12 DeviceNotAvailable The device is not available \n255 UnknownError undefined runtime error”,“x”:1030,“y”:200,“wires”:[]},{“id”:“37ae92a9.d7d7de”,“type”:“time-range-switch”,“z”:“5948f6d6.2e0478”,“name”:“sunrise/sunset”,“lat”:”-32.3469794”,“lon”:“115.8009645”,“startTime”:“sunrise”,“endTime”:“sunset”,“startOffset”:0,“endOffset”:0,“x”:310,“y”:150,“wires”:[[“7ac6d5d5.9a5c6c”],[]]},{“id”:“63c06b21.e27344”,“type”:“mqtt-broker”,“z”:"",“name”:“Mqtt Broker”,“broker”:“192.168.0.2”,“port”:“1883”,“clientid”:"",“usetls”:false,“compatmode”:true,“keepalive”:“60”,“cleansession”:true,“birthTopic”:"",“birthQos”:“0”,“birthPayload”:"",“closeTopic”:"",“closeQos”:“0”,“closePayload”:"",“willTopic”:"",“willQos”:“0”,“willPayload”:""}]

Hi Guys,

I’m looking at including this data into HA but think i need a database setup first so not the waste space and cpu on my hassio machine.

For those whos inverter stops reporting at sunset you can enable it to stay on via the inverters settings. Username is admin and the password was set up to be my wifi one at time of install.

Then under the Fronius solar.web tab select yes for logging during night hours. I have a smart meter put in to track power usage of the house so i needed to enable this to get night time statistics.

Hi @paul2nz, and thank you for your contribution!
In order to make it work, though, I had to make 2 changes (Hass.io 0.91.1):

  • The URL of the second link is broken (lacks a “o” in “community”)
  • The string “value_json” in MQTT Sensor has to ba changed in “json_value”

Hope this helps others!

Hi,

This looks good as I use Node Red for my HA.

I am just getting some solar quotes and am looking at Fronius. Is the Smart Meter required for your node to work?

Thanks
Nick

I have made some posts and have used Fronius in Home Assistant. I think that there will be a component very soon as well for Fronius.

The posts is sometimes in swedish but google translate should do the job.

http://www.planet4.se/solceller-del-3-grafana-home-assistant-och-magic-mirror/

looks good

I have a Fronius inverter being installed in a couple of weeks so I really hope that a HA component is released soon. It will make the integration very neat and tidy

I have created a basic Fronius custom component.

It just reads Common Data from one device.

Should be enough to get the basic sensors in HA.

2 Likes

Just add will check in the morning when the sun comes up to see if every thing is working

have don everything but its not showing up I using 0.95 have you tested on this? or have I don’t something worry
this is what I put in for ip address
ip_address: 192.168.0.XXX

Yes, using 0.95

Check that you can see the data in your browser by calling it directly.

The URL is
http://IP_ADDRESS/GetInverterRealtimeData.cgi?Scope=Device&DeviceId =0& DataCollection=CommonInverterData

If it doesn’t work, change the DeviceID to 1

Once you have that working, then set the device in your config to match.

Also check the logs.


Is this what you want me to do it didn’t work.

“If it doesn’t work, change the DeviceID to 1” do I do that in my Fronius Box on the wall??

or its this

Capture

Still not working may have to find out what Device ID I have to use @safepay

Thanks. So that shows that the API endpoint is not found.
Maybe your inverter doesn’t support this service?
The Component is based on the Fronius docs here:

You could try one of the other URL’s:
http://192.168.0.XXX/solar_api/GetAPIVersion.cgi
to see if you get any responses.

What Inverter model are you using?

1 X Fronius Primo 5.0 -1 International Model - single phase, 5 kilowatt inverter (Austria)
(Rated at 5kw)

that worked

Capture

I have the same issue test url does not work tried id 1 and 0
testing using the above gives
{
“APIVersion” : 1,
“BaseURL” : “/solar_api/v1/”,
“CompatibilityRange” : “1.5-14”
}

my rest sensors work fine

- platform: rest
   name: "Solar Power"
   resource: http://192.168.0.##/solar_api/v1/GetPowerFlowRealtimeData.fcgi
   value_template: '{{ value_json.Body.Data.Site.P_PV }}'
   unit_of_measurement: 'W'
 - platform: rest
   name: "Solar Day Total"
   resource: http://192.168.0.##/solar_api/v1/GetPowerFlowRealtimeData.fcgi
   value_template: '{{ value_json.Body.Data.Site.E_Day }}'
   unit_of_measurement: 'W'
 - platform: rest
   name: "Solar Day Total"
   resource: http://192.168.0.##/solar_api/v1/GetPowerFlowRealtimeData.fcgi
   value_template: '{{ value_json.Body.Data.Site.E_Day }}'
   unit_of_measurement: 'W' 
1 Like

Apologies, I posted the incomplete URL
Should have been:

http://IP_ADDRESS/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=0&DataCollection=CommonInverterData