I am new to openhab & just starting out. I have tried using examples & other forum posts to address my problem with no success. I am using openhab 1.7 on Raspberry PI.
I am trying to get my current PV output power (amongst other items) - PAC from a Fronius Symo inverter, using JSONPATH to extract the value from a js object. I am using the following ITEM:
Number Current_Power “Current Power [%.1f Kw]” (Solar) {http="<[http:///solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=1&DataCollection=CommonInverterData:10000:JSONPATH($…Body…PAC.Value.)]"}
But I am seeing the following errors in my openhab log file & there is no value updated on the web page.
2016-03-03 11:28:06.270 [DEBUG] [g.openhab.io.net.http.HttpUtil] - About to execute 'http:///solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceID=1&DataCollection=CommonInverterData’
2016-03-03 11:28:07.096 [DEBUG] [g.openhab.io.net.http.HttpUtil] - {
“Head” : {
“RequestArguments” : {
“DataCollection” : “CommonInverterData”,
“DeviceClass” : “Inverter”,
“DeviceId” : “1”,
“Scope” : “Device”
},
“Status” : {
“Code” : 0,
“Reason” : “”,
“UserMessage” : “”
},
“Timestamp” : “2016-03-03T11:08:53+11:00”
},
“Body” : {
“Data” : {
“DAY_ENERGY” : {
“Value” : 10560,
“Unit” : “Wh”
},
“FAC” : {
“Value” : 49.98,
“Unit” : “Hz”
},
“IAC” : {
“Value” : 16.04,
“Unit” : “A”
},
“IDC” : {
“Value” : 15.09,
“Unit” : “A”
},
“PAC” : {
“Value” : 3921,
“Unit” : “W”
},
“TOTAL_ENERGY” : {
“Value” : 10471064,
“Unit” : “Wh”
},
“UAC” : {
“Value” : 244.2,
“Unit” : “V”
},
“UDC” : {
“Value” : 346.9,
“Unit” : “V”
},
“YEAR_ENERGY” : {
“Value” : 1500613,
“Unit” : “Wh”
},
“DeviceStatus” : {
“StatusCode” : 7,
“MgmtTimerRemainingTime” : -1,
“ErrorCode” : 0,
“LEDColor” : 2,
“LEDState” : 0,
“StateToReset” : false
}
}
}
}
2016-03-03 11:28:07.098 [DEBUG] [.JSonPathTransformationService] - about to transform ‘{
“Head” : {
“RequestArguments” : {
“DataCollection” : “CommonInverterData”,
“DeviceClass” : “Inverter”,
“DeviceId” : “1”,
“Scope” : “Device”
},
“Status” : {
“Code” : 0,
“Reason” : “”,
“UserMessage” : “”
},
“Timestamp” : “2016-03-03T11:08:53+11:00”
},
“Body” : {
“Data” : {
“DAY_ENERGY” : {
“Value” : 10560,
“Unit” : “Wh”
},
“FAC” : {
“Value” : 49.98,
“Unit” : “Hz”
},
“IAC” : {
“Value” : 16.04,
“Unit” : “A”
},
“IDC” : {
“Value” : 15.09,
“Unit” : “A”
},
“PAC” : {
“Value” : 3921,
“Unit” : “W”
},
“TOTAL_ENERGY” : {
“Value” : 10471064,
“Unit” : “Wh”
},
“UAC” : {
“Value” : 244.2,
“Unit” : “V”
},
“UDC” : {
“Value” : 346.9,
“Unit” : “V”
},
“YEAR_ENERGY” : {
“Value” : 1500613,
“Unit” : “Wh”
},
“DeviceStatus” : {
“StatusCode” : 7,
“MgmtTimerRemainingTime” : -1,
“ErrorCode” : 0,
“LEDColor” : 2,
“LEDState” : 0,
“StateToReset” : false
}
}
}
}’ by the function '$…Body…PAC.Value.'
2016-03-03 11:28:07.100 [DEBUG] [.JSonPathTransformationService] - transformation resulted in '[3921]'
2016-03-03 11:28:07.100 [DEBUG] [.o.b.http.internal.HttpBinding] - transformed response is '[3921]'
2016-03-03 11:28:07.101 [DEBUG] [.o.b.http.internal.HttpBinding] - Couldn’t create state of type ‘class org.openhab.core.library.items.NumberItem’ for value '[3921]'
2016-03-03 11:28:07.103 [DEBUG] [ore.internal.items.ItemUpdater] - Received update of a not accepted type (StringType) for item Current_Power
2016-03-03 11:28:08.476 [DEBUG] [.o.m.c.i.folder.FolderObserver] - Refreshing folder ‘sitemaps’
If I have my item Current_Power as a STRING it works ok, but I would like to have it as a decimal number so that I can do calculations etc with it?
Any help would be appreciated.
Thanks