This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Api Error
#1
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"
  }
}
Reply


Messages In This Thread
Api Error - by arivera - 20.05.2020, 16:40
RE: Api Error - by Daniel - 20.05.2020, 16:47
RE: Api Error - by Erwin van der Zwart - 20.05.2020, 18:00
RE: Api Error - by arivera - 21.05.2020, 17:53
RE: Api Error - by Daniel - 21.05.2020, 18:41
RE: Api Error - by Erwin van der Zwart - 21.05.2020, 19:24
RE: Api Error - by arivera - 21.05.2020, 19:32

Forum Jump: