Hi,
here's a plug-in which connects to a Jabber server (eg Google Talk), and transforms received messages and online statuses into events.
It also let's you send messages through actions.
Received messages get transformed into 3 events:
XMPP.Message | Test
XMPP.Message | [email protected] | Test
XMPP.Message | [email protected]/resource | Test
so that you can choose the required granularity for each message
and online statuses look like
XMPP.Presence | Online | [email protected]/device1
XMPP.Presence | Online | [email protected]/device2
XMPP.Presence | Offline | [email protected]/device2
XMPP.Presence | Online | [email protected]/somedevice
I'm using it to automatically lower the volume on my netbook when the main machine is turned off, because I usually plug in the headphones into it after turning it off. And when the main machine is turned on, the volume on the netbook is set to 100% because I then usually plug it into a mixer which requires the full audio level.
I'd appreciate to get some feedback.
Greetings,
Daniel
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
XMPP Client
XMPP Client
- Attachments
-
- XMPP.zip
- (148.48 KiB) Downloaded 424 times
-
HTPCanwender
- Experienced User
- Posts: 89
- Joined: Wed Feb 08, 2012 9:41 pm
- Location: Germany
Re: XMPP Client
I tried to use your plugin, but I did not get it work. I have a jabber account at jabber.de. When starting the plugin I get the following Error:
Fehler beim Start des Plugins: XMPP
Traceback (most recent call last) (1669):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
self.instance.__start__(*self.args)
File "C:\Program Files (x86)\EventGhost\plugins\xmpp\__init__.py", line 123, in __start__
client.auth(username, password, resource=resource)
File "C:\Program Files (x86)\EventGhost\plugins\xmpp\xmpp\client.py", line 214, in auth
while not self.Dispatcher.Stream._document_attrs and self.Process(1): pass
AttributeError: Client instance has no attribute 'Dispatcher'
Can You please help me?
Fehler beim Start des Plugins: XMPP
Traceback (most recent call last) (1669):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
self.instance.__start__(*self.args)
File "C:\Program Files (x86)\EventGhost\plugins\xmpp\__init__.py", line 123, in __start__
client.auth(username, password, resource=resource)
File "C:\Program Files (x86)\EventGhost\plugins\xmpp\xmpp\client.py", line 214, in auth
while not self.Dispatcher.Stream._document_attrs and self.Process(1): pass
AttributeError: Client instance has no attribute 'Dispatcher'
Can You please help me?
Re: XMPP Client
HTPCanwender wrote: Mon Jan 04, 2016 12:18 am I tried to use your plugin, but I did not get it work. I have a jabber account at jabber.de. When starting the plugin I get the following Error:
Fehler beim Start des Plugins: XMPP
Traceback (most recent call last) (1669):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
self.instance.__start__(*self.args)
File "C:\Program Files (x86)\EventGhost\plugins\xmpp\__init__.py", line 123, in __start__
client.auth(username, password, resource=resource)
File "C:\Program Files (x86)\EventGhost\plugins\xmpp\xmpp\client.py", line 214, in auth
while not self.Dispatcher.Stream._document_attrs and self.Process(1): pass
AttributeError: Client instance has no attribute 'Dispatcher'
Can You please help me?
I had the same problem as you, and after a lot of investigations I came up with a fix, that works for me, and I thought I could share it with you and others, here's what you have to do :
you need to edit just a single file, here is my path (yours could be different depending where you usually install your plugins) :
C:\ProgramData\EventGhost\plugins\XMPP\xmpp\transports.py
open the file and go around line 32, comment this line :
Code: Select all
#import socket,select,base64,dispatcher,sysCode: Select all
import socket,ssl,select,base64,dispatcher,sysCode: Select all
# tcpsock._sslObj = socket.ssl(tcpsock._sock, None, None)
# tcpsock._sslIssuer = tcpsock._sslObj.issuer()
# tcpsock._sslServer = tcpsock._sslObj.server()Code: Select all
tcpsock._sslObj = ssl.wrap_socket(tcpsock._sock, None, None)
tcpsock._sslIssuer = tcpsock._sslObj.getpeercert().get('issuer')
tcpsock._sslServer = tcpsock._sslObj.getpeercert().get('server')Now remains 2 other problems with this plugin, although it works good, it could be perfect, let me explain :
1/ there is no support of variables, for example you can't put {eg.result} in the field where you can send messages, all you can do is put some regular text and that's all. This is a huge limitation and could be fixed rather easily by some folks on this forum (first person that comes to my mind is kg
2/ there is no proper auto-reconnection functionality when you're disconnected from the server (either the XMPP server disconnects you for some reason, or when you lose your internet connection), sometimes it reconnects automatically and sometimes it won't... so not very reliable ! and sometimes because of this behavior, EG completely freezes !! only a restart of EG can fix this... The workaround I've found so far, is to disable the XMPP plugin, wait 2 seconds, then re-enable it, not very clean solution, but at least it works
https://xmpp.org/extensions/xep-0199.html
I was glad to find out that I wasn't the only one having this issue : viewtopic.php?f=9&t=6797
So for now, I'm using this plugin with those limitations, until some smart guy can improve things with this plugin.