Monitor Fronius Primo 5

Hi All, has anyone had any success with the Fronius smart meter and emonhub? I have my inverter (fronius primo 5) reading correctly but it would be great to read the smart meter also.
Thanks!

What is yout problem?

Missatge de Mike Christiansen via Community [email protected] del dia dl., 4 de març 2019 a les 21:34:

I just wondered if anyone was doing this and if they were wanting to share their configuration files. Reading this Allow reading Modbus TCP holding registers from multiple units by btm · Pull Request #44 · openenergymonitor/emonhub · GitHub looks to be doable adding something like “nUnit = 1,1,2,2” referencing the device id and register the data sits in.

Hi All,

Im still working on finding the correct registers for my fronius primo 5kw and single phase smart meter (rs485)

My interfaces config is below

Any one have any idea on which registers to use to access the production (Watts) of MPPT1 and MPPT2 ? I can get voltage but not current or watts. Also it would be nice to monitor the inverter temperature but the entry I have below gives a not changing value.

[[ModbusTCP]]
#this interfacer retrieves register information from modbusTCP clients
#retrieve register information from modbus TCP documentation for your inverter.
      Type = EmonModbusTcpInterfacer
     #Type = EmonFroniusModbusTcpInterfacer
    [[[init_settings]]]
	    modbus_IP = 192.168.80.107   # ip address of client to retrieve data from
	    modbus_port = 502          # Portclient listens on
    [[[runtimesettings]]]
        #List of starting registers for items listed above
	      register = 40118,40092,40102,502,40114,40305,40284,40304,40138,40130,40098
              nUnit = 1,1,1,1,1,1,1,1,240,240,240
       #names=Inverter_status,AC_power_watts,AC_LifetimekWh,DayWh,Temp,mppt2,Vmppt1,Vmppt2,MeterTotWhImp,MeterTotWhExp,MeterWats
        #nodeid used to match with node definition in nodes section below. Can be set to any integer value not previously used.
	      nodeId = 12
        #Channel to publish data to should leave as ToEmonCMS
             pubchannels = ToEmonCMS,
        #time in seconds between checks, This is in addition to emonhub_interfacer.run() sleep time of .01
        #use this value to set the frequency of data retrieval from modbus client
        interval = 15

Hi,

An example that is wokring with 9.9.5

[hub]

### loglevel must be one of DEBUG, INFO, WARNING, ERROR, and CRITICAL

#loglevel = DEBUG

loglevel = WARNING

### Uncomment this to also send to syslog

# use_syslog = yes

[interfacers]

### This interfacer manages the RFM12Pi/RFM69Pi/emonPi module

[[ModbusTCP]]

# this interfacer retrieves register information from modbusTCP clients

# retrieve register information from modbus TCP documentation for your inverter.

Type = EmonModbusTcpInterfacer

[[[init_settings]]]

modbus_IP = 192.169.11.1   # ip address of client to retrieve data from

modbus_port = 502          # Portclient listens on

[[[runtimesettings]]]

# List of starting registers for items listed above

register = 40118,40092,40102,502,506,510,40098,40130,40138,40080,40100,40102

# nodeid used to match with node definition in nodes section below. Can be set to any integer value not previously used.

nodeId = 12

#1 inverter 240 smart meter

nUnit = 1,1,1,1,1,1,240,240,240,240,240,240

# Channel to publish data to should leave as ToEmonCMS

pubchannels = ToEmonCMS,

# time in seconds between checks, This is in addition to emonhub_interfacer.run() sleep time of .01

# use this value to set the frequency of data retrieval from modbus client

interval = 10

Missatge de klxout [email protected] del dia dg., 10 de març 2019 a les 21:09:

Thanks Klxout,

Looks great. Can you include your node12 config for the names of the register values. Specifically I am unsure on the values 506 and 510.

Thanks a lot for your help! Ive spent hours trawling through data sheets and can’t find registers that work anywhere!

[[12]]

nodename = fronius

[[[rx]]]

# list of names of items being retrieved

# This example retrieves the Inverter status, AC power in watts being produced, AC Lifetime KWh produced,

# KWh produced for current day,....

names = Inverter_status,AC_power_watts,AC_LifetimekWh,DayWh,YearWh,TotalWh,sm_Power_watts,sm_TotWhExp,sm_TotWhImp,sm_PhV,sm_WphA,consum

datacodes = H,f,f,Q,Q,Q,f,f,f,f,f,f

scales = 1,0.1,0.1,1,1,1,0.1,0.1,0.1,0.1,0.1,0.1

units = V,W,kWh,Wh,Wh,Wh,W,Wh,Wh,V,W,W

Missatge de Mike Christiansen via Community [email protected] del dia dl., 11 de març 2019 a les 8:39:

[Formated by pb66 - Please wrap code clips inbetween three backticks (```) in the line before and the line after for better readability)

Thanks Klxout,

I am still looking for the data locations of MPPT1 and MPPT2 production. I have 2 seperate arrays (split 45 degrees from north) and would find it interesting to see over a year which array makes more power.
Thanks.

@MikeC
Mike
I also have 2 arrays on my Primo 8, and have accessed both MPPTs through the inverter not the smart meter. I use registers 40285 and 40305, with scale factor from 40268. I’m not doing this through emonbase, but through a dedicated python script. I’ve not had a chance to include these into my emonbase yet (but have done Watts (DC & AC) and frequency). I’ll see if I can add them to the modbus TCP script.
I have noticed that there are frequent spurious readings, as you can see in the image below, not due to cloud cover. I am also export limited, so the inverter needs to cut output when total export exceeds 3kW. This may be why one string has a much greater variation in output than the other.

@MikeC
Mike
I just added the 2 MPPT registers to my emonhub config file and it seems to be working as expected. The 2 extra registers are: 40285,40305
2 extra nUnit = 1,1,1,1,1,1,1,1,1,1,1,1

and in node 30 (my fronius node value) an extra 2 fields at the end:
names = ID,L,A,W,Hz,VA,VAr,PF,WH,DCW,MPT1,MPT2
datacodes = H,H,f,f,f,f,f,f,f,f,H,H
scales = 1,1,0.1,0.1,0.1,0.1,0.1,0.1,1,0.1,0.1,0.1
units = V,W,kWh,Wh,W,W,V,V,V,V,W,W

Thanks Anthony,

They look good! Values total to be a little more than the AC output so I assume these are DC input values and are there subject to the efficiency of the inverter. I have them working, will test it out then post my entire config so anyone can use my example to read both the inverter and the meter values.

Thanks again!
MikeC

Yes, DC values. I think there is only a single AC output as 2 x MPPT DC outputs are combined prior to inversion.
Tony

Hi All,

Has anyone got Fronius Modbus working in Nodered?
Specifically interested as I need my fronius smart meter data quicker than the HTTP Get interface will give as I am using it to drive a control loop for a Victron inverter/charger.

Hi Mike
Not in Nodered, but I have a python script that interrogates my Primo 8. It should be possible to then transfer data via MQTT into Nodered - but maybe faster to just use the python data directly.
Tony

1 Like

Follow up from above, Ive managed to convert the modbus bite array to values in nodered. Below code (import from clipboard in nodered) takes modbus values from the meter for current watts and solar production as an example.

[{“id”:“3e402d10.eae442”,“type”:“function”,“z”:“1d166bc1.5914f4”,“name”:“Convert byte array to Float”,“func”:"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readFloatBE();\n\n// save the value\nmsg.payload = value;\n\nreturn msg;",“outputs”:1,“noerr”:0,“x”:460,“y”:380,“wires”:[[“254f0e98.583c6a”]]},{“id”:“81cd40a8.13f6a”,“type”:“modbus-read”,“z”:“1d166bc1.5914f4”,“name”:“Fronius PV production”,“topic”:"",“showStatusActivities”:false,“logIOActivities”:false,“showErrors”:true,“unitid”:“1”,“dataType”:“HoldingRegister”,“adr”:“40092”,“quantity”:“2”,“rate”:“10”,“rateUnit”:“s”,“delayOnStart”:false,“startDelayTime”:“10”,“server”:“5f926e56.44772”,“useIOFile”:false,“ioFile”:"",“useIOForPayload”:false,“x”:220,“y”:380,“wires”:[[],[“3e402d10.eae442”]]},{“id”:“254f0e98.583c6a”,“type”:“debug”,“z”:“1d166bc1.5914f4”,“name”:"",“active”:false,“tosidebar”:true,“console”:false,“tostatus”:false,“complete”:“false”,“x”:670,“y”:380,“wires”:[]},{“id”:“7424f35c.7a1bd4”,“type”:“function”,“z”:“1d166bc1.5914f4”,“name”:“Convert byte array to Float”,“func”:"// Create new Buffer based on array bytes\nconst buf = Buffer.from(msg.payload.buffer);\n\n// Represent these bytes as 32-bit unsigned int\nconst value = buf.readFloatBE();\n\n// save the value\nmsg.payload = value;\n\nreturn msg;",“outputs”:1,“noerr”:0,“x”:420,“y”:340,“wires”:[[]]},{“id”:“f6a8d714.c13508”,“type”:“modbus-read”,“z”:“1d166bc1.5914f4”,“name”:“Fronius Meter”,“topic”:"",“showStatusActivities”:false,“logIOActivities”:false,“showErrors”:true,“unitid”:“240”,“dataType”:“HoldingRegister”,“adr”:“40097”,“quantity”:“2”,“rate”:“1030”,“rateUnit”:“ms”,“delayOnStart”:false,“startDelayTime”:“10”,“server”:“5f926e56.44772”,“useIOFile”:false,“ioFile”:"",“useIOForPayload”:false,“x”:190,“y”:340,“wires”:[[],[“7424f35c.7a1bd4”]]},{“id”:“5f926e56.44772”,“type”:“modbus-client”,“z”:"",“name”:“Fronius”,“clienttype”:“tcp”,“bufferCommands”:false,“stateLogEnabled”:false,“tcpHost”:“192.168.80.12”,“tcpPort”:“502”,“tcpType”:“DEFAULT”,“serialPort”:"/dev/ttyUSB",“serialType”:“RTU-BUFFERD”,“serialBaudrate”:“9600”,“serialDatabits”:“8”,“serialStopbits”:“1”,“serialParity”:“none”,“serialConnectionDelay”:“100”,“unit_id”:"",“commandDelay”:“1”,“clientTimeout”:“1000”,“reconnectOnTimeout”:true,“reconnectTimeout”:“1000”,“parallelUnitIdsAllowed”:false}]