Page 1 of 1

Instant Messenger & Email -- Control & Notifications

Posted: Sat Oct 18, 2008 5:55 pm
by Livin
The ability to control EG and get notifications from EG vial email and IM.

There is a nice app called x10dispatcher (.com) that does this for the X10 protocol (Home Automation). This way you can control your house via email or IM.

EG could use this method for almost anything! Not only internet "remote" control but even Any Device to EG PC control, like an event service.

Some scenarios...
1) Each or your PCs has an IM acct (or they all log into one and commands specify which one processes a cmd) - you can control them via the internet (work PC, wireless laptop, mobile phone, etc)
2) Event on an EG PC triggers IM command to other PCs, mobile devices, etc... sends alerts, status, triggers other commands on other EG PCs, etc.

This has an immeasurable potential for possibilities!

Re: Instant Messenger & Email -- Control & Notifications

Posted: Sat Oct 18, 2008 8:29 pm
by Pako
This is a beautiful coincidence.
I have a few days thinking that something similar also I do. I even have some of the functions made a little test.
I can do it, but only E-mail part. I do not use any messenger.
Pako

Re: Instant Messenger & Email -- Control & Notifications

Posted: Sat Oct 18, 2008 9:01 pm
by Livin
I'd be happy to do some testing for you once you are ready.

If you can do build IM into it IMO is even more useful. IM is instant (no email delays) and my Windows Live Messenger is always on and it would be easier to have each computer have a different IM profile/identity (login) so there would be no need to do do any subject line filtering to target a specific computer.

Re: Instant Messenger & Email -- Control & Notifications

Posted: Fri Oct 24, 2008 7:56 pm
by CollinR
This might be possible already with a cm15a which is what x10Dispatcher used.

This is my first google hit but I am sure there are more command line messaging options out there.
http://users.skynet.be/fa397903/myprogs ... index.html

EDIT:
How did I miss this one. lol
MSN IM python library
http://blitiri.com.ar/p/msnlib/

Re: Instant Messenger & Email -- Control & Notifications

Posted: Tue Oct 28, 2008 12:46 am
by Livin
this would be sweet... Pako, can you try to implement it?

Re: Instant Messenger & Email -- Control & Notifications

Posted: Tue Nov 04, 2008 3:31 pm
by Livin
Pako?

Re: Instant Messenger & Email -- Control & Notifications

Posted: Tue Nov 04, 2008 9:37 pm
by Pako
Livin wrote:Pako?
Well, I write something about it. Several for days I thereon struggling work. But it will be a lot of work, so it still will take some time. I decided that plugin in the first phase it will only support e-mail. Instant Messaging I will add to it later. In order to see that I have something, I attach some pictures.
Pako

Re: Instant Messenger & Email -- Control & Notifications

Posted: Tue Nov 04, 2008 9:47 pm
by Livin
Thanks for working on this!

I figured IM would be easier than email?
... email must log in to a server, check for new email, send and receive emails, etc... where IM logs in and is always on, no?

I like the real-time response of IM for these applications a lot more than email too... can do IM from almost any device now (PC, MAC, Linux, mobile phone, etc... much easier than email to use on mobile devices too).

Let me know when you get to the IM portion... I'd be happy to test!

Re: Instant Messenger & Email -- Control & Notifications

Posted: Mon Jan 12, 2009 12:25 pm
by Pako
A few notes on the issue of Instant Messaging.
Even before I started writing plug E-mail I knew to write a universal plugin for IM is a problem. Unlike the E-mails are not for IM almost no Python modules (libraries). E-mail has the one great advantage, unlike IM: It is uniform and it does not matter what kind of who uses the e-mail service, the e-mail client and even the OS. If everything is all right, the message will be delivered to its addressee. By contrast, in the IM is a large number of mutually incompatible networks. It is impossible to write a relatively simple plug-in such a way that it could be used by any user of the program EventGhost. For example, in our country are very few extended service WLM. Are much more widespread ICQ and Jabber. User Jabber service can not send a message to the user services WLM.

Therefore, I first made plugin purely for e-mail. I think, that the result is not bad, but probably will be some mistake somewhere. There is no reaction to it, and even negative. I don't know what is the cause. Maybe one can not use it without instructions? Maybe nobody needs him? Can you please someone explain?

Now back to the IM.
I reached the decision that implant the IM to E-mail plugin is not reasonable. I think it will better do for IM plugin completely separate. Of course, I have nothing against that someone made a universal plugin for E-mail and IM. If better, we can mine E-mail plugin drop.

I am looking for solutions to make a plugin for the IM and I found perhaps the most viable solution:
Plugin for IM should be aligned on a universal IM client. The great advantage of this way is that the plugin may
not "know" the various IM services, or protocols. This would arrange the client.
I was looking for a suitable (the most universal) IM client, and yet it seems like the best client Pidgin:
http://www.pidgin.im/.
To try this option, I did a simple script that works as an interface between Pidgin and EventGhost. If Pidgin take a new message, the script generates for EventGhost an event.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1487">
    <Folder Name="Test Pidgin" Expanded="True">
        <Macro Name="Find Window: pidgin.exe" Expanded="True">
            <Action>
                EventGhost.PythonScript(u"from threading import Thread, Event\nfrom win32gui import GetWindowText\nkey = u'[NewMail]'\nfindPidginWin = eg.WindowMatcher(u'pidgin.exe', key+u'{*}', u'gdkWindowToplevel', None, None, 1, True, 0.0, 0)\nclass MyThread(Thread):\n    def __init__(self):\n        Thread.__init__(self, name = 'MyThread')\n        self.event = Event()\n        \n    def run(self):\n        cnt = 0\n        while True:\n            hwnds = findPidginWin()\n            if len(hwnds) != 0:\n                title = GetWindowText(hwnds[0])\n                end = title.find(']',len(key))\n                count = title[len(key)+1:end]\n                if count > cnt:\n                    cnt = count\n                    eg.TriggerEvent('Pidgin',count)\n            else:\n                cnt = 0\n            self.event.wait(5)\n            self.event.clear()\n            \n\nmt = MyThread()\nmt.start()\n")
            </Action>
        </Macro>
        <Macro Name="New messages !!!" Expanded="True">
            <Event Name="Main.Pidgin" />
            <Action>
                EventGhost.ShowOSD(u'{eg.event.payload} new messages !!!', u'0;-37;0;0;0;700;0;0;0;238;3;2;1;66;Comic Sans MS', (0, 255, 64), (0, 0, 0), 0, (0, 0), 0, 10.0, True)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
To script work, you must configure Pidgin. You can do this according to the attached screenshots.

If you should go this way, it would be necessary to do the plugin on Pidgin side too. Then, it would certainly be able to transmit to EventGhost not only the information that came the report, but also for example its content and the sender. The problem is that the Pidgin plugins are written in C and C language I not understand. Would had to take it someone else.
I therefore ask:
1) It my idea, do plugin linked to IM client reasonable?
2a) If yes, do you agree with the choice of the client (Pidgin), or you know a more appropriate?
2b) If not, what solution you propose?
3) If 1) and 2a) is right, it is necessary to create a plugin for Pidgin. Find we someone, who will do it? Perhaps it would not be a big problem, it is possible to inspire the many existing plugins.
Pako

Re: Instant Messenger & Email -- Control & Notifications

Posted: Fri Jan 23, 2009 8:38 pm
by gavin.philips
What advantage would the email approach have over using the webserver plugin to host a very simple page with buttons to activate whichever macros you wish?

The only one I can see so far is that an email or SMS approach would allow you to send commands from a "dumb phone" which doesn't have a web browser. Is that the goal, or am I missing something?

Re: Instant Messenger & Email -- Control & Notifications

Posted: Sat Jan 24, 2009 8:04 pm
by Pako
The option to use e-mail to control your computer is not the main purpose of this plugin (but it may be useful). The main purpose is different - the notification of e-mail message. There are many good programs, that perform the same task. But I think, that none of them has so many options to respond to the income message, as EventGhost. And that's good, right?
Pako

Re: Instant Messenger & Email -- Control & Notifications

Posted: Sun Jan 25, 2009 12:10 am
by Livin
Pako,
Your IM solution is slick! You think there is a way to allow the IM from the EG computer to send status messages - depending on what is happening?

Re: Instant Messenger & Email -- Control & Notifications

Posted: Sun Jul 12, 2009 12:41 am
by ryanmc
hello have you gone any further with the im integration ? i like the plugin it looks like at this stage it can only notify eg of the new message but cant send the message itself ? unless ive done something wrong.

Re: Instant Messenger & Email -- Control & Notifications

Posted: Sun Jan 20, 2013 7:47 am
by flopp
I would like to send en email to myself when I receive an RF signal/event) is this possible with this plugin?
Where can i download this plugin?