XMPP plugin request

Got a good idea? You can suggest new features here.
User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Tue Jan 30, 2018 3:40 pm

i did the payloads that way because of the unsubscribe and the reply methods being there
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 » Wed Jan 31, 2018 8:16 am

This morning when I resumed my computer I got the same problem as with the previous plugin, xmpp didn't work... when disabling/enabling the plugin to try to make it work again, EG froze... So I had to restart EG, now everything works fine again :cry:

the never ending story....

User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Jan 31, 2018 5:59 pm

hmmmm maybe the problem isn't with the plugin then...

are you using a wifi card or a lan card?
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 » Wed Jan 31, 2018 6:08 pm

wifi, but how come it works fine all day long ? sometimes I put my computer to sleep during the day and resume it an hour later and it still works fine. This bug only appears at night, when the computer is asleep for several hours (just like me :) ).

I have installed this plugin, on another computer that is on 24/7 and it's connected through Ethernet, and I never get any problem, since the computer is always on...

User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Jan 31, 2018 10:05 pm

what is happening is because of the Wifi.

When a computer resumes and the wifi card powers back up. it takes a very long while for the thing to connect. can be upwards of 30 seconds. sometimes it can connect lightning fast less then a second. it's WiFi, inherently unreliable. has all kinds of oddities that take place that have no reason as to why.

Now I can set a thread that will try to connect the thing every second for say a minute then error out.
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 » Wed Jan 31, 2018 10:41 pm

Don't waste your time on this, as I said sometimes I put my computer in sleep mode during the day then resume it a bit later, and it works everytime, so it's not a wifi issue (it's a timeout issue somewhere...). When I resume, I'm able to surf in less than 10 seconds (I get the connection ready pretty fast). So just leave it as it is, it's ok I will restart EG every morning :)

Could you please check my other points I have mentioned earlier ? particularly the one about the status ( viewtopic.php?f=5&t=9936&start=75#p49983 )?

thanks.

User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Wed Jan 31, 2018 11:02 pm

as far as the Offline and Available They are not listed with the library as available options. So I did not know about them. I added them to the list of options.

I added xep 0199 support (XMPP Ping) This is used to keep the connection alive. It works in the background and is seamless to you. this will only work if the server you are connected to send out ping packets.

As far as the WiFi goes. It is not a timeout issue! It is a connection issue. This is 2 plugins that use different libraries. and all different code that have the exact same issue. so the issue is not with EG or with the plugins it is with the duration of time that it takes to reconnect to the network (not how long it takes the WiFi card to connect to the Access Point) when your computer resumes. This duration can be affected if you are using DHCP as this can also take a while. WiFi can be fast and horribly slow it's a crap shoot. (This is the reason as to why all of my HA devices are hard wired)

I have made some changes to handle this it will keep on trying to reconnect once a second for 60 seconds. if it fails after the 60 seconds then the plugin stops.

If this solves the problem we then know the cause of the problem. I am 99.9% sure this is where the issue is so I coded around it.
Attachments
XMPPPlus-0.1.3b.egplugin
(412.95 KiB) Downloaded 60 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 » Wed Jan 31, 2018 11:38 pm

ok, just installed it, let's hope you're right, the only way to know for sure is to go in sleep mode for several hours, if it works after that, then BINGO ! :)

Regarding the addition of the XEP 0199, that's a great idea, I had requested it from you at the very beginning a month ago or so (you were a baby xmpp wise back then :) and you probably missed it), I'm glad it's there now :) should help a lot. BTW, I saw that there were plenty of other XEP addons available integrated in this plugin, of course I don't need them all and not all them are supported by remote servers anyway :), but some of them could be useful, is it hard to implement them ? Can you tell me which XEP's you have implemented so far ? I'm interested in XEP 0357 : https://xmpp.org/extensions/xep-0357.html do you think you can implement it as well ?

thank you again for everything, I think we're getting closer and closer to a 100% working XMPP plugin :)

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

Re: XMPP plugin request

Post by Snowbird » Wed Jan 31, 2018 11:46 pm

forget about XEP0357, it's not even included in the plugin, I thought it was there but it was a mistake, just forget about it :)

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

Re: XMPP plugin request

Post by Snowbird » Wed Jan 31, 2018 11:53 pm

by the way, thanks for the addition of Available and Offline, for some reason the Offline Presence type, displays "Available" instead of offline on my client. On the other hand, the Available Presence type shows "Available" so this one is ok :)

User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Thu Feb 01, 2018 4:36 am

well if you really think about it... if you were offline you wouldn't have sent that presence. So I am guessing that one is reserved for when you are actually "Offline".

This could be the reason why those 2 were not listed in the libraries. I am thinking they are reserved for non user use. But at any rate. I will remove the Offline since it does not work properly.

I am really not trying to get into the meat and potatoes of XMPP which is what would be required if I had to make any xep additions.

These are the ones that I can do.
  • xep_0004
  • xep_0009
  • xep_0012
  • xep_0013
  • xep_0016
  • xep_0020
  • xep_0027
  • xep_0030
  • xep_0033
  • xep_0047
  • xep_0048
  • xep_0049
  • xep_0050
  • xep_0054
  • xep_0059
  • xep_0060
  • xep_0065
  • xep_0066
  • xep_0071
  • xep_0077
  • xep_0078
  • xep_0080
  • xep_0084
  • xep_0085
  • xep_0086
  • xep_0091
  • xep_0092
  • xep_0095
  • xep_0096
  • xep_0107
  • xep_0108
  • xep_0115
  • xep_0118
  • xep_0122
  • xep_0128
  • xep_0131
  • xep_0152
  • xep_0153
  • xep_0172
  • xep_0184
  • xep_0186
  • xep_0191
  • xep_0196
  • xep_0198
  • xep_0199
  • xep_0202
  • xep_0203
  • xep_0221
  • xep_0224
  • xep_0231
  • xep_0235
  • xep_0249
  • xep_0257
  • xep_0258
  • xep_0279
  • xep_0280
  • xep_0297
  • xep_0308
  • xep_0313
  • xep_0319
  • xep_0323
  • xep_0325
  • xep_0332
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 » Thu Feb 01, 2018 9:17 am

kgschlosser wrote:
Wed Jan 31, 2018 11:02 pm
As far as the WiFi goes. It is not a timeout issue! It is a connection issue. This is 2 plugins that use different libraries. and all different code that have the exact same issue. so the issue is not with EG or with the plugins it is with the duration of time that it takes to reconnect to the network (not how long it takes the WiFi card to connect to the Access Point) when your computer resumes. This duration can be affected if you are using DHCP as this can also take a while. WiFi can be fast and horribly slow it's a crap shoot. (This is the reason as to why all of my HA devices are hard wired)

I have made some changes to handle this it will keep on trying to reconnect once a second for 60 seconds. if it fails after the 60 seconds then the plugin stops.

If this solves the problem we then know the cause of the problem. I am 99.9% sure this is where the issue is so I coded around it.
You were right, this morning it worked right away ! so let me get this clear, my wifi connects to the access point, but the connectivity takes a while to be effective, and this is causing the plugin not to work and leading EG to freeze ? am I correct ? So, if it's the case, shouldn't this "feature" be implemented in the core of EG instead of every individual plugin that might need it ? I'm pretty sure this "bug" is present in many other network related plugins... What do you think about this ? Could you do me one more favor regarding this issue ? Could you please implement this fix to the old plugin ? because it was the last thing that was missing. Use this version, it's the one that works very well : download/file.php?id=6141 This way, me and the EG community will have 2 alternatives plugins for XMPP.


Available/Offline :
ok, you can remove the Offline Presence since it's not working :) I guess you can also remove the Available type, I think you're right, those 2 are reserved as you said. They are probably related to the missing feature I was referring to a couple of days ago when I was saying --> on my smartphone, when my android xmpp client goes offline, then when I get back online, my android client sees the EG client as offline, despite the fact that it was previously set as online (before I logged off/on my android client). So it looks like the EG client doesn't send periodically its presence status to the remote xmpp server, that's why the android client doesn't know the online status of the EG client. There must be a XEP that is used for Presence, probably XEP-0163 it's not listed in your list but in reality it's available in the plugins folder (C:\ProgramData\EventGhost\plugins\XMPPPlus\sleekxmpp\plugins).


XEP :
Can you please tell me what XEP you have implemented so far ?
For now, I'm only interested in those ones :
  • xep_0045
  • xep_0163
  • xep_0280
if you think some others might be useful feel free to implement them :)

Thank you !

User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Fri Feb 02, 2018 3:04 am

I am thinking I will provide a mechanism so the user can add the different xep plugins. I can store the data in the config.py file for EG this way the actions will load on plugin load. If memory serves there should be a callback for when an action is created. this way I can keep count and the user will not be able to remove the plugin until all associated actions have been deleted.
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 » Fri Feb 02, 2018 3:29 pm

ok, that's a very good idea !! ;)

But in the meantime I have some bad news, today when I resumed my computer I got this :

Image

I tried to disable/enable the plugin and it didn't work, actually when I disabled the plugin I was still getting the same logs, how is this possible ? It was working so well and now this bug ruined the experience... :(

User avatar
kgschlosser
Site Admin
Posts: 5146
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: XMPP plugin request

Post by kgschlosser » Fri Feb 02, 2018 8:47 pm

I am not sure You would have to enable the debugging for the plugin. I need to see exactly what part of the process is having an issue. What you pasted does not make a bit of sense. because in order for the session to end it has to connect. and there is no mention of it connecting.
If you like the work I have been doing then feel free to Image

Post Reply