[Solved] Fronius binding issues, Symo Gen 24 inverter and Fronius Smartmeter 65A

@JimT

I´m running openhabian 3.3.0 release, (just upgradede from 3.1).

I cant seem to get the fronius binding to work. I have the bridge up running, but my inverter (Symo Gen 24) and my Smartmeter does not work. When I add them I get “Invalid JSON data receiver”

the deviceID does not seem to be optional…

If it’s the first unit, deviceID = 1

see if you can get the data from the inverter using
192.168.5.7/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=3PInverterData

but change the IP address to what it needs to be for you

if you dont specify a device ID the result is:
“Reason”: “CGI-Args: Invalid parameter ‘’ for attribute ‘DeviceId’ (must be numeric)”,

@RZomerman I tried the above, but I get no usefull result…

PS C:\WINDOWS\system32> 10.4.28.169/solar_api/v1/GetInverterRealtimeData.cgi?
At line:1 char:13

  • 10.4.28.169/solar_api/v1/GetInverterRealtimeData.cgi?
  •         ~
    

You must provide a value expression following the ‘/’ operator.
At line:1 char:13

  • 10.4.28.169/solar_api/v1/GetInverterRealtimeData.cgi?
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    

Unexpected token ‘solar_api/v1/GetInverterRealtimeData.cgi?’ in expression or statement.
+ CategoryInfo : ParserError: (:slight_smile: [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : ExpectedValueExpression

The is the debug output.

2022-11-06 18:03:31.806 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fronius:powerinverter:af42566023:803841959c' changed from UNINITIALIZED (DISABLED) to INITIALIZING
==> /var/log/openhab/openhab.log <==
2022-11-06 18:03:31.815 [DEBUG] [rnal.handler.FroniusBaseThingHandler] - Initializing Fronius Symo Inverter Service
==> /var/log/openhab/events.log <==
2022-11-06 18:03:31.820 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fronius:powerinverter:af42566023:803841959c' changed from INITIALIZING to UNKNOWN
2022-11-06 18:03:32.906 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MySmartPlug1Power' changed from 12.881369 to 13.061994
2022-11-06 18:03:32.909 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'MySmartPlug1Voltage' changed from 242.599674 to 242.685329
==> /var/log/openhab/openhab.log <==
2022-11-06 18:03:32.871 [DEBUG] [rnal.handler.FroniusBaseThingHandler] - Received Invalid JSON Data
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:963) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:928) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:877) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:848) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBaseThingHandler.collectDataFromUrl(FroniusBaseThingHandler.java:170) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusSymoInverterHandler.getRealtimeData(FroniusSymoInverterHandler.java:214) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusSymoInverterHandler.updateData(FroniusSymoInverterHandler.java:190) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusSymoInverterHandler.handleRefresh(FroniusSymoInverterHandler.java:64) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBaseThingHandler.refresh(FroniusBaseThingHandler.java:136) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBridgeHandler.lambda$0(FroniusBridgeHandler.java:130) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:384) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215) ~[?:?]
	... 16 more
2022-11-06 18:03:32.923 [DEBUG] [rnal.handler.FroniusBaseThingHandler] - Exception caught in refresh() for 803841959c
org.openhab.binding.fronius.internal.FroniusCommunicationException: Invalid JSON data received
	at org.openhab.binding.fronius.internal.handler.FroniusBaseThingHandler.collectDataFromUrl(FroniusBaseThingHandler.java:198) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusSymoInverterHandler.getRealtimeData(FroniusSymoInverterHandler.java:214) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusSymoInverterHandler.updateData(FroniusSymoInverterHandler.java:190) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusSymoInverterHandler.handleRefresh(FroniusSymoInverterHandler.java:64) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBaseThingHandler.refresh(FroniusBaseThingHandler.java:136) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBridgeHandler.lambda$0(FroniusBridgeHandler.java:130) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:963) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:928) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:877) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:848) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBaseThingHandler.collectDataFromUrl(FroniusBaseThingHandler.java:170) ~[?:?]
	... 11 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:384) ~[?:?]
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:963) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:928) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:877) ~[?:?]
	at com.google.gson.Gson.fromJson(Gson.java:848) ~[?:?]
	at org.openhab.binding.fronius.internal.handler.FroniusBaseThingHandler.collectDataFromUrl(FroniusBaseThingHandler.java:170) ~[?:?]
	... 11 more
==> /var/log/openhab/events.log <==
2022-11-06 18:03:32.933 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fronius:powerinverter:af42566023:803841959c' changed from UNKNOWN to OFFLINE (COMMUNICATION_ERROR): Invalid JSON data received
2022-11-06 18:03:34.515 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fronius:powerinverter:af42566023:803841959c' changed from OFFLINE (COMMUNICATION_ERROR): Invalid JSON data received to UNINITIALIZED
2022-11-06 18:03:34.532 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'fronius:powerinverter:af42566023:803841959c' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)

I found the reason for the issue above.
In the datalogger (inverter) setup, access to the solar API was disbaled.
After enabled the access, inverter and smartmeter came online just fine, using default ID´s.

1 Like

Great find! Perhaps this should be documented to help others in the future.

Agree, its worth mention.