UNPKG

@clarify/node-red-contrib-clarify

Version:
83 lines (73 loc) 2.71 kB
<script type="text/html" data-help-name="clarify_insert"> <p>Write data to Clarify.</p> <h3>Details</h3> <p>Use this node to create signals and write data to Clarify.</p> <p>Each incoming message must have a unique ID so that this module can differentiate beteween the signals.</p> <h3>General Properties</h3> <dl class="message-properties"> <dt>Credentials <span class="property-type">clarify_api</span></dt> <dd>Clarify API configuration</dd> </dl> <h3>Inputs</h3> <dl class="message-properties"> <dt>topic <span class="property-type">string</span></dt> <dd>A unique id per signal that has to match the regex for the Clarify Input ID, <code> /^[a-zA-Z0-9-_:.#+/]{1,128}$/</code>. If the id is changed will a new signal be created.</dd> <dt class="optional">payload <span class="property-type">object</span></dt> <dd> Send multiple values: <code>times: ["&lt;timestamp&gt;", ...]</code> <code>values: [(&lt;number&gt; || null), ...]</code> </dd> <dt class="optional">payload <span class="property-type">object</span></dt> <dd> Send single value with time: <code>time: &lt;timestamp&gt;</code> <code>value: &lt;number&gt;</code> </dd> <dt class="optional">payload <span class="property-type">number</span></dt> <dd> Sends a single value using the current time as the timestamp. </dd> <dt class="optional">signal <span class="property-type">object&lt;Signal&gt; || undefined</span></dt> <dd> Metadata for the signal. Content must match the <a href="https://docs.clarify.io/reference#signal">Signal object</a> in the Clarify documentation. If omitted, no meta data will be changed in Clarify. </dd> </dl> <h3>Types</h3> <dl class="message-properties"> <dt>Timestamp</dt> <dd>Timestamps can either be an ISO8601 formatted string, a JavaScript Date object, or the number of ms from 1970</dd> </dl> <h3>References</h3> <p> <a href="https://docs.clarify.io">Clarify Documentation</a> </p> <h3>Example message</h3> <p><pre> { "topic": "id100", "signal": { "name": "Ice Cream Temperature", "valueType": "numeric", "description": "Temperature measurement of the ice cream", "labels": { "flavours": ["sweet", "sour"], "location": ["pier", "banana stand"] }, "engUnit": "°C", "sourceType": "measurement", "sampleInterval": "PT1M", "gapDetection": "PT5M" }, "payload": { "times": [ "2020-01-01T00:00:00Z", "2020-01-01T00:01:00Z", "2020-01-01T00:02:00Z" ], "values": [1, 10, 35] } } </pre></p> </script>