Openweather problem - sorry folks. I goofed

See my other thread:

Alas I (we) got distracted from the real problem.

At the start I was getting messages saying the node was giving non-valid JSON messages.

That digressed into the link-call not returning and I accidentally accepted that as the solution.

But it didn't address the original problem.

Screenshot from 2024-04-11 06-18-02

The node was called at 00:00, 01:00, 02:00, 03:00. 04:00, 05:00, and 06:00.

Why did it fail with the 01:00 call and The API call returned invalid JSON?

But only at the one time today?

Is this a http request node call?

If you add a debug node after it, what is actually returned when good and when invalid json?

Is the http request node set to return a parsed JS object?

If so could the return not a JSON when error is thrown?

If you set to output a utf8 string, can you then check statusCode?

If statusCode is 200, could you then direct to a JSON node, and if not 200 handle the return differently?

Ummmm........ To be honest, I am not sure.

I send a message into the node and get back a JSON message that contains the weather at this point in time - and other stuff.

99.9% of the time it works.

Recently it has started to be difficult and I get these messages.

This is what I am seeing - kind of again - and note how the 01:00 message is missing.

Yes, there is a slight problem with how I am seeing the messages in that the objects aren't expanded and therefore readable.

But that the error happened at 01:00 and the 01:00 message is missing I'd say there is some relationship there.

And... (sorry)

This seems to only happen at night.

If I send messages into the node at other times it works.

See new screenshot at the top all the crossed out stuff.
That was me testing it last night.

(Dug around and looked at some logs.)

EDITED to remove other things that happened.

This is an extract from my error log WRT this node.

===================
When 2024-03-08 02:00:15
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

===================
When 2024-04-08 08:00:19
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

===================
When 2024-04-08 12:00:35
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

===================
When 2024-04-10 02:00:22
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

===================
When 2024-04-10 10:00:10
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

===================
When 2024-04-10 11:00:11
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

===================
When 2024-04-11 01:00:11
Who ERROR_REPORT/BedPi/PlantWateringControl
Where 8b3d501f37079bdf
What The API call returned invalid JSON
===================

It seems to have started on 8 March and is happening at different times.

Alas all/most of them when I am not at home.
Not that that will really mean much.

I'm not sure when I started but I call the node every hour from Mid-night to 12:00 (within that minute at least.) Done from a trigger node to re-send every hour. So if it gets the message a bit after THE EXACT hour, it will show. (Not a big deal)

I may switch it to on time and see what happens just to test/establish ..... something.

I'm not sure it will really help as the node isn't failing constantly, and when I was testing things last night it was working with every inject I did.

Recent edits to flow.

From what I can remember I have created a new message going into the openweather node very recently as I saw some weird messages going into it.
I HAD a link-call used to call this part of the code but have since replaced it with link-out and link-in nodes.
It was pointed out if I corrupted the message, it wouldn't/couldn't be returned as it didn't know it's origin.
Edited/tidied up some code in nodes DOWNSTREAM from the node, so I'm not sure they really have any change on that node's output.

Screenshots with hundreds of nodes and debug messages with next to no info are not great for diagnosing issues.

As mentioned above, set the a http node with the request to out put a utf8 string and set a debug to output complete message object. Then capture a good return and a bad return (invalid json). We can then compare the returns and offer fixes.

I asked questions in previous response, the answer to these question would help formulate a possible issue and solution.

Sorry, which http node?

Well i did ask questions , but got no answers to them, so i assumed (no i'm a ass silly me). I see by the edit of the last post from you, that you now mention openweather node, which when i used it can sometimes have socket timeout issues, so i moved to http requests.

We would still need to see the responses from the open weather node then to ascertain any issue.

The node is openweather.

I DON'T KNOW.

Is that a good enough answer.

I put in the location I want the weather for, the API KEY,

I can't see any of those options.

I have since added a log to file bit of code so I can see what is logged tomorrow.
But until then, I am not able to just produce the error as it happens when IT wants to.

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