I’m getting some
API error in call service node.
If I try to trigger them manually with an inject node they work fine. If they are triggered by the flow They fails with a generic API error.
I get this error on the last nodes in the chain only.
How can I troubleshoot this issue?
Your best friend is the debug node if I have a problem with a flow I put a debug at each node within the flow to capture what the payload is doing. It can also be handy to know what the entire msg is not just the payload you can check that like below.
Also you should inject from the entire flow first to see where it breaks down then you can inject just to the parts of the flow that aren’t working till you find your issue. API Error normally indicates incorrect entity or service call though.
@jimpower I’m a beginner using node-RED but I understood that i.e. service node sends a request to HA when a payload is received.
So I did some tests and any payload message is arriving to the node it sends the request as configured not depending from the payload received. That is what happens if I manually trigger the node. SO I expect it works same way automatically.
Am I wrong?
Its a bit hard to make out from that image but it looks like your json is wrong should look like this
"title": "HA Alarm",
"message": "Alarm home mode is armed"
if you press the 3 little dots on the right it will open out for you to see data object
Try setting output location to
none on the input_boolean call service node
@jimpower Here you are my Json.
It looks like yours…
"title": "Bucato terminato",
"message": "La lavatrice ha finito. Ora puoi stendere il bucato"
I just didi it.
Anyway I have seen in the input_boolean call service node a red rounded box in the data filed like it expects something there but I cannot figure out what insert there.
Just for the records, I set the output location according to @Kermit suggestion and it looks that now it works fine.
also for me same error random
before work… after an unspecified time api error reappears
debug is empty
your snapshot does not show any debug nodes? Wont get anything in debug unless you have those nodes connected.