xAP Plugin

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

Re: xAP Plugin

Postby kgschlosser » Sun Apr 24, 2016 7:46 am

ok, i am just running it through it's paces.

but i corrected some anomolies in the debug/ignore dialog,

i added the ability to change up the UID

i also got the thing working with the xfx viewer SWEET!!!!

cleaned up alot of code

reworked the socket portion of it so now it's using an IP address of your choosing for primary communications and it is also using the loopback interface to talk to any xAP apps that are on the local machine.

i also added some standardizing for upper case messages in receive so when pulling information from the payload they key will always have an upper case first letter

i have permission from the dev of xfx to redist his software with this plugin so in the near future see the ability to launch the installer for both the hub and viewer from the plugin as well as open the viewer from an action or the plugin config dialog.

the addition of the UID is nice it automatically formats it properly. I have to add the ability to make sure it's a hex value yet, but it works

i have made huge progress on the LMS plugin got alot of the data importing hashed out.

have to work in the commands now.

i will post the ner version of the xAP plugin later today after it has run for a while

K
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Mon Apr 25, 2016 8:59 am

Great news!
I have been unable to test due to circumstances, I hope I'm able to test it next weekend...
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Mon Apr 25, 2016 11:38 pm

Updated again.


K
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Tue Apr 26, 2016 5:27 pm

I found a glitch in the config dialog, i am currently fixing it. if you change the UID it will not save it unless you cycle the version (i forgot to add the events for text change)

but i am also adding hex checking at the same time and it will change the color of the character that was input to red if it's not the correct value, or if you change the version and there isn't enough characters it will not allow you to and change the whole field to red.

that's actually quite a bit of code.

K
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Sat Apr 30, 2016 3:05 pm

I finally managed to get back to it, and it seems to work! I nicely receive the xap messages from the squeezebox.

A few issues with other devices prevent me from continuing, so I need to work on those first. But it looks good! :)

Thanks!!!!
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Sun May 01, 2016 6:09 am

no worries m8


and i just wanted to let ya know i am working on a good add on for it, something i am going to use probably and move everything over to because i really do like the broadcasts instead of having to have static IP address on all of my devices. so that if the dynamics of the network change it won't stop everything from running right, and will also remove alot of device specific code for me.

but i am adding the ability to have EG finction as a client as well. so that it can recieve an xAP broadcase and the schema would be something like EvntGhst.Event
and the message contents would be a simple

Prefix=whatever
Suffix=whatever2
Payload=whatever3

so that would it would just pop off a specific event on a system

and of course that feature can be turned on or off as well.
so at that point you can toss the network event sender and receiver

i have all of that working, i am still trying to get the validation of the uid right (the changing of the color of the specific letter to red if it's not a hex value and changing the whole field to red if you try and change the version and haven't completely filled out the version you were just on and have it set the version back to where it was.

it's just the test thing that's getting me. it work but it doesn't change color until after the second bad character after a good one. it's damned illusive and i know it's gotta be something really dumb too.

and OH i also added check boxes to the ignore events and debug events eliminating 2 of the tables. so each table will populate with all the available events and then you just check which ones you want to ignore or debug

and i also changed the close routine on the plugin so that it writes the debug list the ignore list and the event list as well as all of the config data to files, and it makes backups those files also. and checks to see if the last bit of data that was appended to the file is the same as the data it's writing it won't duplicate it. so we don't get files growing HUGE i have to add a time date stamp to the appended data so it can iterate the file and remove anything that's older than say 30 days.
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Mon May 02, 2016 3:01 pm

hey!!!


finally got the UID thing working right. i am altering how the plugin writes to the files so that if needed the user can edit the files easily and remove anything they may want to.

i am trying to make this part of it user friendly. i do have it pulling the EG plugins directory from EG but the plugin file has to be located in the xAP folder for it to save any files, i have it setup to check to see if the directory is there first. i am doing this portion of it because it was really annoying to have to wait for it to populate the list every time, and also for backup purposes i have found that i have corrupted the tree more times than i can remember and that's a very frustrating thing to have to do a "do over" i wish there was an automatic backup feature built in.

hmmm there is an idea for another plugin.
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Tue May 03, 2016 7:24 am

New version is up, please read the notes on the first page of this thread.
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Fri May 06, 2016 8:18 am

It's been a hell of a week. I haven't yet tested the latest version, but hope to manage this weekend...

The new plugin crashes Eventghost when it loads... As soon as it loads, it prints a number of red lines in the log (before the dialog pops up). Then, when I close the dialog, Eventghost hangs, preventing me from copying the log entries. I typed what I could

-
Traceback (most recent call last) (1700)
file ... plugininstanceinfo.py, line 153 in createinstance
plugin.__init__()
file ... xap\__init__.py, line 421, in __init__
self.eventList = self.LoadList('xap.EventList.txt')
file ... xap\__init__.py, line 515, in LoadList
elif path.isdir(self.pluginDir):file(fileName,'w').close()
IOError: [Errno 13] Permission denied: u'c:\\...\\xap\\xap.EventList.txt'
-


Jörg
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby kgschlosser » Sat May 07, 2016 6:15 am

hmmm

windows 10???


also try running eventghost as administrator and see if that solves the problem

it's a permissions error for creating the save files. it does that when it loads and they don't exist

my setup is very different from everyone else as far as i log into a domain and i have administrative rights.

but there seems to be a lot of permissions errors with windows 10 and if that's the case i am going to have to do something to code around it.


that is if you are running windows 10
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby kgschlosser » Sat May 07, 2016 6:16 am

i have to go back to see if i can get the thing to write the files into the same directory ad the eg config file
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby V_J » Sat May 07, 2016 6:48 am

Yes... running Windows 10.
Running it as administrator does not solve the issue: it no longer shows any error in the log file, but EventGhost just freezes after closing the dialog.
The previous one worked fine... I'm a bit puzzled on which functionality you are adding...
V_J
Experienced User
 
Posts: 155
Joined: Tue Mar 04, 2014 9:00 am

Re: xAP Plugin

Postby krambriw » Sat May 07, 2016 12:05 pm

Maybe you have solved it already but here is how I do logging to file in my plugins and this works fine from permission perspective (I am running Win 10). Obviously, in your plugin code you need to import time, os

Code: Select all
        def LogToFile(s):
            s = s.decode('utf-8')
            timeStamp = str(
                time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
            )
            logStr = timeStamp+"\t"+s+"<br\n>"
            fileHandle = None
            progData = eg.configDir + '\plugins\name_of_your_plugin'
            if (
                not os.path.exists(progData)
                and not os.path.isdir(progData)
            ):
                os.makedirs(progData)
            fileHandle = open (
                progData+'/'+
                self.name+'.htm', 'a'
            )
            fileHandle.write ( logStr.encode('utf-8') )
            fileHandle.close ()
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2544
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

Re: xAP Plugin

Postby kgschlosser » Sun May 08, 2016 12:18 am

i am importing os and also doing the directory checking there are multiple users with permissions issues with windows 10 and i am not sure what it is.

not with just this plugin, i do a very similar file write as you have there.

the portion of the plugin that's hanging on close is the save portion of it. it seems as though i am going to have to run a windows 10 machine just for checking compatibility.

because the plugin doesn't hang on close of a windows 7 machine.

you can test this and see a log entry end tell me exactly what's going on if you go into the plugin config and change something then OK it (do not apply) because if it causes eg to hang the window will be in the way and you may not be able to see it. but it should show an error because the close and stop routines do exactly the same thing

that will help me to narrow down the problem

and i have not a clue how to handle the windows 10 permissions problems with eventghost other than running it as administrator.

i don't think this would cause the problem but i am using the eg.corePluginDir variable for the first bits of the path then just adding the plugin folder name '\\xAP\\' and filename

the variable contains the full path to the plugins directory for eventghost
A loved one and Time, The 2 things that can never be replaced.

Family, The only thing you don't get to choose in life.
User avatar
kgschlosser
Site Admin
 
Posts: 1371
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: xAP Plugin

Postby krambriw » Sun May 08, 2016 5:43 am

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
My latest plugins
http://plugins.krambriw.net/index.html

Two men in front of a huge excavator...
- that beast steels work from 100 men with shovels
- well, a 1000 men could do the same using teaspoons
krambriw
Plugin Developer
 
Posts: 2544
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden

PreviousNext

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 4 guests