Hardware components | ||||||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
Software apps and online services | ||||||
![]() |
| |||||
![]() |
| |||||
| ||||||
Hi everyone!
This is a project which will be very useful for a person who lives alone and most of the time being out for work, meetings, party etc so in his absence at home whenever it gets heavily rained or floods come then he much be worried about his home so after installing this setup in his house he will be getting alert every time whenever the water level in the house is crossing the threshold value.
He will be getting an email saying that water level is too high and he can be prepared for that situation.
here is the youtube link of the output:
https://youtu.be/cjueUUkLUcg
thank you!
choose json file
click on the choose file and choose the json code provided in the code section you need to download the code
click on first bubble
now click on the first bubble named as bolt iot fill all the details.
in connection you need to put the bolt iot api key after that you will be asked to put the device name put the bolt iot id in it
in connection you need to put the bolt iot api key after that you will be asked to put the device name put the bolt iot id in it
click on math bubble
now click on the bubble named math and change the value as required here in my case i set the value to 100
click on the dot
now click on the red dot in between math and gamil and change the value as required here it is set to 60
click on gmail bubble
now click on the gmail button and enter required details connect your gmail with integroment and put your email id in the place of "To"
#include <BoltDeviceCredentials.h>
#include <BoltIoT-Arduino-Helper.h>
#include <Ultrasonic.h>
#include <BoltIoT-Arduino-Helper.h>
#define ULTRASONIC_TRIG_PIN 12
#define ULTRASONIC_ECHO_PIN 13
Ultrasonic ultrasonic(ULTRASONIC_TRIG_PIN,ULTRASONIC_ECHO_PIN);
int distance=0;
String getDistance(String *arguments){
distance = ultrasonic.read();
String returnString=""+String(distance);
return returnString;
}
void setup() {
boltiot.begin(Serial);
// put your setup code here, to run once:
boltiot.setCommandString("RD\r",getDistance);
boltiot.setCommandString("GetDistance",getDistance);
}
void loop() {
boltiot.handleCommand();
// put your main code here, to run repeatedly:
}
{
"name": "Water Level Detection",
"flow": [
{
"id": 15,
"module": "app#bolt-iot:executeCommand",
"version": 1,
"parameters": {
"__IMTCONN__": 445281
},
"mapper": {
"command": "serialBegin",
"parameters": {
"baud": "9600",
"deviceName": ""
}
},
"metadata": {
"designer": {
"x": 8,
"y": -3
},
"restore": {
"command": {
"label": "Initialize serial communication"
},
"__IMTCONN__": {
"label": "My Bolt connection"
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "command",
"type": "select",
"label": "Command",
"required": true,
"validate": {
"enum": [
"digitalWrite",
"digitalRead",
"analogRead",
"analogWrite",
"serialBegin",
"serialWrite",
"serialRead",
"version",
"restart",
"isAlive"
]
}
},
{
"name": "parameters",
"spec": [
{
"name": "deviceName",
"type": "text",
"label": "Device name",
"required": true
},
{
"name": "baud",
"type": "number",
"label": "Baud",
"required": true
}
],
"type": "collection",
"label": "Parameters"
}
]
}
},
{
"id": 1,
"module": "app#bolt-iot:executeCommand",
"version": 1,
"parameters": {
"__IMTCONN__": 445281
},
"mapper": {
"command": "serialWrite",
"parameters": {
"data": "GetDistance",
"deviceName": ""
}
},
"metadata": {
"designer": {
"x": 300,
"y": 0
},
"restore": {
"command": {
"label": "Send serial data output"
},
"__IMTCONN__": {
"label": "My Bolt connection"
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "command",
"type": "select",
"label": "Command",
"required": true,
"validate": {
"enum": [
"digitalWrite",
"digitalRead",
"analogRead",
"analogWrite",
"serialBegin",
"serialWrite",
"serialRead",
"version",
"restart",
"isAlive"
]
}
},
{
"name": "parameters",
"spec": [
{
"name": "deviceName",
"type": "text",
"label": "Device name",
"required": true
},
{
"name": "data",
"type": "text",
"label": "Data",
"required": true
}
],
"type": "collection",
"label": "Parameters"
}
]
}
},
{
"id": 14,
"module": "app#bolt-iot:executeCommand",
"version": 1,
"parameters": {
"__IMTCONN__": 445281
},
"mapper": {
"command": "serialRead",
"parameters": {
"till": "10",
"deviceName": ""
}
},
"metadata": {
"designer": {
"x": 600,
"y": 0
},
"restore": {
"command": {
"label": "Read incoming serial data"
},
"__IMTCONN__": {
"label": "My Bolt connection"
}
},
"parameters": [
{
"name": "__IMTCONN__",
"type": "account",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "command",
"type": "select",
"label": "Command",
"required": true,
"validate": {
"enum": [
"digitalWrite",
"digitalRead",
"analogRead",
"analogWrite",
"serialBegin",
"serialWrite",
"serialRead",
"version",
"restart",
"isAlive"
]
}
},
{
"name": "parameters",
"spec": [
{
"name": "deviceName",
"type": "text",
"label": "Device name",
"required": true
},
{
"name": "till",
"type": "number",
"label": "Till",
"required": true,
"validate": {
"max": 127,
"min": 0
}
}
],
"type": "collection",
"label": "Parameters"
}
]
}
},
{
"id": 18,
"module": "math:EvaluateExpression",
"version": 1,
"parameters": {},
"mapper": {
"expression": "100-{{parseNumber(14.value)}}"
},
"metadata": {
"designer": {
"x": 869,
"y": -2
},
"expect": [
{
"name": "expression",
"type": "text",
"label": "Expression",
"required": true
}
]
}
},
{
"id": 13,
"module": "google-email:ActionSendEmail",
"version": 1,
"parameters": {
"account": 445282
},
"filter": {
"name": "Check if water level to high",
"conditions": [
[
{
"a": "{{18.result}}",
"b": "60",
"o": "number:greater"
}
]
]
},
"mapper": {
"cc": [],
"to": [
],
"bcc": [],
"html": "Water level has reached {{18.result}}cms.",
"subject": "Warning! Water Level is too high!!",
"attachments": []
},
"metadata": {
"designer": {
"x": 1145,
"y": -3
},
"restore": {
"cc": {
"mode": "chose",
"items": []
},
"to": {
"mode": "chose",
"items": [
"undefined"
]
},
"bcc": {
"mode": "chose",
"items": []
},
"account": {
"label": ""
},
"attachments": {
"mode": "chose",
"items": []
}
},
"parameters": [
{
"name": "account",
"type": "account",
"label": "Connection",
"required": true
}
],
"expect": [
{
"name": "to",
"spec": {
"name": " ",
"type": "email",
"label": "Email address",
"required": true
},
"type": "array",
"label": "To",
"labels": {
"add": "Add a recipient",
"edit": "Edit a recipient"
},
"required": true
},
{
"name": "subject",
"type": "text",
"label": "Subject"
},
{
"name": "html",
"type": "text",
"label": "Content"
},
{
"name": "attachments",
"spec": [
{
"name": "fileName",
"type": "filename",
"label": "File name",
"required": true,
"semantic": "file:name"
},
{
"name": "data",
"type": "buffer",
"label": "Data",
"required": true,
"semantic": "file:data"
},
{
"name": "cid",
"type": "text",
"label": "Content-ID"
}
],
"type": "array",
"label": "Attachments",
"labels": {
"add": "Add an attachment",
"edit": "Edit an attachment"
}
},
{
"name": "cc",
"spec": {
"type": "email",
"label": "Email address"
},
"type": "array",
"label": "Copy recipient",
"labels": {
"add": "Add a copy recipient",
"edit": "Edit a copy recipient"
}
},
{
"name": "bcc",
"spec": {
"type": "email",
"label": "Email address"
},
"type": "array",
"label": "Blind copy recipient",
"labels": {
"add": "Add a blind copy recipient",
"edit": "Edit a blind copy recipient"
}
}
]
}
}
],
"metadata": {
"version": 1,
"scenario": {
"roundtrips": 1,
"maxErrors": 3,
"autoCommit": false,
"sequential": false,
"confidential": false,
"dataloss": false,
"dlq": false
},
"designer": {
"orphans": []
},
"zone": "eu1.integromat.com"
}
}




_ztBMuBhMHo.jpg?auto=compress%2Cformat&w=48&h=48&fit=fill&bg=ffffff)










Comments