xAP Plugin

Questions and comments specific to a particular plugin should go here.

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 6:46 am

ok so here goes, i have got it sorted, i redid the whole file save, load, backup routine.

it's going to save the files to the My Documents folder in a subfolder called EventGhost-xAP

and if by change it runs into a permissions error this will not stop the plugin from operating properly, it just won't be able to save and load the files (these are there more so for a nicety than a necessity. that way you won't have to constantly keep on adding the ignore or debugs every time you load eventghost. and it also save all the messages that have come in thus far for the same reason, sometimes it takes a long while for that list to populate and having it there all the time is really nice to have

attached is a small version release let me know if it works.

i could very well have had the same problem with windows 7 but because i login from a domain as an enterprise admin things work a slight bit different with the permissions side of things.

thanks for the notice on this, and sorry it has taken a while to fix, i was modifying my server rack and that took almost a week.

K
Attachments
xAP.V1.5.1b.zip
(10.58 KiB) Downloaded 67 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 6:53 am

krambriw wrote:
eg.corePluginDir


Hmm, I think this could be the problem in Win 10, I think that plugins cannot write to EG program directory or sub directories under win 10



i am feeling the same thing as you on that one.

i know it's causing problems with the vista mce remote i have to dive into that one some more to see what can be done about it.

and it's when someone is trying to send a command which is what is odd.

i am not sure what the IR portion of eg is trying to write to a file while sending IR. but wanting to write to files has now got to be done in the My Documents folder.

I am going to write up a simple snippet and see if it can't be added to the next release of EG because it really annoying to have to add it to every plugin that you want to write files with.

me personally i have managed to corrupt my EG tree tooo many times and trying to fix it is a lot harder than having to possibly fix a txt file. you have to have a good program to detect xml errors and that's not always a guarantee because if the plugin data gets corrupted in the tree that's encoded (maybe base64) and you will have to remove the plugin there for losing any data along with it.

and this also makes the backups so if you notice an error you can revert with a simple rename of the file

i might code something so that if there is an error it will pop up a dialog asking if you want to do that
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Sun May 08, 2016 7:00 am

It still crashes Eventghost when I close the dialog... Nothing is written in the log file.

It does create a folder EventGhost-xAP in my documents, and creates 3 .txt files: xAP.DebugList, xAP.EventList and xAP.IgnoreList. All files are empty.

Still unclear on why you need those file though...
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 7:06 am

i just explained it above.


you did head the warning at the top in the first page of this thread right???


THIS WILL BREAK BACKWARDS COMPATIBILITY

that means you have to delete the plugin from the tree save your EG and close eventghost and then delete the xAP plugin from the plugins folder then extract the new one and run EG then install the plugin.


if that doesn't work try creating a new eventghost tree and then add the plugin and see if it still happens
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 7:17 am

V_J wrote:It does create a folder EventGhost-xAP in my documents, and creates 3 .txt files: xAP.DebugList, xAP.EventList and xAP.IgnoreList. All files are empty.


the files will be empty until the plugin loads fully, and starts collecting data.

it's going to end up making a total of 12 files

a configuration data save file
a list of all the xAP messages (just the source class type and target)
a list of all of the events you have currently debugging
and a list of all of the events you have on ignore

and then 3 backups of each of the 4 files

it only writes data if data has changed since the last save and it rolls the backups automatically
only if the data changes will it make the backups

this is a multi step process to getting the message builder i am making set up because xap messages don't come all at the same time, they are generated as you do thing on your network and with those devices. and if someone has a bunch of devices running on xAP it's way to much data to have stored in the eventghost xml file like that.

this is all so that if you have eventghost running for a year and something happens where you lose the xml file you have a way to recover at least partial data and how you had the thing set up and the backups are for the same purpose

i is rather nice if you want to ignore say all the heartbeats and it saves it so if you restart eg they are there again yes?? or if something a week ago posted an event and you decide you want to ignore it so it's not in the eg log but it didn't save it now you have to wait and dig through the log to find that event again.

this way you won't have to do that because it has a record of it and any event that is fired from the xAP plugin will be recorded for you to ignore or to debug if you like without having to wait for the event to fire again then add it then wait again to get the debug data or to make sure the ignore worked
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 7:22 am

ok it didn't make the config save file, that's because you didn't delete the plugin from the tree before upgrading it to the new one, that's my fault i should have explained that better i will change the post as soon as we know this is operating properly
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Sun May 08, 2016 7:42 am

Actually... I started with a clean tree that does not have an xap plugin and just added the latest version as a plugin. So no issues with backwards compatibility (previous xap was not used in this tree), nor with upgrading...

I still need to resolve some other issues before I can start integrating the xap plugin, which is why I have my current tree still without the xap plugin. I just load it when you have a new version to test it.
My main point with the files is that I like to keep a clean system and really want to know where every program puts files and why... Diskspace is cheap, but I still don't like filling it with files that never get used. :)
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 7:59 am

i understand, and you are still having trouble with it loading properly??


and you will know more of what the files are for when you use it and see what it stores and how it opperates
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Sun May 08, 2016 8:06 am

Yep... I have the plugins Marantz RS232 (my own modification of Marantz Serial, to add more commands), Webserver (default supplied) and SqueezeboxServer (also supplied). It all works and is stable. Loading the xap plugin pops up a dialog box, I left everything to default, and EG just stops responding. Nothing written in the log (not even that the plugin was loaded). Only way out is to kill EG.
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 8:16 am

you have a squeeze server plugin running??
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 8:28 am

do you have LMS installed on the same machine?? and if so do you have the xAP plugin for the LMS installed??? and if so do you have the xAP Plugin for the LMS set to no hub or to external hub???
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 10:05 am

i did find a looping error with the LMS server if it was running on the same box as eventghost and if the LMS was not set into external hub mode

i fixed that, along with a couple of other errors i came across.

so if you want to give this one a shot you are more than welcome to. but i am seriously starting to draw a blank here

because i can't reproduce the same error you are having.

again the only things i can suggest to narrow it down is shut down all running apps and services and then use a clean EG tree nothing in it and install the app. and then one at a time start tings up to see what is clashing, it has to be environment specific to your machine, because i can't replicate it
Attachments
__init__.py
(39.76 KiB) Downloaded 46 times
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Sun May 08, 2016 11:44 am

Don't have access to the machine now, but to answer your questions:
lms is running on the same machine, configured with external xap hub
squeezeserver plugin just sends cli commands, so should not clash with anything

I'm not sure I'm able to test it today; it may be a few days before I can report back.
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby V_J » Tue May 10, 2016 6:21 pm

It loads! No error messages when the xap plugin loads (I only used default settings in the dialog box so far), no crashes.

I started playing an internet stream, and it did post an error in the log file, but it might be related to the specific xap message. I posted it in attachment. It could be that the message when a internetstream is playing is different from the message when a track from a collection is playing. When a normal track from my collection is playing, everything is fine. For the one with the internet stream, the output looks like in the file, with the newlines in it.

Thanks again!
I will now look into sending with the webserver to my loxone server; I managed to do it with the script (thread on general support), but have to read a bit more on how to incorporate a variable (ie some payload from xap :)). It might be easier and more elegant to use the webserver plugin, and Pako just posted a new test version... So that one is next on my list... :)

J.
Attachments
malformed xap.txt
(1.16 KiB) Downloaded 38 times
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Wed May 11, 2016 2:33 am

ok i see how i am going to have to do this, it's having an issue because of the = sign, i didn't think there could be more than one of them in a single line.

i will correct the issue i have also corrected a couple of other things that i have stumbled across, like the debug lists and ignore lists jumping when you check a box, and the check all and uncheck all not working. i have those fixed.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
 
Posts: 1854
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 10 guests