IOT Node Red IBM Bluemix: State Machine/Store Old Data -


i have built simple application connects iot temp sensor device , sends email based on temp--warm, right, , cold. i've used ibm iot node connecting iot device, , processed data case statements fall 3 buckets: warm, right, , cold. there generate email , send temp category email address.

however, temp sensor measuring , sending data every 1 second app sending email every 1 second--which often. instead i'd send email when there transition between 3 temperature states. naturally, i'd implement state machine or case statement processing block. requires have both data points: current temp measurement , last recorded measurement. best way go storing last recorded temp measurement , there tips on node flow should use?

email iot application nodes

if have @ article:

http://noderedguide.com/index.php/2015/11/06/node-red-lecture-5-the-node-red-programming-model/

we find section called "context". allows maintain state data between instances of message flow either globally or locally particular node. means value received @ earlier time can saved , compared against current value. have use javascript language in function node hoping isn't complicated , there lots of examples around.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -