Fetching data from a url includes errors

I am able to view weather station data via my LAN using , which returns, eg
{"data":{"did":"001D0A712D46","ts":1612953797,"conditions":[{"lsid":352807,"data_structure_type":1,"txid":1,"temp": 32.2,"hum":83.6,"dew_point": 27.8,"wet_bulb": 30.4,"heat_index": 32.2,"wind_chill": 32.1,"thw_index": 32.1,<<<SNIP>>>

It could be due to a timing issue (ie how often the url updates and how often my Timestamp calls), but whilst I do get what I want every now and again, I also see lots of errors as well.

The "Error: socket hang up" comes from the http request node

Whilst the "TypeError: Cannot read property 'conditions' of undefined" comes from the function node

How can I sync the timings better? Or is there a different cause to what I have thought?


Well you are rather hammering what is probably a small embedded device that may not be the best web server in the world. Maybe try slowing down the requests - after all how quickly does the weather change in your area ?

1 Like

I was "hammering" it during set up only, but will slow it down to see if it makes any difference to the errors

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.