UNPKG

node-red-contrib-error-on-timeout

Version:

Node that triggers an error if a message is not received within the configured time frame. Also has an output for "late" messages.

39 lines (37 loc) 1.3 kB
<script type="text/javascript"> RED.nodes.registerType('error-on-timeout', { category: 'function', color: '#a6bbcf', defaults: { timeout: { value: 5000, required: true }, verbose: { value: false, required: true, } }, inputs: 1, outputs: 3, icon: "font-awesome/fa-unlock-alt", label: function () { return this.name || "error-on-timeout"; } }); </script> <script type="text/html" data-template-name="error-on-timeout"> <div class="form-row"> <label for="node-input-timeout"><i class="fa fa-clock-o"></i> Timeout interval/ms</label> <input type="number" min="1" max="9007199254740991" id="node-input-timeout" placeholder="Timeout"> </div> <div class="form-row"> <label for="node-input-verbose"><i class="fa fa-commenting-o"></i>Verbose flag</label> <input type="checkbox" id="node-input-verbose"> </div> </script> <script type="text/html" data-help-name="weekday-gate"> <p>Triggers an error after a configurable timeout</p> <p>Feed the node a message with the property <code>eot_trigger</code> first, then a message with the <code>eot_input</code> flag set.</p> <p>Verbose mode is meant to inform the developer about the flow.</p> </script>