Better Email Q&A

Posted on
Tue Nov 29, 2016 4:49 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

That's ALL the headers for that message? There's no To, From, Subject, or Date. That's not a valid email message, unless you didn't copy them all.

But I see from the log that it DID see From and Subject headers. So you just didn't get them all.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Nov 29, 2016 4:53 pm
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Re: Better Email Q&A

Hi,

Full raw source of message attached so that it includes everything

Delivered-To: jarvis@messages.com
Received: by 10.107.149.131 with SMTP id x125csp2193483iod;
Tue, 29 Nov 2016 00:28:13 -0800 (PST)
X-Received: by 10.28.20.139 with SMTP id 133mr22647205wmu.9.1480408093791;
Tue, 29 Nov 2016 00:28:13 -0800 (PST)
Return-Path: <no-reply@intesishome.com>
Received: from relayout09-q01.dominioabsoluto.net (relayout09-q01.dominioabsoluto.net. [217.116.26.121])
by mx.google.com with ESMTPS id s17si1490891wme.47.2016.11.29.00.28.13
for <jarvis@messages.com>
(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
Tue, 29 Nov 2016 00:28:13 -0800 (PST)
Received-SPF: pass (google.com: domain of no-reply@intesishome.com designates 217.116.26.121 as permitted sender) client-ip=217.116.26.121;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of no-reply@intesishome.com designates 217.116.26.121 as permitted sender) smtp.mailfrom=no-reply@intesishome.com
Received: from relayout09-redir.dominioabsoluto.net (relayout09-redir.dominioabsoluto.net [217.116.26.126])
by relayout09.dominioabsoluto.net (Postfix) with ESMTP id 3tScBP2gqRzd8XL
for <jarvis@messages.com>; Tue, 29 Nov 2016 09:28:13 +0100 (CET)
Received: from [127.0.0.1] (unknown [212.36.84.194])
(Authenticated sender: noreply@intesishome.com)
by relayout09-dsp.dominioabsoluto.net (Postfix) with ESMTPA id 3tScBM2MxLzd8YC
for <jarvis@messages.com>; Tue, 29 Nov 2016 09:28:11 +0100 (CET)
Message-ID: <1480408090.583d3c1ab43ef@swift.generated>
Date: Tue, 29 Nov 2016 09:28:10 +0100
Subject: IntesisHome Notifications - Set point change
From: IntesisHome Notifications <notifications@intesishome.com>
Reply-To: no-reply@intesishome.com
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-CTCH-Score: 0.000
X-CTCH-ScoreCust: 0.000
X-PostalOut-Country: IP: 212.36.84.194 | Country: ES
X-PostalOut-Information: AntiSPAM and AntiVIRUS on relayout09
X-PostalOut-MsgID: 3tScBM2MxLzd8YC.A9FF4
X-PostalOut-SpamCheck: no es spam, Unknown
X-PostalOut-From: no-reply@intesishome.com
X-PostalOut-Watermark: 1481012892.69838@ctNc+jCFsykF2XZHGYT2Mw
X-Spam-Status: No


<p>Device name: Lounge</p>
<p>Action: Set point change</=
p>
<p>Current Value: 21.0&deg;C</p>
=20

Posted on
Tue Nov 29, 2016 5:27 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

Interesting. Still no "To" header. Which, after checking RFC-822 is actually optional. Huh.

OK, new version that handles missing headers fields will be available presently.

Edit: v7.0.2 posted.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Nov 29, 2016 6:19 pm
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Re: Better Email Q&A

That's weird... It's an email from my home aircon, so there isn't much I can do to change it.

Sadly still getting the same error.

Better Email Debug Received Message Subject: IntesisHome Notifications - Set point change
Better Email Debug Received Message From: IntesisHome Notifications <notifications@intesishome.com>
Better Email Error Error decoding "To:" header: coercing to Unicode: need string or buffer, NoneType found
Better Email Error Error decoding "To:" header: None, error: coercing to Unicode: need string or buffer, NoneType found

Posted on
Tue Nov 29, 2016 7:11 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

Can you restart the plugin and give me ALL the output.

And other than the error messages in the log, is it working correctly?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Nov 29, 2016 7:45 pm
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Re: Better Email Q&A

Hi Joe,

Sorry to be a pain, it was working fine so I don't know what has changed. It seem to be running, but the trigger labelled "Lounge - Downstairs AC" should be firing as it should match on the from address. As you can see from the log it doesn't match for some reason.

Thanks,
Pete

Starting plugin "Better Email 7.0.2" (pid 33834)
Better Email Debug logLevel = 10
Started plugin "Better Email 7.0.2"
Better Email Starting Better Email
Better Email Debug updateFrequency = 86400.0
Better Email Debug Jarvis Email: Device Version is up to date
Better Email Debug Starting server: Jarvis Email
Better Email Debug Adding Trigger Location - Automatic Car Update (IFTTT) (1814368987)
Better Email Debug Adding Trigger Location - Chris's iPhone arrived home (IFTTT) (46693833)
Better Email Debug Adding Trigger Location - Chris's iPhone left home (IFTTT) (490708886)
Better Email Debug Adding Trigger Lounge - Downstairs AC (1261190932)
Better Email Debug Adding Trigger Lounge - Person Seen (IFTTT) (1858095945)
Better Email Debug Adding Trigger Main Bathroom - Dryer Emptied (1887404485)
Better Email Checking for updates...
Better Email Debug Plugin version detected: 7.0.2
Better Email Debug Current version is: 7.0.2
Better Email Debug Getting latest release from FlyingDiver/Indigo-BetterEmail...
Better Email Debug GET /repos/FlyingDiver/Indigo-BetterEmail/releases/latest
Better Email Debug HTTP 200 OK
Better Email Debug Latest release is: 7.0.2
Better Email No updates are available
Better Email Debug Polling IMAP Server: Jarvis Email
Better Email Debug Jarvis Email: Doing connect using encryptionType = SSL
Better Email Debug Jarvis Email: Doing checkMsgs
Better Email Debug Jarvis Email: msg_ids = ['']
Better Email Debug Logged out from IMAP server: Jarvis Email

30 Nov. 2016, 12:36:58 pm
Better Email Debug Polling IMAP Server: Jarvis Email
Better Email Debug Jarvis Email: Doing connect using encryptionType = SSL
Better Email Debug Jarvis Email: Doing checkMsgs
Better Email Debug Jarvis Email: msg_ids = ['']
Better Email Debug Logged out from IMAP server: Jarvis Email
Better Email Debug Polling All Email Servers
Better Email Debug Polling serverId: 1175847649, serverTypeId: imapAccount(Jarvis Email)
Better Email Debug Polling IMAP Server: Jarvis Email
Better Email Debug Jarvis Email: Doing connect using encryptionType = SSL
Better Email Debug Jarvis Email: Doing checkMsgs
Better Email Debug Jarvis Email: msg_ids = ['1']
Better Email Debug Jarvis Email: Checking Message # 1
Better Email Debug Jarvis Email: Fetching Message # 1
Better Email Debug Received Message Subject: IntesisHome Notifications - on/off change
Better Email Debug Received Message From: IntesisHome Notifications <notifications@intesishome.com>
Better Email Error Error decoding "To:" header: coercing to Unicode: need string or buffer, NoneType found
Better Email Error Error decoding "To:" header: None, error: coercing to Unicode: need string or buffer, NoneType found
Better Email Debug Received Message ID: <1480469828.583e2d446b4f7@swift.generated>
Better Email Debug Checking Triggers for Device Jarvis Email (1175847649)
Better Email Debug Checking Trigger Location - Chris's iPhone arrived home (IFTTT) (46693833), regexMatch
Better Email Debug Skipping Trigger Location - Chris's iPhone arrived home (IFTTT) (46693833), wrong device: 1175847649
Better Email Debug Checking Trigger Location - Chris's iPhone left home (IFTTT) (490708886), regexMatch
Better Email Debug Skipping Trigger Location - Chris's iPhone left home (IFTTT) (490708886), wrong device: 1175847649
Better Email Debug Checking Trigger Lounge - Downstairs AC (1261190932), stringMatch
Better Email Debug Checking Device State messageFrom for string: notifications@intesishome.com
Better Email Debug No Match for Trigger Lounge - Downstairs AC (1261190932)
Better Email Debug Checking Trigger Location - Automatic Car Update (IFTTT) (1814368987), regexMatch
Better Email Debug Skipping Trigger Location - Automatic Car Update (IFTTT) (1814368987), wrong device: 1175847649
Better Email Debug Checking Trigger Lounge - Person Seen (IFTTT) (1858095945), regexMatch
Better Email Debug Skipping Trigger Lounge - Person Seen (IFTTT) (1858095945), wrong device: 1175847649
Better Email Debug Checking Trigger Main Bathroom - Dryer Emptied (1887404485), regexMatch
Better Email Debug Skipping Trigger Main Bathroom - Dryer Emptied (1887404485), wrong device: 1175847649
Better Email Debug Deleting message # 1
Better Email Debug Logged out from IMAP server: Jarvis Email

Posted on
Tue Nov 29, 2016 7:50 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

String match has to be an exact match. If you want a substring or other non-exact match, you need to use Regex Match.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Nov 30, 2016 12:08 am
peteinau offline
Posts: 65
Joined: Jan 10, 2015

Re: Better Email Q&A

Ah yeah.... Doh stupid me! Thanks for humouring me and solving my problem!

Posted on
Mon Dec 05, 2016 3:16 pm
ChopOMatic offline
Posts: 49
Joined: Sep 12, 2014

Re: Better Email Q&A

Joe, I'm having some issues with the plugin. Well, one issue really: I've created an IMAP device for a Gmail address. Its STATE in the Indigo main interface is FAILURE, and thus nothing is working. I have an app password set for this Gmail address and while Indigo's built-in email functionality works fine, the BE plugin does not. Immediately after I configure the plugin's settings, I get the following:


Code: Select all
Dec 5, 2016, 3:09:16 PM
   Better Email Debug              getDeviceConfigUiValues, typeID = imapAccount
   Better Email Debug              getDeviceConfigUiValues: no change, already populated
   Better Email Debug              validateDeviceConfigUi called

Dec 5, 2016, 3:10:03 PM
   Email Scanned                   from "1##########.44154.38TkPJ2gqJ@txt.voice.google.com"; subject "SMS from 44154"


Is there perhaps a known issue with Gmail IMAP?

Thanks!

Posted on
Mon Dec 05, 2016 3:42 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

ChopOMatic wrote:
Joe, I'm having some issues with the plugin. Well, one issue really: I've created an IMAP device for a Gmail address. Its STATE in the Indigo main interface is FAILURE, and thus nothing is working. I have an app password set for this Gmail address and while Indigo's built-in email functionality works fine, the BE plugin does not. Immediately after I configure the plugin's settings, I get the following:


Code: Select all
Dec 5, 2016, 3:09:16 PM
   Better Email Debug              getDeviceConfigUiValues, typeID = imapAccount
   Better Email Debug              getDeviceConfigUiValues: no change, already populated
   Better Email Debug              validateDeviceConfigUi called

Dec 5, 2016, 3:10:03 PM
   Email Scanned                   from "1##########.44154.38TkPJ2gqJ@txt.voice.google.com"; subject "SMS from 44154"


Is there perhaps a known issue with Gmail IMAP?

Thanks!


There's nothing there indicating any error condition in the BE plugin. I only see debug output for the device configuration call, not for any polling calls.

The "Email Scanned" line is not from my plugin. Do you still have the built in email scanner running? If so, it's seeing the mails before the plugin is and either marking them read or deleting them. Or the plugin is never actually scanning. What do you have for the poll interval? Or do you have IDLE enabled?

GMail IMAP does work, but it has a tendency to close connections randomly if you're trying to keep it open with IDLE.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Dec 05, 2016 4:42 pm
ChopOMatic offline
Posts: 49
Joined: Sep 12, 2014

Re: Better Email Q&A

2016-12-05_16-31-19.gif
2016-12-05_16-31-19.gif (9.1 KiB) Viewed 1662 times
Finally got it successfully reading the incoming emails. (Turned off 2-step authentication in Gmail, deleted every existing email in the account, changed password, reconfigured plugin.)

My only remaining problem is the failure of the string match trigger, even though the specified text is clearly in the email.

Code: Select all
Dec 5, 2016, 4:25:41 PM
   Better Email Debug              ChopIndigo Email: IDLE Event Received
   Better Email Debug              ChopIndigo Email: Doing checkMsgs
   Better Email Debug              ChopIndigo Email: msg_ids = ['1 2 3 4 5 6']
   Better Email Debug              ChopIndigo Email: Checking Message # 1
   Better Email Debug              ChopIndigo Email: Message # 1 already seen, skipping...
   Better Email Debug              ChopIndigo Email: Checking Message # 2
   Better Email Debug              ChopIndigo Email: Message # 2 already seen, skipping...
   Better Email Debug              ChopIndigo Email: Checking Message # 3
   Better Email Debug              ChopIndigo Email: Message # 3 already seen, skipping...
   Better Email Debug              ChopIndigo Email: Checking Message # 4
   Better Email Debug              ChopIndigo Email: Message # 4 already seen, skipping...
   Better Email Debug              ChopIndigo Email: Checking Message # 5
   Better Email Debug              ChopIndigo Email: Message # 5 already seen, skipping...
   Better Email Debug              ChopIndigo Email: Checking Message # 6
   Better Email Debug              ChopIndigo Email: Fetching Message # 6
   Better Email Debug              Received Message Subject: SMS from 44154
   Better Email Debug              Received Message From: 44154 <14066862467.44154.38TkPJ2gqJ@txt.voice.google.com>
   Better Email Debug              Received Message To: @@@@@@gmail.com
   Better Email Debug              Received Message ID: <+1#######.8ac3da525c9c09068c2da95ef1e48077a4194f63@txt.voice.google.com>
   Better Email Debug              Checking Triggers for Device ChopIndigo Email (1017660371)
   Better Email Debug                 Checking Trigger AWS Button #1 - Single Click (910245963), stringMatch
   Better Email Debug                 Checking Device State messageText for string: G030JF056181W42P
   Better Email Debug                 No Match for Trigger AWS Button #1 - Single Click (910245963)


Screenshot of the trigger's config:
2016-12-05_16-30-50.png
2016-12-05_16-30-50.png (25.16 KiB) Viewed 1662 times


Screenshot of the incoming email:
2016-12-05_16-31-19.gif
2016-12-05_16-31-19.gif (9.1 KiB) Viewed 1662 times

Posted on
Mon Dec 05, 2016 4:49 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

stringMatch is an exact match for the field. For a substring or pattern match, you need to use the regex trigger.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Dec 05, 2016 6:44 pm
ChopOMatic offline
Posts: 49
Joined: Sep 12, 2014

Re: Better Email Q&A

AHHHHHHH...

BOOM. Now playing both kinds of music: Rock AND roll!

Thx, Joe!

Posted on
Mon Dec 05, 2016 7:05 pm
ChopOMatic offline
Posts: 49
Joined: Sep 12, 2014

Re: Better Email Q&A

I now have an Amazon AWS IoT button integrated into my Indigo setup, thanks to Joe. I can trigger three different actions depending on whether I single-click, double-click, or long-click the button.

Posted on
Mon Dec 05, 2016 7:08 pm
FlyingDiver offline
Posts: 2613
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email Q&A

ChopOMatic wrote:
I now have an Amazon AWS IoT button integrated into my Indigo setup, thanks to Joe. I can trigger three different actions depending on whether I single-click, double-click, or long-click the button.


Sweet.

PS - I just added a note to the Event Creation dialog box calling out that String Match is an exact match. Should have had that there before.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 1 guest