Better Email Q&A

MeetKevin
Posts: 8
Joined: Sat Jul 04, 2015 7:10 pm

Re: Better Email Q&A

Post by MeetKevin »

Oh, good point. I'll tinker and report back; Thank you!


Sent from my iPhone using Tapatalk
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Better Email Q&A

Post by Professor Falken »

Does anyone know the device state name to use when asking for the state of an Insteon leak sensor.

In the Indigo window, The only thing displayed is On State, with an on and an off button. This is obviously different than many of the devices that have numerous custom states that are clearly named in the device window.

I have tried all manner of onState, OnState, on_state, device_state, etc. all without success in getting the plugin to insert the "Off" value of the leak sensor.

Any ideas?
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Better Email Q&A

Post by FlyingDiver »

"onOffState" is what you want, I think.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Better Email Q&A

Post by Professor Falken »

yep, that did it. Thanks.
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Better Email Q&A

Post by Professor Falken »

For an email of any length, I assume most users are crafting the body in another application (text editor, etc.) then pasting into the single-line body field in the plugin, right?

Has anyone figured out a way to get spacing to work well? I have things lined up very nicely in the text editor (mostly using the tab key), but somewhere in the copy/paste process all those alignments fall apart.

Am I perhaps missing a better way to accomplish this?

Thanks.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Better Email Q&A

Post by FlyingDiver »

Are you using the latest version? 7.1.0 has a multi-line input field for the message body.

You could try using the HTML option for the text body if you're looking for more accurate formatting. I can't help with crafting the HTML, but you have the option.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
Professor Falken
Posts: 304
Joined: Sun Mar 29, 2015 7:07 am

Re: Better Email Q&A

Post by Professor Falken »

No, I have not yet upgraded. I will do that. Thanks for the tip.

I've had a fair amount of luck crafting the emails in an email composer, instead of in the Mac text editor, then copying them into the plugin. When it spits them back out (with variable, etc. inserted), the format is pretty close to how I set it up.
shrxman
Posts: 83
Joined: Wed Apr 22, 2015 2:41 am

Re: Better Email Q&A

Post by shrxman »

I keep getting this error when I try to get a trigger to fire with your plugin:
Trigger BetterEmailTest
Better Email Debug Checking Triggers for Device new device 2 (1909017508)
Better Email Debug Deleting message # 39
Better Email Debug Received Message Subject: Commands?
Better Email Debug Received Message From: Name <EmailAddress Here>
Better Email Debug Received Message To: Name <EmailAddressHere>
Better Email Debug Received Message ID: <CABcJYVa2G214=zD1DZhp-jcGEgKJBaymu3JL6Aym_PtntS=GkA@mail.gmail.com>
Better Email Debug Checking Triggers for Device new device 2 (1909017508)
Better Email Debug Deleting message # 39
betterEmailProcessor 04/09/17 19:28:56 status=Invoked
Script Error betterEmailProcessor.py: 'key id 1877593651 not found in database'
Script Error Exception Traceback (most recent call shown last):

betterEmailProcessor.py, line 147, at top level
KeyError: 'key id 1877593651 not found in database'


I think that's because I was testing this before, and had issues, so I tried to reinstall the plugin. I removed all references to it (triggers and the like), disabled the plugin, shut down, deleted the preferences and the plugin(Disabled) entry, restarted and reinstalled, but i'm still getting that reference? Is that data stored in the DB somewhere? Is there a way to purge it, or remove reference to it? Make some progress on a script to process all of my inbound emails using your plugin.. Now if only I can get this trigger to fire :-)

thanx,
~ken
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Better Email Q&A

Post by FlyingDiver »

The error is coming from your script (betterEmailProcessor.py, line 147), not the plugin. No idea what you're doing in there.

Why are you using a script rather than normal Indigo actions?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
shrxman
Posts: 83
Joined: Wed Apr 22, 2015 2:41 am

Re: Better Email Q&A

Post by shrxman »

Ah.. so it is! thanks. i was going nuts trying to find that one. I'm making my email commands more dynamic, by using metadata within my action groups to define what commands can be triggered via email by what users. Makes it easier to maintain when my 'list commands' script can just query all of the Action Groups that can be triggered by email and build it dynamically. Also, now I only have to add the meta data to the action group and it's invocable via email.

thanx again, you're much too kind.. and.. too quick to reply :-)
~ken
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Better Email Q&A

Post by petematheson »

I'm getting this error when testing the plugin from my Office 365 account going to a Gmail account which your plugin is checking via Gmail & IDLE.
It's literally a blank email with 'Testing 2' as the subject.

Better Email Debug Polling All Email Servers
Better Email Debug Polling serverId: 544905975, serverTypeId: imapAccount(Gmail)
Better Email Debug Polling IMAP Server: Gmail
Better Email Debug Gmail: Doing connect using encryptionType = SSL
Better Email Debug Gmail: Doing checkMsgs
Better Email Debug Gmail: msg_ids = ['1']
Better Email Debug Gmail: Checking Message # 1
Better Email Debug Gmail: Fetching Message # 1
Better Email Debug Received Message Subject: Testing 2
Better Email Debug Received Message From: Pete Matheson <[email protected]>
Better Email Debug Received Message To: "[email protected]" <[email protected]>
Better Email Debug Received Message ID: <[email protected]>
Better Email Error IMAP server connection error: No registered converter was able to produce a C++ rvalue of type CCString from this Python object of type instance
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Better Email Q&A

Post by FlyingDiver »

Does the error go away if there's any content to the email? Even a single character?


Sent from my iPad using Tapatalk
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
petematheson
Posts: 847
Joined: Sun Sep 14, 2014 9:51 am
Location: Southampton, UK

Re: Better Email Q&A

Post by petematheson »

Nope, same error.
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Better Email Q&A

Post by FlyingDiver »

Can you use the web interface for Gmail and get a copy of the raw content for the message and PM it to me?

I need the raw headers too.

Sent from my iPad using Tapatalk
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Better Email Q&A

Post by FlyingDiver »

I'm traveling this weekend so it'll be Monday before I can really look at it.


Sent from my iPad using Tapatalk
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Post Reply

Return to “Better Email”