📧HG Smart E-mailer

Started by Tuicemen, February 22, 2019, 08:29:12 AM

Previous topic - Next topic

Tuicemen

mike inspired me to create this which essentially gets rid of 95% of my email scripts. :)%
Thanks mike!
This adds the option to email the specified email addresses (yes you can specify as many as you like) when the module is switched on.
This works for all HG device types (Lights, Switches, Dimmers, Sensors, Door/Window, Sirens…..)
I've tested this with X10, Zwave, Philps Hue, WeMo, Virtal Devices, and Ha-Bridge configured devices. So virtually anything you wish to be informed of when turned on, opened or switches to a status of 1, is now just a few simple clicks to setup. ;)
Download and rename the attached txt file to E-mailer.zip and unzip then from HG Messaging and Social click actions and import program.
browse to the unzipped E-mailer folder and click on 1016-Smart_E-mailer.hgx to install it.
if you have any Ideas to expand on this programs possibilities feel free to suggest them or If your into coding add them your self.
However if you do modify please share your improvements or fixes.
Questions are never to dumb so ask away! ;)
Use at your own risk! I can't be responsible for you spamming your self or others! rofl
Note: The link for version 2 which includes more options can be found further down in this thread http://forums.x10.com/index.php?topic=30881.msg181710#msg181710 >!
Please Read Topic:
General Forum Etiquette
Before you post!

mike

looks great!  I unremarked your debug line as I want to see what it is trying to send (especially now since my send does not work).

but I have an issue... after importing it & enabling it, I have lost ability to go to my 9 of my 11 groups;  click on them and HG just hangs until I pick one of the 2 of 11 that DO open...

One of my fan modules is gone from both those working screens too;  just erased off the pages!...   AND that A16 module is gone from the x10 module list, and so my two schedulers (one to turn it on, the other to turn it off) do not show it any longer under modules...

Under config, the non opening groups hang also and do not open - like they do not exist any longer?

programs won't open to let me turn the emailer off...

most other config windows are locked also...

reboot of pi next...






Tuicemen

#2
The program does take a bit to load as it has to find all devices in HG and add the options to each device.
A reboot may help with that.
The debug just states what the program is attempting to send for a message it will not show you problems with your email.
Also not having the required program for solar time will cause the dusk dawn condition not to work.
I suspect everything else will work if the dusk dawn setting isn't selected.
Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

I've been thinking of adding some improvements to this.
Currently it sends a standard message of the Time and the module name that was turned on or opened, so I'm thinking of adding a custom message option which would over ride the default one if entered.
The custom message would be be preceded by the time the device was triggered.

I also had considered adding specific email recipients addresses for each, but I think that just adds more to setup for each modules emailer. ::)

Please Read Topic:
General Forum Etiquette
Before you post!

Tuicemen

Some may already know this, but for those that don't, this will send a text notification to your phone if the address is entered in the email options.
A SMS is just a simple e-mail using your phone number followed by your carriers @ info!
I posted a list of carrier address info some time ago which may have the info required.
http://forums.x10.com/index.php?topic=17747.msg115065#msg115065
Google may have a newer more up to date list of carriers sms info.
>!
Please Read Topic:
General Forum Etiquette
Before you post!

bkenobi

Email to SMS does work well and I've done that through HG in the past so it's definitely possible with Verizon at least.

Tuicemen

I've done it in the past with Rogers as well as Telus Mobility.
I can confirm it works with Telus Mobility in HG
>!
Please Read Topic:
General Forum Etiquette
Before you post!

mike

Quote from: bkenobi on March 11, 2019, 11:37:25 AM
Email to SMS does work well and I've done that through HG in the past so it's definitely possible with Verizon at least.

You need HG email working first though.  I still cannot get simple email to send from HG.  HG remembers one email account setting and won't change it on my pi's.  The account data is stored in some obscure location I have not yet found so I cannot delete it.

bkenobi

If I remember correctly, Gene used Base64 encryption to store some sensitive data.  It's not security, but at least it keeps things from being directly searched for I suppose.  On the other hand, it means that you can't easily locate some things that I think should be exposed (scheduler events used to be done this way but may not any more).  I don't know where the settings for things are located anymore, but a lot of your config should be in the main HG folder.

Tuicemen

I've been playing over some scenarios in my head for using this.
I do see times when I may wish a text instead of a email or the other way around for a particular module turning on.

It might be best to have a optional recipient input field which would over ride the other email recipients listed saved.
Any thoughts on this?
Please Read Topic:
General Forum Etiquette
Before you post!

mike

You're doing wonderful things with this tuicemen.  I hope to be able to try your module update to include emailing soon!

bKenobi, thanks.  That makes sense and is surely it.  I have now been able to see the 'correct' email account settings (in base64 code) in systemconf.xml file, compared them to the non changing ones in my working HG pi file.  I copied them from the working pi file to non working pi - and still no send.  But at least they show correctly now in settings- Options.  Next to check log again for why it is still not sending...

mike

I'm going to circle back soon and try your new email notification adder to modules!  My HG is emailing finally!  Yahoo!  Copying the account data over did not fix it after restarts and reboots.  BUT UPGRADING HG FROM STABLE.37 TO STABLE.39 DID FIX IT! 

Tuicemen

I've not update this yet, thought I do have options I've commented on thus far running to test how well they'll perform.
I've also fixed the warnings about outdated code so going forward HG shouldn't have a issue.
I may add other options prior to the next release build if I or anyone else thinks of something useful. ;) ;)
>!
Please Read Topic:
General Forum Etiquette
Before you post!

mike

If you want a tester send me a copy to install.  If not, post as soon as you can;  I will wait.  Thanks.

Tuicemen

Thanks Mike, I realy don't need any testers what I have now works!
I doubt I'll get anything posted till next week now, this is one reason why I asked for option suggestions.
I don't plan to continue adding to this once I've posted the next version and I've ran out of ideas. ::) :'
>!
Please Read Topic:
General Forum Etiquette
Before you post!