This tutorial will demonstrate how to configure Rule that will generate Alarm when certain device reports temperature or humidity that exceeds certain thresholds.
Lets assume that we have devices that are able to report humidity and temperature values. We have one device per room (zone) in the building or other facility and we want to specify different rules based on zone type.
Assumptions
We assume you have already configured email plugin that will distribute generated alarms to recepients. You can follow previous tutorial to do this.
How it works?
We will provision simple rule that filters incoming data using:
- “Message type” filter to react on telemetry data.
- “Device Attributes” filter to process data from device that has certain room type as a server side attribute.
- “Device Telemetry” filter to detect humidity and temperature values that are out of pre-configured range.
Device provisioning
Let’s create a Device and provision certain server-side attributes: ZoneId and ZoneType.
Step 1. Create Device
Navigate to devices page and click on big red “+” button. Populate device name and description and click “Add” button.
Step 2. Provision ZoneID and ZoneType attributes
Open device card that you have created. Navigate to “Attributes” tab and select “Server” attributes scope.
Click on the highlighted “+” button. Add two attributes “ZoneId” and “ZoneType” as shown below. We will use them later in the rule filters.
Rule configuration
Step 3. Create “Server Room Monitoring” Rule
Navigate to rules page and click on big red “+” button. Populate rule name and description first.
Our rule will contain three filters as described in “how it works” section.
Step 4. Message type filter
Add filter based on message type (see image below).
Step 5. Attributes filter
Add filter based on the server-side attributes (see image below).
typeof ss.ZoneType !== 'undefined' && ss.ZoneType === 'Server Room'
Step 6. Telemetry filter
(
typeof temperature !== 'undefined'
&& (temperature <= 10 || temperature >= 25)
)
||
(
typeof humidity !== 'undefined'
&& (humidity <= 40 || humidity >= 60)
)
Add filter based on the sensor reading (see image below).
Step 7. Alarm Processor
Let’s add simple processor that will generate and save alarm to the database based on templates below.
Alarm ID:
[$date.get('yyyy-MM-dd HH:mm')] $ss.get('ZoneId') HVAC malfunction detected!
Alarm Body:
[$date.get('yyyy-MM-dd HH:mm:ss')] $ss.get('ZoneId') HVAC malfunction detected.
Temperature - $temperature.valueAsString (°C).
Humidity - $humidity.valueAsString (%)!
NOTE Alarm Id is a unique identifier. If there will be multiple events that match filters, alarms will be de-duplicated based on the Alarm Id. Email will be sent once per alarm.
In our case we use timestamp that is truncated to minutes to make sure that we will send email once per minute or less frequently.
Step 8. Rule Action
Select “SendGrid Email Plugin” from previous tutorial and click on “Create” button. Don’t forget to replace “[email protected]” with your mail address.
Step 9. Save and Activate Rule
Once rule is saved successfully, don’t forget to activate it by clicking on “Activate” button (see image below).
Dry run
Let’s check our configuration by publishing some telemetry data. We will use access token from the device that we have created on the first step.
mosquitto_pub -d -h "demo.thingsboard.io" -t "v1/devices/me/telemetry" -u "$YOUR_ACCESS_TOKEN" -m "{'temperature':42, 'humidity':74}"
Troubleshooting
If you have configured something wrong, you should see errors logged on the corresponding tab:
If there is no error in the rule, but you can’t see the email - check errors in the target plugin.
We’ve been where you are now – sitting there on the verge of screaming, thinking “write my essay for me”. We provide 100% legit edubirdie scam, custom written essays that are guaranteed to pass an online plagiarism check and are never resold
ReplyDeleteThis site is great; it covers a lot of ground that interests me and provides a wealth of knowledge. I'm hoping that the future holds even more intriguing things connections game
ReplyDeleteThis post is very amazing alarm based sensor readings is very beneficial moreover any one find cheap writing service so we are providing you best assignments service Dissertation Help London.
ReplyDeleteWhat a fantastic resource! It delves deeply into many topics that pique my interest and offers a plethora of information geometry dash lite
ReplyDeleteThe warning device based on sensor readings is an advanced warning device that helps users feel secure about surrounding risks. flappy bird
ReplyDeleteImmerse yourself in a colorful 3D world with eye-catching visual effects in tunnel rush. Enjoy exciting music and vivid sound effects, providing a great gaming experience.
ReplyDeleteGet ready to shred, carve, and conquer in the online game that puts you in control on the slopes, slope.
ReplyDeleteWith modern sensor-driven alarm systems, you can enjoy enhanced security. Utilize your cutting-edge technologies to safeguard your residence or place of work. After reading your post, I learned some useful information that will broaden my understanding. We appreciate you sharing this post with us.
ReplyDeleteNueva Jersey Violencia Doméstica Acto
The sensor-based alarm system works similarly to the mechanics in the fnaf games – both rely on constant monitoring of information to detect potential danger. Both help you react in time and avoid unwanted situations.
ReplyDeleteTo begin programming an Arduino UNO device, you will need to have the Arduino IDE loaded along with all of the software that is associated with it. tunnel rush
ReplyDeleteFnf brings back the classic rhythm-game style with a modern twist, where players go head-to-head in intense musical duels. Master the beats and prove your skills in this colorful and energetic indie hit.
ReplyDeleteThis sounds like a great tutorial for setting up alarms based on sensor escape road readings. It's important to have rules in place for different zones and to ensure that the alarms are distributed to the right recipients.
ReplyDeleteSensor-based alarms are Geoguessr Free systems that monitor sensor data and trigger alerts when specific thresholds are met.
ReplyDeleteslope game is an addictive online arcade game that challenges players to navigate a fast-moving ball down a steep, twisting slope.
ReplyDeleteThanks for this clear and practical guide! The way you explained setting up alarms based on sensor readings really makes it easy to follow along. Excited to try this with my project! Also, if anyone ever finds themselves in need of expert legal help, feel free to check out this abogados de lesiones personales de hampton virginia It’s always great to have reliable professionals on your side!
ReplyDeleteThis compatibility test is an accurate love calculator that tells couples everything about their relationship status. Shall we discover it?
ReplyDeleteThis tutorial explains setting up alarms for temperature and humidity thresholds using a Rule. By leveraging sensor readings from devices in each room, you can create tailored alerts. Ensure you have the email plugin ready for notification distribution. It’s like strategizing in a wordle game ; precision and pattern recognition are key! Follow along to effectively manage your environment and keep things in check!
ReplyDeleteTo set up alarms based on sensor readings for temperature and humidity, follow this tutorial. Consider using the slope game method to establish clear thresholds for each room's devices. By configuring filters—like "Message type" for telemetry data and "Device Attributes" for room types—you can effectively manage alerts. Don't forget to set up your email plugin for notifications to recipients.
ReplyDeleteWow, setting up alerts based on sensor data sounds like a very detailed and specific process! Has anyone successfully implemented Sprunki Incredibox something like this in their system?
ReplyDeleteThis increase in complexity makes Block Blast Puzzle a game that requires both patience and strategy, as you need to think a few moves ahead to avoid running out of room for your blocks.
ReplyDelete