Behavior of RevPi DIO input nodes at turn on in a Node-Red setting
- Daniele.tampieri
- Posts: 14
- Joined: 03 Nov 2020, 21:58
Behavior of RevPi DIO input nodes at turn on in a Node-Red setting
The title says all: I'd like to know if a message is generated at turn on to make a Node-Red system aware of the status of DIO inputs. I see that when an input changes, the associated payload property assumes a string value "1": however the other properties have an integer 0 or 1 value, thus I'd like to know if a message is generated even there's no input variation.
Daniele Tampieri
- crismancich
- KUNBUS
- Posts: 40
- Joined: 05 Jan 2021, 11:25
- Location: Hamburg
- Contact:
Re: Behavior of RevPi DIO input nodes at turn on in a Node-Red setting
Hi Daniele,
use a start-up-trigger node with a RevPi get pin. Make sure you add some delay so that the pi is already botted up completely.
https://flows.nodered.org/node/node-red ... up-trigger
use a start-up-trigger node with a RevPi get pin. Make sure you add some delay so that the pi is already botted up completely.
https://flows.nodered.org/node/node-red ... up-trigger
Viele Grüße / Kind regards / Quapla’ / 此致敬意
Boris Crismancich
Boris Crismancich
- Daniele.tampieri
- Posts: 14
- Joined: 03 Nov 2020, 21:58
Re: Behavior of RevPi DIO input nodes at turn on in a Node-Red setting
HI crismancich,
Thank you for the flow you suggested: do this implies that it is not possible to "take a picture" of all inputs jointly, for example by using some initial state of the node revpi-multiple-input? I mean, if I need to know the state of all inputs at a given time, possibly in the form of a JSON object , should I acquire it by doing some kind of (triggered) ladder flow by using the node as you did?
Thank you for the flow you suggested: do this implies that it is not possible to "take a picture" of all inputs jointly, for example by using some initial state of the node revpi-multiple-input? I mean, if I need to know the state of all inputs at a given time, possibly in the form of a JSON object
Code: Select all
{ "I_1" : x1, ... "I_14" : x14 }
Code: Select all
revpi-getpin
crismancich wrote: ↑30 Nov 2021, 11:36 Hi Daniele,
use a start-up-trigger node with a RevPi get pin. Make sure you add some delay so that the pi is already botted up completely.
https://flows.nodered.org/node/node-red ... up-trigger
Daniele Tampieri
- Daniele.tampieri
- Posts: 14
- Joined: 03 Nov 2020, 21:58
Re: Behavior of RevPi DIO input nodes at turn on in a Node-Red setting
Hi crismancich,
I solved the problem by using your suggestion in a ladder structure, precisely the one shown in the picture below: The input of this submodule is activated at start-up: the shown subflow then takes a screenshot of the input status and send it as a payload object wit the same structure as the `revpi-multiple-input` node payload, so I can use the same processing node downstream.
I solved the problem by using your suggestion in a ladder structure, precisely the one shown in the picture below: The input of this submodule is activated at start-up: the shown subflow then takes a screenshot of the input status and send it as a payload object wit the same structure as the `revpi-multiple-input` node payload, so I can use the same processing node downstream.
Daniele Tampieri