I've got a Solax inverter which has a web api i can call. I thought I could tweak a friend's flow for weather underground but on investigation the returned values are not in an array.
when I make a web request i get the following:
{"success":true,"exception":"Query success!","result":{"inverterSN":"xxxxxxxxxxxxx","sn":"xxxxx xxxxxxx","acpower":1329.0,"yieldtoday":3.0,"yieldtotal":183. 2,"feedinpower":578.0,"feedinenergy":31.97,"consumeenergy":7 1.02,"feedinpowerM2":0.0,"soc":30.0,"peps1":0.0,"peps2":null ,"peps3":null,"inverterType":"15","inverterStatus":"102","up loadTime":"2023-04-25 10:44:01","batPower":2170.0,"powerdc1":3472.0,"powerdc2":0.0 ,"powerdc3":null,"powerdc4":null,"batStatus":"0"}}
The code i was trying to use was processing this return from WeatherUnderground and seems to be already set up as an array called observations.
{"observations":[{"stationID":"xxxxxxxxxx","obsTimeUtc":"2023-04-25T09:45:04Z","obsTimeLocal":"2023-04-25 10:45:04","neighborhood":"xxxxxxxxxxxxxxxxxxxxx","softwareTy pe":null,"country":"GB","solarRadiation":623.0,"lon":0.754," realtimeFrequency":null,"epoch":xxxxxxxxxxxx,"lat":xxxxxxxxx xx,"uv":5.3,"winddir":23,"humidity":68.0,"qcStatus":1,"uk_hy brid":{"temp":7.9,"heatIndex":7.9,"dewpt":2.3,"windChill":6. 0,"windSpeed":10.8,"windGust":12.2,"pressure":1032.17,"preci pRate":0.00,"precipTotal":0.00,"elev":23.0}}]}
I was looking for a way to take my http return and turn it into an array so that i can assign the values to HS devices but I'm just not getting it even when using split/html edit node or converting to JSON.
I might be missing something obvious but banging my head up against the wall atm.
when I make a web request i get the following:
{"success":true,"exception":"Query success!","result":{"inverterSN":"xxxxxxxxxxxxx","sn":"xxxxx xxxxxxx","acpower":1329.0,"yieldtoday":3.0,"yieldtotal":183. 2,"feedinpower":578.0,"feedinenergy":31.97,"consumeenergy":7 1.02,"feedinpowerM2":0.0,"soc":30.0,"peps1":0.0,"peps2":null ,"peps3":null,"inverterType":"15","inverterStatus":"102","up loadTime":"2023-04-25 10:44:01","batPower":2170.0,"powerdc1":3472.0,"powerdc2":0.0 ,"powerdc3":null,"powerdc4":null,"batStatus":"0"}}
The code i was trying to use was processing this return from WeatherUnderground and seems to be already set up as an array called observations.
{"observations":[{"stationID":"xxxxxxxxxx","obsTimeUtc":"2023-04-25T09:45:04Z","obsTimeLocal":"2023-04-25 10:45:04","neighborhood":"xxxxxxxxxxxxxxxxxxxxx","softwareTy pe":null,"country":"GB","solarRadiation":623.0,"lon":0.754," realtimeFrequency":null,"epoch":xxxxxxxxxxxx,"lat":xxxxxxxxx xx,"uv":5.3,"winddir":23,"humidity":68.0,"qcStatus":1,"uk_hy brid":{"temp":7.9,"heatIndex":7.9,"dewpt":2.3,"windChill":6. 0,"windSpeed":10.8,"windGust":12.2,"pressure":1032.17,"preci pRate":0.00,"precipTotal":0.00,"elev":23.0}}]}
I was looking for a way to take my http return and turn it into an array so that i can assign the values to HS devices but I'm just not getting it even when using split/html edit node or converting to JSON.
I might be missing something obvious but banging my head up against the wall atm.
Comment