Behavior of RevPi DIO input nodes at turn on in a Node-Red setting

Topics about the Software of Revolution Pi
Post Reply
User avatar
Daniele.tampieri
Posts: 14
Joined: 03 Nov 2020, 21:58

Behavior of RevPi DIO input nodes at turn on in a Node-Red setting

Post by Daniele.tampieri »

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
User avatar
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

Post by crismancich »

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

Image
Viele Grüße / Kind regards / Quapla’ / 此致敬意
Boris Crismancich
User avatar
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

Post by Daniele.tampieri »

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

Code: Select all

{ "I_1" :  x1, ... "I_14" : x14 }
, should I acquire it by doing some kind of (triggered) ladder flow by using the

Code: Select all

revpi-getpin
node as you did?
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

Image
Daniele Tampieri
User avatar
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

Post by Daniele.tampieri »

Hi crismancich,
I solved the problem by using your suggestion in a ladder structure, precisely the one shown in the picture below:
Schermata 2021-12-18 alle 18.25.57.png
Schermata 2021-12-18 alle 18.25.57.png (498.37 KiB) Viewed 4403 times
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
Post Reply