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

Internet of Things IoT Frameworks 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating
_x000D_ _x000D_ I have built a simple application which connects to my IoT temp sensor device and sends an email based on the temp--warm, just right, and cold. To do this I've used the IBM IoT node for connecting to my IoT device, and then processed the data with case statements to fall into the three buckets: warm, just right, and cold. From there I generate an email and send the temp category to my email address. However, my temp sensor is measuring and sending data every 1 second so my app is sending an email every 1 second--which is too often. Instead I'd like to only send an email when there is a transition between the three temperature states. Naturally, I'd like to implement this with a state machine or the case statement processing block. This requires that I have both data points: the current temp measurement and the last recorded measurement. What is the best way to go about storing the last recorded temp measurement and are there any tips on the node flow I should use? Email IoT Application Nodes

Posted on 16 Aug 2022, this text provides information on IoT Frameworks related to Internet of Things. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ As well as rbe you can use a delay node (third in the Function palette) to rate limit to e.g 5 messages a minute (programmable number and period), with a choice of whether to discard the excess messages. Presumably you might not discard when messages arrive in short bursts with long gaps between bursts.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Important Internet of Things Links