Receiving emails

Hi all,

My CCTV and alarm system can both send emails on specific events. Is there a way to get hubitat to read the emails and trigger events? For example if the alarm has a fault turn on outside lights.

I've searched the forum and can't find anything mensioned for email. If needed Id be happy to add a pi and nodered, but don't know how to integrate that with hubitat.

Thanks

I actually sort of do this with MS ‘Outlook’
When a certain email arrives it runs a batch script and (using makerApi) turns on a switch on the hub, the switch then runs a tts to say an email has arrived.

Not exactly what you want but it works well for my use case (helpdesk email arrived)

Andy

1 Like

You can us IFTTT to trigger a switch but will depend on how the emails can be sent.

1 Like

Thanks for the suggestions, I'll take a look at the maker API and IFTTT and see what I can come up with.

So i have been trying to find a local solution for this. It would be nice to have a docker container on my server snatch the smtp message and convert it to some thing like mqtt or something and relay it to the hubitat for a trigger. I found something like this on github but nothing i could dockerize. (GitHub - kost/smtp2mqtt: Simple SMTP to MQTT relay/forwarder)

@Cobra Do you think it would be possible to make a dummy smtp server that just takes the email from the CCTV for events and translates it to a compatible interface message? Looking at the developer documents you could do telnet, mqtt, websockets, ect. Then have a driver on the hubitat that listens for the message using the right interface?
I feel like I could hammer something out but you are a better programmer than me and I don't want to attempt something that an expert would consider impossible to do from the start.

You can do this very easily if you use node-red and use the node-red-node-email node:

There is also a Hubitat integration for node-red (node-red-contrib-hubitat):

making it very easy to use an incoming message as trigger for automations that use hubitat-paired/controlled devices.

3 Likes