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.

XMPP plugin request

Got a good idea? You can suggest new features here.
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

kgschlosser wrote: Wed Dec 20, 2017 10:41 pm I do not know how fast you are trying to send a command after switching to wifi. but do me a favor. make sure your connection is good first by loading a non cached webpage. to make sure then try it and see if it works.
I think you're right, I wasn't waiting long enough :) I was waiting about 5 seconds only... sorry... if I load a web page and then send a command it works !! So that's a real fix I guess, good job again ! :)

now, there are only 2 things left to make it perfect :
1/ just add my modification of the transports.py file in your version of the plugin
2/ see if you can add the possibility to send variables instead of plain text (as it is now)

and of course a BIG Thaaaaank Youuuuuu ;)
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

in case you missed it, I was talking about my modification here :
viewtopic.php?f=10&t=2895#p49480
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

ok so i added the parsing of the jid (email address) and message to use variables as well.

I also changed how it sends the message out. you will no longer get a disconnect message. it will store the messages when it reconnects it will send any/all messages that are in the storage.

I also included the fix you noted.
Attachments
XMPP-1.1.2.egplugin
(68.41 KiB) Downloaded 57 times
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

humm... strange I can't send or receive any messages anymore, I didn't do anything just installed the new version, restarted EG, and that's all
it connects correctly to the server though.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

I am going to back step one thing at a time. see where the failure is.


the first thing I am removing is the ssl changes
Attachments
XMPP-1.1.2.egplugin
(68.39 KiB) Downloaded 49 times
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

Thank you for having trust in me :)

As I told you in my previous post, the connection to the server was OK, it means that we have past the SSL part, which also means that the modification I have asked you to include was also working. Anyway, I did the test to be sure, and without surprise here's what I get :

Code: Select all

21/12 10:04:42         Error starting plugin: XMPP
21/12 10:04:42         Traceback (most recent call last) (0.5.0-rc4):
21/12 10:04:42           File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 192, in Start
21/12 10:04:42             self.instance.__start__(*self.args)
21/12 10:04:42           File "C:\ProgramData\EventGhost\plugins\XMPP\__init__.py", line 138, in __start__
21/12 10:04:42             client.connect(server=(server, int(port)))
21/12 10:04:42           File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\client.py", line 205, in connect
21/12 10:04:42             while not self.TLS.starttls and self.Process(1): pass
21/12 10:04:42           File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\dispatcher.py", line 303, in dispatch
21/12 10:04:42             handler['func'](session,stanza)
21/12 10:04:42           File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\transports.py", line 345, in StartTLSHandler
21/12 10:04:42             self._startSSL()
21/12 10:04:42           File "C:\ProgramData\EventGhost\plugins\XMPP\xmpp\transports.py", line 324, in _startSSL
21/12 10:04:42             tcpsock._sslIssuer = tcpsock._sslObj.issuer()
21/12 10:04:42         AttributeError: '_ssl._SSLSocket' object has no attribute 'issuer'
As soon as I put back my SSL modification to the transports.py file, I am able to connect to the server again, but I still can't send/receive messages. So I think you need to revert another change you have made recently until we find out why it does that.

Just for fun, I reinstalled the previous version you made 1.1.1, inserted my SSL modification, and it worked again.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

i have no doubt that the modifications are needed. but it was the last thing that i added and I could have messed them up some how.. and when using undo they were the items last change so they are the first to go.
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

no worries, I wasn't trying to be rude ;)
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

Hi,

did you have the time to revert some of your recent modifications ? Let me know if you want me to test anything. I think you're not far from resolving the issue.

Thanks.
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

Hi, I wanted to let you know that sometimes the auto reconnection doesn't work (despite your fix), sometimes it works but not every time, quite strange... when this happens, If I try to stop the XMPP plugin and restart it 10 seconds later, EG freezes !! and I must shut it down completely... When I re-launch EG, the XMPP connection works fine again until next time... not very user friendly and frustrating.

This behavior is observed with version 1.1.1, the newer version 1.1.2 never worked for me.

I hope you can find a way to fix the auto reconnect feature once and for all ;)

Thank you
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

Hi,

I'm still looking here and there to see if I can find some more clues that might help you, and I discovered something interesting that you can reproduce (on version 1.1.1).

Case 1
When the plugin is running and working correctly (sending/receiving messages as expected), if I choose to disable the plugin, it gets disabled and throws the following event : XMPP.Logout (which is normal). Now, if I want to re-enable it 10 seconds later (I've waited even more to be sure), EG freezes ! I have to kill the EG process and relaunch it !

Case 2
if I start EG, and disable the plugin, save EG, close EG properly, then re-launch EG (meaning EG starts with the plugin disabled), and now if I choose to enable the plugin, it gets enabled and throws the following event : XMPP.Login (which is normal too). Now, if I want to disable it, it gets disabled and throws the following event : XMPP.Logout (which is normal), but if I want to re-enable it 10 seconds later, EG freezes ! I have to kill the process and relaunch EG !


With the original plugin version 1.0.0, I don't have this ! I can disable/enable as much as I want and it works both ways.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

ok cool I will look into it today and get it straightened out for ya
If you like the work I have been doing then feel free to Image
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

Hi, any chance that you can fix your latest version 1.1.2 anytime soon ? :)
Thank you.
Snowbird
Experienced User
Posts: 364
Joined: Fri Jul 03, 2009 10:04 am

Re: XMPP plugin request

Post by Snowbird »

hi,
it would be nice if you could have look :)
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser »

OK I found a typo that I made. See if this one will work properly. I have added back in the SSL as well.
Attachments
XMPP-1.1.3.egplugin
(68.44 KiB) Downloaded 52 times
If you like the work I have been doing then feel free to Image
Post Reply