20.05.2020, 16:40
Hello
I am trying to read this data with the Api provided by the manufacturer and I am having problems as it gives me the following error.
when I try to read item "1"
Error de sintaxis en la linea 28: ')' expected near '.1'
Assistant screenshot
The first thing I have to do is comment on the following variables because otherwise I can't read anything
Assistant screenshot
--potencia = data.PAC.Values
--total = data.TOTAL_ENERGY
so that at least read the variable "day"
and point only to the "Values" element so that it returns the 2 values in the "log"
Where is the error, how could I read all the values of the elements?
Thank you
API
{
"Body":{
"Data":{
"DAY_ENERGY":{
"Unit":"Wh",
"Values":{
"1":56350,
"2":85580
}
},
"PAC":{
"Unit":"W",
"Values":{
"1":7018,
"2":10434
}
},
"TOTAL_ENERGY":{
"Unit":"Wh",
"Values":{
"1":7979740,
"2":6941850
}
},
"YEAR_ENERGY":{
"Unit":"Wh",
"Values":{
"1":4525021,
"2":6941852
}
}
}
},
"Head":{
"RequestArguments":{
"DeviceClass":"Inverter",
"Scope":"System"
},
"Status":{
"Code":0,
"Reason":"",
"UserMessage":""
},
"Timestamp":"2020-05-20T16:45:38+02:00"
}
}
I am trying to read this data with the Api provided by the manufacturer and I am having problems as it gives me the following error.
when I try to read item "1"
Error de sintaxis en la linea 28: ')' expected near '.1'
Assistant screenshot
The first thing I have to do is comment on the following variables because otherwise I can't read anything
Assistant screenshot
--potencia = data.PAC.Values
--total = data.TOTAL_ENERGY
so that at least read the variable "day"
and point only to the "Values" element so that it returns the 2 values in the "log"
Where is the error, how could I read all the values of the elements?
Thank you
API
{
"Body":{
"Data":{
"DAY_ENERGY":{
"Unit":"Wh",
"Values":{
"1":56350,
"2":85580
}
},
"PAC":{
"Unit":"W",
"Values":{
"1":7018,
"2":10434
}
},
"TOTAL_ENERGY":{
"Unit":"Wh",
"Values":{
"1":7979740,
"2":6941850
}
},
"YEAR_ENERGY":{
"Unit":"Wh",
"Values":{
"1":4525021,
"2":6941852
}
}
}
},
"Head":{
"RequestArguments":{
"DeviceClass":"Inverter",
"Scope":"System"
},
"Status":{
"Code":0,
"Reason":"",
"UserMessage":""
},
"Timestamp":"2020-05-20T16:45:38+02:00"
}
}