I have a function node, f1, which triggers a trigger node so that it (the trigger node) starts generating pulses according to an interval. The pulses trigger another function node, f2, which simulates data for a given time period. When the simulation is done, f2 should somehow tell the trigger node to stop generating the pulse, and according to the trigger node this is done by sending a message with the reset property set. The problem is that the trigger node can't receive input from two different sources.... How do I solve this?
Why not? I have triggers with 4 different sources.
Maybe you can show us what you got so fare.
Oh, really? I tried connecting multiple inputs and the program stopped responding and then there was ”unexpected error”. Not at the computer right now, can take a printscreen soon.
I forgot there is a switch also. I added a wire from MoveLaglyftare0 back to "resend every 1000ms" and now, everytime i try to trigger the flow with an inject node, nothing happens, the program stop responding, and then "unexpected error (504)".
Which is f1 and which is f2? Also you now have a loop where every second you are sending a message to the function node. What happens if you chang the time from 1000ms to 5000ms? You will still have an infinate loop but resourcse may be freed up to allow it to run.
SetContextVars = f1. MoveLaglyftare0 = f2.
I dont understand. It's not supposed to be an infinite loop because f2 should tell the triggernode to stop after a while.
debug node on the output of the 'SetContextVars' node and the top output of the
switch and show what is happening.
Nothing happens. No response.
It works, after a little change in the flow, on my local red node installation but still not on the Ec2 on AWS... I guess there is something with my EC2.
do you realize what you just said makes no sense to me?
It works, after a little change in the flow,
but you don't say what you changed
still not on the Ec2 on AWS
and just what might that be?
You are right. But I dont think it matters because it obviously has nothing to do with the flow that I built since the same flow works on my local machine and not on the EC2.
When I copied the flow from EC2 to my local machine it started giving outputs, which the EC2 didnt. So the only difference is the installation and the os on which NodeRed is run. What specifically could cause this? There is no error ouput as I said.
What is an EC2?
What version of NR and node.js is it running?
An (edit:)ubuntu AWS-server.
Node-RED version: v0.19.5
Node.js version: v10.19.0
And what version of NR are you running on your Pi?
On ubuntu, not pi:
Node-RED version: v1.0.3
Node.js version: v12.16.1
I guess I should upgrade the ones on Ec2...
That's where I would start....might want to update the Pi too.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.