question

rgnz avatar image
rgnz asked

Node red read a digital IO immediate

Is there an easy way to capture the immediate change of state for a digital IO to trigger another function.

Best way to setup the i/o? Alarm etc.

I', just looking to capture the change from an open contact to a closed one.

Thank you


Node-RED
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

4 Answers
yortyobby avatar image
yortyobby answered ·

You need to enable the I/O through the GX menu, then you can use a Digital Input node.

e.g.

  • Configure Digital Input 1 as a "Door Alarm".
  • You can custom label the Digital Input if desired from the "Door alarm" menu of the device list.
  • In Node Red, add a "Digital Input" node.
  • Configure the 'Digital Input" node.

You can also monitor the Digital Input from the Dbus.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

rgnz avatar image
rgnz answered ·

Fabulous. Thank you. I had done all of that but it doesn't seem to trigger it strtaigt awain node red.

1720383542700.png


1720383542700.png (4.0 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

rgnz avatar image
rgnz answered ·

IOt only ever seesm to report 6 - open. never the 7 - clode state whihc is wht i'd like to trigger an actrion on.

1720383802559.png


1720383802559.png (9.0 KiB)
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

hominidae avatar image hominidae commented ·
I am not using NR on VenusOS, but remotely on my NAS and cnnect via mqtt to the GX...using the digitalInput is no problem at all.

Can you verify, the open/close state in the GX-Menu is working, when you switch the digitlInput?


0 Likes 0 ·
yortyobby avatar image
yortyobby answered ·

Try setting the 'Measurement' in the node to 'Digital Input Alarm'.

0 and 2 should be the states to monitor.

1720827907123.png


1720827907123.png (7.3 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.