Alarm in case of error notification mail from device thru raspberry pi

hi .. anybody can help me?.. i want to generate alarm in case of error notification from mail.

Do you mean an error in sending mail from Node-Red?
Use a Catch node.
Untitled 2

no.. i mean if error mail is recived from device then alarm should be generated thru Digital output pin by connecting hooter.

can u help in this how to do in rasberry pi

There is an Email In node which can retrieve email and there is a GPIO Out node (for Raspberry Pi) which can be used to switch a relay.

I guess you will want to check the sender msg.header.from.value[0].address, the subject msg.topic and the email body msg.payload

How fast do you need to switch the hooter on though?
Is this the critical radiation level warning in your nuclear reactor, or "someone is at the door"?
You may be better using a more immediate means of communication than email. MQTT maybe.

Hi... instead of getting error email can i do it by reading value from webserver device and blowing hooter?
pls let me know how can i do this.

how do i use mqtt?

What event do you wish to detect and trigger your hooter?
Is it local to your network or somewhere else?
Is it connected to the internet or mobile phone network?
How is the event initially detected? What hardware is involved?
What hardware are you running Node-Red on?

"Can you do it by reading value from webserver device?" Yes you can.
Edit - You asked how to do this. Sorry, I have no idea. I never use HTTP like this since MQTT suits my requirements and seems simpler.

"How do you use MQTT?"
There has to be an "MQTT Broker" running 24/7 somewhere.
It could be on a small local device such as a Raspberry Pi. There are free/cheap brokers in the cloud which might be suitable if the event you want to detect is not within your network.

Let's assume your alert is a nuclear reactor meltdown.
The device which monitors the reactor connects to the broker and publishes a message using a topic "reactor/event" and a payload "meltdown".

In Node-Red you have an "MQTT In" node which connects to the broker and listens for messages on the topic "reactor/event". When a message "meltdown" arrives you turn on the relay for the hooter.

The broker has to be accessible from both devices, the one which publishes the message and the one which listens for it. Hence the questions above.

1 Like

Hi...I have a webserver which monitor and control Airconditinoer, in server room if there is some error in ac i want to blow hooter. i will create local network by putting pi and webserver on same network.

but at present i m trying on another remote webserver which is on internet to whom i have access and want to read alarm /error data and activate pin of redberry pi. I can share ip address of webserver if you can guide me how to read data from webserver.

-event is detected by webserver itself which have multiple ac connected .
if it can be done by mqtt ..its good.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.