# High Frequency Polling

**URL:** <https://discourse.nodered.org/t/high-frequency-polling/70796>\
**Category:** General\
**Created:** [17 November 2022 21:36 UTC](https://discourse.nodered.org/t/high-frequency-polling/70796 "2022-11-17T21:36:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceejm1](https://avatars.discourse-cdn.com/v4/letter/c/53a042/32.png) [@ceejm1](https://discourse.nodered.org/u/ceejm1)\
**Post date:** [17 November 2022 21:36 UTC](https://discourse.nodered.org/t/high-frequency-polling/70796/1 "2022-11-17T21:36:01Z")

</div>

Hello,

I have one of these boards for triggering sound effects from contact closures.

> **[16 Universal Inputs 8-Layer Stackable for Raspberry Pi](https://sequentmicrosystems.com/products/16-universal-inputs-card-for-raspberry-pi)**
>
> Sixteen opto-isolated inputs 3V-48V AC/DC; Perfect for Raspberry Pi Home and Industrial Automation; Eight layer stackable; Pluggable connectors; Software self-test; Command Line Driver; Python Library, Node-Red nodes; I2C only interface leaves all...

It comes with a node for node-Red and I had expected to be able to obtain an output on a state change however it requires polling from an inject node to acquire the input state. To get something approaching a realtime response I'm running an inject node with a repeat interval of 0.1s into 16 instances of the node to return the states of the 16 inputs. This seems to work OK but I was wondering if this would have any detrimental affect to the system and resources required. Its on an RPi 4

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/7/9740468c50ed203bb1796f7e1a67c88a713d2270.png)  
.

Cheers  
James

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 November 2022 09:41 UTC](https://discourse.nodered.org/t/high-frequency-polling/70796/2 "2022-11-18T09:41:38Z")

</div>

indeed yuk... but hey - it's how it works so ...

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 November 2022 09:46 UTC](https://discourse.nodered.org/t/high-frequency-polling/70796/3 "2022-11-18T09:46:22Z")

</div>

Maybe an alternative would be to try the Python library with MQTT. Run a simple Python polling app as a separate process feeding any updates to MQTT. Then node-red can use MQTT instead of polling. Possibly would be more efficient.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 January 2023 09:46 UTC](https://discourse.nodered.org/t/high-frequency-polling/70796/4 "2023-01-17T09:46:39Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
