I was using multiple actions (scripts) as a test case, I planned to put them together at one point anyway. I suspect the behaviour is normal on a real time system, and assuming that the value of a global stays the same for the duration of the script is a bad way to deal with real time systems.
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.
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.
xAP Plugin
Re: xAP Plugin
I will just use the code snippet you posted, and copy the eg.result data to a local variable in the script.
I was using multiple actions (scripts) as a test case, I planned to put them together at one point anyway. I suspect the behaviour is normal on a real time system, and assuming that the value of a global stays the same for the duration of the script is a bad way to deal with real time systems.
Copying it to a local variable and setting all the actions in one script should solve it. I will try it later this week.
I was using multiple actions (scripts) as a test case, I planned to put them together at one point anyway. I suspect the behaviour is normal on a real time system, and assuming that the value of a global stays the same for the duration of the script is a bad way to deal with real time systems.
Re: xAP Plugin
I could not get the code snippet to work ("not callable" as error), but I could copy eg.result to a local variable. All things put in one script, using the local variable and it all works without problems.
So no need to fix anything... It just requires proper use.
So no need to fix anything... It just requires proper use.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: xAP Plugin
That was a proposed solution. Not a current working setup
Re: xAP Plugin
I modified all the scripts that use results from the XAP plugin to first copy the result to a local variable in the script.
I tested it with a number of squeezeboxes playing in parallel and no errors appear in the log of Eventghost. So I don't think it is necessary to change anything to the xap plugin, it just needs to be used correctly.
The integration of the squeezeboxes with my home automation system is taking shape: I have full control over the squeezeboxes and can display info on what is playing (artist, album, elapsed time, ...) on the interface. Now I still need to finalize control of the amplifier (linking its serial control using eventghost to the rest of the system, and that would be the end...
I tested it with a number of squeezeboxes playing in parallel and no errors appear in the log of Eventghost. So I don't think it is necessary to change anything to the xap plugin, it just needs to be used correctly.
The integration of the squeezeboxes with my home automation system is taking shape: I have full control over the squeezeboxes and can display info on what is playing (artist, album, elapsed time, ...) on the interface. Now I still need to finalize control of the amplifier (linking its serial control using eventghost to the rest of the system, and that would be the end...
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: xAP Plugin
do you like how the xAP plugin functions? I do need to release another version with mentions of the original creator of the protocol. i was in conversation with him for a while about the working of the hub portion of the protocol. so i could make the plugin act as both client and hub. as well as be able to auto switch between the 2.
I would like to add you name in there as well if at all possible for the beta testing of the plugin if that is ok.
oh one question for you. are you running the beta of EG?? i have not tested to see if the plugin works properly i do not believe that there should be any issues.
and if there is anything else i need to add please let me know.
I would like to add you name in there as well if at all possible for the beta testing of the plugin if that is ok.
oh one question for you. are you running the beta of EG?? i have not tested to see if the plugin works properly i do not believe that there should be any issues.
and if there is anything else i need to add please let me know.
Re: xAP Plugin
The plugin is perfect: it does just what it is supposed to. The debugging feature is great, as otherwise it really overloads the log. For that reason, I do not use payload but eg.result (not sure if there are any difference because of this).
Feel free to mention me.
I have not tried the beta version of EG, but am not sure I have time in the next few weeks.
It may be interesting to mention in the manual that subsequent xap packets can change eg result, of one was not parsed before that, the data is lost. So best to use a local variable.
But perhaps it could also be interesting to ask Pako to add the plugin as standard?
Feel free to mention me.
I have not tried the beta version of EG, but am not sure I have time in the next few weeks.
It may be interesting to mention in the manual that subsequent xap packets can change eg result, of one was not parsed before that, the data is lost. So best to use a local variable.
But perhaps it could also be interesting to ask Pako to add the plugin as standard?
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: xAP Plugin
I know they are steering away from packaging plugins with EG in favor of a plugin repository that would be accessible from right inside of EG. and I would much rather see time spent working on that solution then packaging plugins. ya know??
there is a lot of really good brain storming going on with EG. so it will be really awesome to see what turns out from it all.
one of the things i decided to spear head is adding the ability for EG to import external python packages in a simplistic manner. i am sooo close to getting it working properly.
but i think i may have to ditch one of the methods as it is becoming a real hassle.
there is a lot of really good brain storming going on with EG. so it will be really awesome to see what turns out from it all.
one of the things i decided to spear head is adding the ability for EG to import external python packages in a simplistic manner. i am sooo close to getting it working properly.
but i think i may have to ditch one of the methods as it is becoming a real hassle.
Re: xAP Plugin
Just reinstalled my entire system and noticed that the last version of the xap plugin is not on the first post... 
It is still working nicely, so not much to report. I'm just getting everything set up for when I go abroad next month, so my girlfriend can use the system without too much hassle... So not starting any new things with it...
It is still working nicely, so not much to report. I'm just getting everything set up for when I go abroad next month, so my girlfriend can use the system without too much hassle... So not starting any new things with it...
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: xAP Plugin
no worries. I don't know why the latest version is not on the front page.. It could be that it was to fix a bug and i didn't want to do a release of it until i knew if it fixed it or not.. and then forgot about it
Re: xAP Plugin
Hello!
I'm back... and updating my configuration...
I'm still away from my installation (working abroad), but decided to clean up everything.
I tried the latest Eventghost and the xAP plugin gives this message:
-
Plugin: xAP
Error starting plugin: xAP
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 192, in Start
self.instance.__start__(*self.args)
TypeError: __start__() takes at most 8 arguments (9 given)
-
Any suggestions?
Thanks!
J├Ârg
I'm back... and updating my configuration...
I tried the latest Eventghost and the xAP plugin gives this message:
-
Plugin: xAP
Error starting plugin: xAP
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 192, in Start
self.instance.__start__(*self.args)
TypeError: __start__() takes at most 8 arguments (9 given)
-
Any suggestions?
Thanks!
J├Ârg
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: xAP Plugin
Have you tried creating a new empty save file and then adding the plugin?
Did you copy the save file from you live installation and opened it up in EG 0.5? I am going to have to go back and look at the code. I can't remember how the startup is set up.
What it looks like to me is that your EG 0.5 is not running the same version of the plugin as your live EG. It looks like you could possibly have an older version of the plugin installed in EG 0.5
Did you copy the save file from you live installation and opened it up in EG 0.5? I am going to have to go back and look at the code. I can't remember how the startup is set up.
What it looks like to me is that your EG 0.5 is not running the same version of the plugin as your live EG. It looks like you could possibly have an older version of the plugin installed in EG 0.5
Re: xAP Plugin
Well, I took the xAP plugin file I had...kgschlosser wrote: Fri Dec 15, 2017 4:57 am What it looks like to me is that your EG 0.5 is not running the same version of the plugin as your live EG. It looks like you could possibly have an older version of the plugin installed in EG 0.5
I remember some changes were planned to the whole plugin distribution system, so how do I get the correct version of the xAP plugin?
Thanks!
(nice to see the same people here... I've been out of it a bit but am getting back
Re: xAP Plugin
Ok, I think I managed.
I removed it from the config (which generated a lot of error messages), saved the config under a different name, restarted eventghost as adminstrator and added the xap plugin through the menu. It is in the list of enabled plugins, does not show error messages and seems to be working.
Thanks!
I removed it from the config (which generated a lot of error messages), saved the config under a different name, restarted eventghost as adminstrator and added the xap plugin through the menu. It is in the list of enabled plugins, does not show error messages and seems to be working.
Thanks!
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: xAP Plugin
sorry i didn't get back to ya in time. but if I remember correctly there is information from the plugin stored in the file %appdata%\eventghost\config.py
so if you copied that file as well then you should be good to go.
so if you copied that file as well then you should be good to go.
Re: xAP Plugin
No problem... I'm away from my home installation so cannot fully test it, but as far as I can tell now it seems to work. I'm using the time away from my installation to clean up my config and improve things. 
