Efergy / Energyhive - JSON Transformation throws exception

I am finally migrating my Efergy / Energyhive system to OH3.2.0 (manual installation of Build #2546).
Here my setup in short (not shown here: my second Efergy account and period channels “day” and “week”; offset is related to my timezone).
I am using a “hybrid” approach: Things in UI and Items in config file.

Things (HTTP Binding):

UID: http:url:HTTP_ENERGIA
label: HTTP Energia
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://www.energyhive.com/mobile_proxy
  delay: 0
  stateMethod: GET
  refresh: 10
  commandMethod: GET
  contentType: text/plain
  timeout: 60000
  bufferSize: 2048
location: Home
channels:
  - id: PowerHouse
    channelTypeUID: http:string
    label: Potenza assorbita Casa
    description: null
    configuration:
      mode: READONLY
      unit: W
      stateExtension: /getCurrentValuesSummary?token=XXXXXXXXXXXXXXXXXXX
      stateTransformation: JS:efergy.js
  - id: EnergyMonthHouse
    channelTypeUID: http:string
    label: Energia mese Casa
    description: null
    configuration:
      mode: READONLY
      stateExtension: /getEnergy?token=XXXXXXXXXXXXXXXXXXX&period=month&offset=-60
      stateTransformation: JSONPATH:$.sum
  - id: EnergyCostMonthHouse
    channelTypeUID: http:string
    label: Costo Energia mese Casa
    description: null
    configuration:
      mode: READONLY
      unit: kWh
      stateExtension: /getCost?token=XXXXXXXXXXXXXXXXXXX&period=month&offset=-60
      stateTransformation: JSONPATH:$.sum

In the file efergy.js in “transform” folder:

JSON.parse(input)[0].data[0][Object.keys(JSON.parse(input)[0].data[0])[0]];

In Items file:

Number PowerHouse 	"Potenza assorbita Casa [%d W]" 	<energy> 		(G_Power, G_House) 	["Point_Measurement","Property_Power"] 	{channel="http:url:HTTP_ENERGIA:PowerHouse"} 
Number EnergyMonthHouse "Energia mese Casa [%.1f kWh]" 		<qualityofservice> 	(G_Power, G_House) 	["Point_Measurement","Property_Power"] 	{channel="http:url:HTTP_ENERGIA:EnergyMonthHouse"} 
Number EnergyCostMonthHouse "Costo Energia mese Casa [%.2f €]" 		<price> 	(G_Power,G_House) 	["Point_Measurement","Property_Power"] 	{channel="http:url:HTTP_ENERGIA:EnergyCostMonthHouse"} 

Works fine :grinning:

Just to update that today I abandoned the Efergy/EnergyHive power metering system due to huge lack of reliability since several months.
Too many times the readings fail by huge amounts and/or freeze even in the Efergy and EnergyHive apps :frowning: .
EnergyHive assistance do what they can, due they admit they stopped supporting this system.
I switched to Shelly, using ShellyEM for the mains of my apartment and Shelly1PM for the garage.
I then have several Shelly2.5s and ShellyPlugs for sub-loads.
These are currently good solutions, although the Shelly app still has few bugs there is great and easy integration with Openhab (3.4.2).
Take your considerations.