[SOLVED] Parsing data from a GET request


#21

Hmm, ok, I’m not sure where it’s being introduced… look at the difference between these two sets of data.

Bad…
{“TempOut”:“84”,“HumOut”:“70”,“DewPnt”:“73”,“WindSpeed”:“7”,“WindGust”:“6”,“WindDirection”:“WSW”,“DailyPrecip”:“0.16”,“HourlyPrecip”:“0.000”,“Solar”:“708”,“TimeOfDay”:“Afternoon”,“MaxDaylight”:“14:52”,“Conditions”:“Dry”,“Conditions_Detail”:“Its Afternoon,Dry and it feels Warm outside. The temperature has been rising for the last few hours. There is a Gentle Breeze from the West south west”,“AverageTempMoth”:“58.4”,“AverageTempDay”:“69.8”,“HighTemp”:“84”,“LowTemp”:“62” }

Good…
{"TempOut":"84","HumOut":"70","DewPnt":"73","WindSpeed":"7","WindGust":"6","WindDirection":"WSW","DailyPrecip":"0.16","HourlyPrecip":"0.000","Solar":"708","TimeOfDay":"Afternoon","MaxDaylight":"14:52","Conditions":"Dry","Conditions_Detail":"Its Afternoon,Dry and it feels Warm outside. The temperature has been rising for the last few hours. There is a Gentle Breeze from the West south west","AverageTempMoth":"58.4","AverageTempDay":"69.8","HighTemp":"84","LowTemp":"62"}


#22

Yes, I see that. In my text editor and in the display image of the piston I posted shows a regular quotes.
Odd


#23

Maybe just copy the quote and paste it :slight_smile:


#24

"


#27

OK, here is the solution. The problem was the entire data $response needed to be encapsulated inside {}
Once I did that the variables populate. Thanks for getting me closer to solving this with the other data formatting. Now I can write a piston that gets data directly from my station without needing to go to the cloud to get it. To anyone out there with your own stations, if you use “Weather Display” software you can do the same thing. Maybe other software does the same so check to see if you can write your own data formats. Sample Piston attached. Thanks again!!!


#28

Ah, good you got it figured out. I enclosed the data you posted in {} in my mocking setup which is probably why it worked for my test.