Triggered email sendmail

So I've searched, installed v2's, v3's mail servers, synology mail servers, etc trying to get hubitat to send a event triggered email. In my case I'm monitoring my propane tank and want to automatically send a email to the gas company to come and refill it. Does anyone know a way to send email that still works?

I've never tied using it with sendmail, but Webcore should be able to do it.

AI Overview

To send emails using webCoRE on Hubitat, install the

Sendmail custom driver to act as a notification device. Once installed, add this device to webCoRE, then use the sendNotification or sendEmail command within your piston to send messages, bypassing the need for a local SMTP server.

Steps to Send Emails via webCoRE:

  1. Install the Sendmail Driver:
  • Install the "Sendmail" driver (found in the Hubitat Community forum) to enable sending email/SMS without a local server.
  • Create a new virtual device in Hubitat, selecting "Sendmail" as the type.
  • Configure the Sendmail device settings with your SMTP server details (e.g., Gmail, Yahoo, or ISP SMTP).
  1. Add Device to webCoRE:
  • Open your webCoRE instance in Hubitat.
  • Go to settings and ensure the new Sendmail device is selected as a device webCoRE can control.
  1. Create the Piston:
  • Create a new piston in webCoRE.
  • Under the "Then" action, select your Sendmail device.
  • Choose the sendNotification (or sendEmail depending on driver version) command.
  • Enter the recipient email and message content.
  1. Alternative Method:
  • Use the native Pushover driver included in Hubitat firmware, which is often more reliable for instant notifications than traditional email.
  • Use webCoRE to trigger actions based on triggers like motion or contact sensors, and then send the email.

So webcore is doing the actual interfacing with gmail, authentication, etc?

How about an SMS text message? :thinking:

2 Likes

If you have a Gmail account solution works:

The Google Console bits are a little complex to setup but it’s a one time setup that you don’t have to visit again.

3 Likes

I personally have found this to be an excellent approach (I don't like anything that's not local, but I'm sending an email - you can't do that locally, so this is an excellent approach.)
By the way, I found that I have to "re-authorize" the Google Authorization. It appears to be every 6 months? But I'm not sure. Nonetheless, "re-authorizing" was simple, quick, and easy.
Thank you for building an excellent piece of code!

2 Likes

Thank you for the feedback. Please post that issue in the main thread because it’s the first I have heard of it and curious if others are having the same issue. I haven’t reauthorized in years so surprised to hear its timing out.

Same, I don't remember ever needing to reauthorize. But you're right, discussion of this issue should be moved to your thread.

Thanks for the idea but email is the only format that works with this particular vendor...

thanks I'll try that integration!

1 Like

Sort of tangential, but if it was me, I think I'd prefer to get a notification that includes tank %, say via Pushover, and then decide whether or not to call the propane company. One too many false callouts and you won't be getting any more propane, lol.

1 Like

Fair point but I'll have it email me too, maybe even 5% or something before the email goes to the vendor. I did finally get the email thing to work after much fiddling. used my synology mail server as a SMTP relay and enabled app passwords in google. yee haw!

1 Like

Excellent!

if your server can worker with unencrypted email. my send mail implementation in package manager still works cleanly

1 Like