New Version Added On 05/3/2016 1:24AM MST
******************************
THIS WILL BREAK BACKWARDS COMPATIBILITY
******************************
I added some cool features. and modified existing ones.
Modified:
how the socket connections are handled
a lot of code cleanup and optimization
the ignore and debug dialog is a lot different now, i did away with 2 of the tables and added the use of check boxes to add or remove the items. made for a cleaner looking panel as well as simplified it for the user. during this process tho i had to do away with the automatic refresh. i found it to be quite annoying when i was scrolling down the list and a refresh took place and it jumped me right back to the top. but it does have the refresh button as well as if you check/uncheck anything or press one of the buttons it will refresh
the ignore and debug lists are no longer stored in the xml config file for eg: they have been moved to a series of files in the xAP Plugin directory. it is very important that you keep the directory name the same because if you change it the files will not be saved. i have it saving the config settings as well as the ignore and debug lists, i have it saving the event list also. and it makes backups of all of the files and the data is appended (except for the config data). all of this only takes place if the data changes, if it hasn't nothing will be written (so the file size doesn't get out of hand). i have made the files very easy to understand and you will be able to manually add or remove information from the file if you want. the different saves are separated by 50 "*"'s
Added:
save to file (explained above)
client mode. this is a nice feature, you are able to use the xAP plugin to receive commands directed to it specifically, this will cause the triggering of an event based on the data you provided in the message. The Target that you need to use will be located in the send message for the plugin, it is basically your xAP name with
The message you have to send will be as follows:
Prefix=TestPrefix (prefix is mandatory)
Suffix=TestSuffix (optional)
Payload=TestPayload (optional)
now the payload data is evaluated in 2 ways. one is just a standard evaluation so if you do this
Payload=[False, None, True]
the Payload will be a list with those items in it
or if you do this
Payload='{eg.eventString}' (you have to add the single quotes as not to get a malformed data error)
it will evaluate for an EventGhost global variable
checking the UID for non HEX characters. when entering the UID the character that is not a hex value will be highlighted as soon as you type it if there aren't enough hexdigits for the version you have selected it will not allow you to apply or OK or change the version it will turn all characters red in the uid field. you have to either press cancel or finish the UID
and i honestly don't remember what else if have changed i think that is all so far.
in the future:
I am going to start work on caching of the data that comes in and out of EG it is only going to store the xAP broadcasts that have a target in them. the reason for this is i want to make a better send feature that will allow you to select the target from a dropdown and then it will show you what classes are available for that target and when the class is selected it will show available message items. now this i will set up so that it can be added to on the spot just in case the command you are looking for isn't listed. this is going to be a very large addition so it's going to take me a while to code it. but keep your eyes open for it
thanks again. let me know if something is not working right.
K
#######################################
Fixed a closing issue so EventGhost closes more quickly
Added: Having EventGhost report to it's config panel what more it's running in either xAP Hub mode or xAP Application mode as well is if it's not connected at all
Added: Automatic switching from Application Mode to Hub Mode*
*if the heartbeat goes past 2 intervals without seeing it's echo on the loopback port. this is useful if some other software hub that is running crashes or you shut it down. the current heartbeat interval is set to 60 seconds, so the xAP Server will restart after 120 seconds
****************
Now supports all xAP applications running on the same computer as EG
there was a goof or some kind of a hole that allowed my test platform to have 2 pieces of software bind on the same port.
allowing for what i thought was control through eventghost. and really wasn't that is why the xfx Viewer was not working
so that is now fixed.
i also redesigned the Ignore/Debug dialog. it's all contained into one dialog now. and the dialog is auto sizing based on the largest monitor resolution that is attached to the system.
it will also adjust the table sizes to accommodate for the smaller resolutions.
added an automatic refresh to the tables. i set a 5 second timer on the refresh as to not have the data redrawing that noticeable.
there is still a refresh button for the impatient ones. and it automatically refreshes on adding or removing of items.
cleaned up the rest of the code and tried to stream line it a little more
i also made it so that all the keys for the dictionary in the payload all start with an uppercase.
the xAP protocol is not case sensitive but EG and python sure is.
so i wanted to make a standard out of it. on the EG side of things.
also added the ability to change the UID number (an electronic serial number of sorts) that way if you have more than one machine running this app you have the ability to separate them properly.
i may have changed more but i honestly can't remember
if there are any problems the complaint department is in the next thread over.
nah just ask i respond usually in the same day.
if there are any features that are wanted don't hesitate to ask.
or if you want to know how to pull data from the payload read this thread there is an example.
newest version is attached as usual
K
*************
New Version is in.
ok this was a biggie,
I added support for debugging per device, message type, and schema has a nice table to ad a remove the items from and it applys the changes real time. so if you press the OK it's saved and you will have to remove it.
it also saves the selections in the eventghost xml file. so no extra files needed.
i also added an ignore events feature just in case there are some events bugging the hell out of ya because they are flooding up the EG log
same deal. changes are shown real time but are saved when the OK button is pressed.
as far as the saving. if you press OK on either the debug or the ignore dialogs it will save them for that one session. you have to click the apply or ok for the plugin config to make the changes save for future loading of eventghost. i set it up that way because you may only want to have it running for the one session of EG
also if you go into the debug menu or the ignore menu upon first install of eventghost it will connect the server with whatever plugin config setting you currently have.
this version broke backwards compatibility i removed the allxAP from the plugin and it's config, so the alignment of the params is off, so if it does load but acts goofy, that's probably why
let me know what ya think
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Changes:
Cleaned Up a lot of code general housekeeping type things
Plugin Config Dialog no longer has view all xAP Data it has been changed to a Debug Mode so no need to edit files and restart EG
Corrected an issue with having more than one xAP software running on the same machine
the xAP plugin for EventGhost is now an xAP Hub, for Example: you are able to run EventGhost with the xAP plugin and the Logitech Media Server without the need for any additional software, there is one exception to this.
Exception:
xfx Hub and xfx Viewer are linked in a manner that breaks xAP Portocol definition, you are not able to run xfx viewer without having the xfx Hub running. and you cannot run 2 hubs on the same machine. that is why i saw the need to make the debugging something that can be changed without the restart of eventghost. i will add a toggling action to it in the future so there won't even be the need to open the config dialog.
I am sorry for this, i have a workaround in mind for it but it would require starting the xfx hub first and then EventGhost. I think i am going to add the xfx hub to the plugin and have a check box in the config as to which one you would like to use (if it is not installed have EventGhost launch the xfx Hub installer)
being that it is the only other xAP Hub available someone may want to be able to use the viewer and eventghost on the same computer. so i think it best to give the choice.
there are port leases that are assigned to any xAP applications that are running on the computer with eventghost acting as hub these leases expire after 2 times the heartbeat interval (as per xAP Protocol definition)
I also modified the send command dialog so that there are more lines showing for the message contents, i also included an example of sending the play command to the LMS
as usual file is attached to this post
K
**************
OK Here goes.
Attached file is a zip with the folder already in place. All you need to do is uncompress into your EventGhost/plugins folder, and restart EventGhost.
add the plugin it is labeled as xAP.
there are descriptions in the plugin configuration please do read them.
this plugin send and receives xAP for any schema.
works with xAP version 1.2 and 1.3
what version you would like to use is select-able
this is going to need some testing because i do not have the ability to send to EventGhost from a device. but there is an option to trigger an event on all xAP communication whether it is intended for EventGhost or not or to only trigger events for EventGhost (i am not sure if the latter will work)
I have also added the ability for you to specify a Vendor name if you like, I think the xAP protocol is pretty much dead but there are alot of devices that use it. I think that most of the Vendor specific controls for most devices out there are been removed so your devices should respond to any vendor name.
you have the option of how the events are triggered. Schema as the prefix and vendor/hostname as suffix or vice-versa.
the payload data is in a dictionary format so getting to the wanted information is very easy here is some example code
Code: Select all
if 'Artist' in eg.event.payload and eg.event.payload['Artist'] == 'Aerosmith':
do something here
so that's pretty easy
i have included in the dict all header information
you should be able to derive the schema needed to send a command from reading the payload data
if you have a problem with the plugin open the __init__.py file in a text editor and change like 39 from DEBUG = False to DEBUG = True, then save it and restart EventGhost.
replicate the problem. then disable the plugin. this is important shut OFF the log times and then copy and paste the data grab a bunch of it from before and after the error along with the error.
DO NOT POST THE ERROR IN THE FORUM
copy and paste it into a text file NOT WORDPAD!!!!
save the file and then attach it to a forum post.
it could be a whole heap of information and there is no need for others to read through that or clog up this thread with it. and it's easier for me this way
Thanks again
K
Enjoy
