Rajbir Singh
Published © GPL3+

Email Alert with Node-RED

Creating email alerts of NCD Wireless Temperature and Humidity Sensor with Node-RED.

IntermediateProtip2 hours3,736
Email Alert with Node-RED

Things used in this project

Hardware components

National Control Devices IoT Long Range Wireless Temperature Humidity Sensor
×1
National Control Devices 900HP-S3B Long Range Wireless Mesh Modem with USB Interface
×1

Software apps and online services

Node-red

Story

Read more

Code

node_red_flow

JSON
Flow output
[{"id":"7eddbe69.50aa3","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"57ecfc86.6aadb4","type":"ncd-gateway-node","z":"7eddbe69.50aa3","name":"","connection":"be3e53dd.346c8","x":130,"y":100,"wires":[["2ffb617a.7e0bde"]]},{"id":"2ffb617a.7e0bde","type":"debug","z":"7eddbe69.50aa3","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":430,"y":100,"wires":[]},{"id":"931e1ad3.c97ba8","type":"ncd-wireless-node","z":"7eddbe69.50aa3","name":"","connection":"be3e53dd.346c8","config_comm":"be3e53dd.346c8","addr":"","sensor_type":"1","auto_config":"","node_id":0,"delay":300,"destination":"0000FFFF","power":4,"retries":10,"pan_id":"7FFF","change_enabled":"","change_pr":"0","change_interval":"0","cm_calibration":"60.6","bp_altitude":"0","bp_pressure":"0","bp_temp_prec":"0","bp_press_prec":"0","amgt_accel":"0","amgt_mag":"0","amgt_gyro":"0","impact_accel":"0","impact_data_rate":"4","impact_threshold":25,"impact_duration":1,"activ_interr_x":1,"activ_interr_y":2,"activ_interr_z":4,"activ_interr_op":8,"filtering":0,"data_rate":5,"time_series":0,"reading_type":1,"x":120,"y":220,"wires":[["f8469393.3c90a","6a475f23.d7f7","419db4ce.d8ca3c"]]},{"id":"f8469393.3c90a","type":"function","z":"7eddbe69.50aa3","name":"Temperature","func":"if(msg.payload.temperature>23)\n{\nmsg.topic = \"Subject:System temperature has been  exceeded.\";\nmsg.payload = \"Temperature:\" + String(msg.payload.temperature);\nreturn msg;\n}","outputs":1,"noerr":0,"x":390,"y":180,"wires":[[]]},{"id":"6a475f23.d7f7","type":"function","z":"7eddbe69.50aa3","name":"Humidity","func":"if(msg.payload.humidity>40)\n{\nmsg.topic = \"Subject:System's humidity has been  exceeded.\";\nmsg.payload = \"Humidity:\" + String(msg.payload.temperature);\nreturn msg;\n}","outputs":1,"noerr":0,"x":380,"y":280,"wires":[[]]},{"id":"880cd029.94dfa","type":"e-mail","z":"7eddbe69.50aa3","server":"smtp.gmail.com","port":"465","secure":true,"tls":true,"name":"umeshbanga533@gmail.com","dname":"email alert","x":650,"y":220,"wires":[]},{"id":"419db4ce.d8ca3c","type":"debug","z":"7eddbe69.50aa3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":370,"y":380,"wires":[]},{"id":"be3e53dd.346c8","type":"ncd-gateway-config","z":"","name":"","comm_type":"serial","ip_address":"","tcp_port":"2101","port":"COM6","baudRate":"115200","pan_id":"7fff","rssi":false}]

Credits

Rajbir Singh

Rajbir Singh

20 projects • 4 followers
A skilled developer with experience of extensive development in the Internet of Things (IoT).

Comments