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.
AutoRemote EventGhost plugin:EG->Android and Android->EG
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Sorry, I incorrectly tried.
I still have to continue.
Pako
I still have to continue.
Pako
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Thank you very much.
I appreciate it.
I appreciate it.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
I finally found out, where the next (and main) problem.
The module "pickle" can not handle the class "AutoRemoteDevice" (which is stored in the argument "devices").
It can be solved in different ways.
The easiest way is to use an ordinary class tuple or dictionary.
Pako
The module "pickle" can not handle the class "AutoRemoteDevice" (which is stored in the argument "devices").
It can be solved in different ways.
The easiest way is to use an ordinary class tuple or dictionary.
Pako
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Here is one possible way that required minimum modifications.
Pako
Pako
- Attachments
-
- __init__.py
- (28.16 KiB) Downloaded 313 times
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Sorry, now I fixed a small bug.
Pako
Pako
- Attachments
-
- __init__.py
- (28.16 KiB) Downloaded 375 times
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Pako, I have to say, AWESOME!!
Your latest version works as expected, thanks so much.
Any idea why pickler doesn't correctly support the AutoRemoteDevice class?
Anyway, now I want to keep backwards compatibility with the previous version so I changed
to
But there's just one problem: if a user doesn't open and save the AutoRemote plugin configuration at least once after using this version, they will still get the error because EventGhost still wouldn't use the tuple instead of the AutoRemoteDevice object.
Any way to force EventGhost to save the plugin's configuration without the user manually going into the plugin settings dialog and clicking "Ok"?
Again, thank you very much for your support.
Your latest version works as expected, thanks so much.
Any idea why pickler doesn't correctly support the AutoRemoteDevice class?
Anyway, now I want to keep backwards compatibility with the previous version so I changed
Code: Select all
self.devices = [AutoRemoteDevice(*i) for i in devices]Code: Select all
if len(devices) > 0:
if(isinstance(devices[0], AutoRemoteDevice)):
self.devices = devices
else:
self.devices = [AutoRemoteDevice(*i) for i in devices]Any way to force EventGhost to save the plugin's configuration without the user manually going into the plugin settings dialog and clicking "Ok"?
Again, thank you very much for your support.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
I do not know.joaomgcd wrote:Any idea why pickler doesn't correctly support the AutoRemoteDevice class?
You've read the documentation?
You can do it (simply) like this:joaomgcd wrote: But there's just one problem: if a user doesn't open and save the AutoRemote plugin configuration at least once after using this version, they will still get the error because EventGhost still wouldn't use the tuple instead of the AutoRemoteDevice object.
Any way to force EventGhost to save the plugin's configuration without the user manually going into the plugin settings dialog and clicking "Ok"?
Code: Select all
if len(devices) > 0:
if(isinstance(devices[0], AutoRemoteDevice)):
self.devices = devices
trItem = self.info.treeItem
args = list(trItem.GetArguments())
args[3] = [AutoRemoteDevice(*i) for i in devices]
eg.actionThread.Func(trItem.SetArguments)(args)
eg.document.SetIsDirty()
eg.document.Save()
else:
self.devices = [AutoRemoteDevice(*i) for i in devices]
self.port = port
self.publicIp = publicIp
self.dname = dname
self.server = MyServer(RequestHandler, port)
self.server.Start()
def __stop__(self):
self.server.Stop()Code: Select all
if len(devices) > 0:
if(isinstance(devices[0], AutoRemoteDevice)):
self.devices = devices
trItem = self.info.treeItem
args = list(trItem.GetArguments())
args[3] = [AutoRemoteDevice(*i) for i in devices]
eg.actionThread.Func(trItem.SetArguments)(args)
eg.document.SetIsDirty()
wx.CallAfter(self.SaveConfig)
else:
self.devices = [AutoRemoteDevice(*i) for i in devices]
self.port = port
self.publicIp = publicIp
self.dname = dname
self.server = MyServer(RequestHandler, port)
self.server.Start()
def SaveConfig(self):
from eg.Classes.Document import SaveChangesDialog
dialog = SaveChangesDialog(eg.document.frame)
result = dialog.ShowModal()
dialog.Destroy()
if result == wx.ID_YES:
eg.document.Save()
def __stop__(self):
self.server.Stop()Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Dear Pako,
This is absolutely a wonderful solution and information, very useful generally indeed. I will remember this for future.
Once again, thank you
Very best regards, Walter
This is absolutely a wonderful solution and information, very useful generally indeed. I will remember this for future.
Once again, thank you
Very best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Thanks again Pako.
Unfortunately EventGhost hangs at
and eventually times out with this error:
Any ideas?
Unfortunately EventGhost hangs at
Code: Select all
eg.actionThread.Func(trItem.SetArguments)(args) Code: Select all
Traceback (most recent call last) (1582):
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 326, in __DoOneEvent
self.HandleAction(action)
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 289, in HandleAction
action()
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
self.returnValue = self.func(*self.args, **self.kwargs)
File "C:\Program Files\EventGhost\eg\Classes\EventThread.py", line 142, in StartSession
actionThread.Func(actionThread.StartSession, 120)(filename)
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 214, in Wrapper
raise Exception("Timeout while calling %s" % func.__name__)
Exception: Timeout while calling StartSession- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Ah, so we have to do it a little differently.
And anyway there was another bug ...
Automatic method:Interactive method:Pako
And anyway there was another bug ...
Automatic method:
Code: Select all
if len(devices) > 0:
if(isinstance(devices[0], AutoRemoteDevice)):
self.devices = devices
wx.CallAfter(self.SaveConfig, devices)
else:
self.devices = [AutoRemoteDevice(*i) for i in devices]
self.port = port
self.publicIp = publicIp
self.dname = dname
self.server = MyServer(RequestHandler, port)
self.server.Start()
def SaveConfig(self, devices):
trItem = self.info.treeItem
args = list(trItem.GetArguments())
args[3] = [(i.name, i.url, i.key) for i in self.devices]
eg.actionThread.Func(trItem.SetArguments)(args)
eg.document.SetIsDirty()
eg.document.Save()
def __stop__(self):
self.server.Stop()Code: Select all
if len(devices) > 0:
if(isinstance(devices[0], AutoRemoteDevice)):
self.devices = devices
wx.CallAfter(self.SaveConfig, devices)
else:
self.devices = [AutoRemoteDevice(*i) for i in devices]
self.port = port
self.publicIp = publicIp
self.dname = dname
self.server = MyServer(RequestHandler, port)
self.server.Start()
def SaveConfig(self, devices):
trItem = self.info.treeItem
args = list(trItem.GetArguments())
args[3] = [(i.name, i.url, i.key) for i in self.devices]
eg.actionThread.Func(trItem.SetArguments)(args)
eg.document.SetIsDirty()
dialog = eg.Classes.Document.SaveChangesDialog(eg.document.frame)
result = dialog.ShowModal()
dialog.Destroy()
if result == wx.ID_YES:
eg.document.Save()
def __stop__(self):
self.server.Stop()Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Awesome, that did it!!
Brilliant! thank you you very much.
The other bug you mentioned I was able to figure out myself as well but thanks for fixing it nonetheless.
Awesome, awesome support, thanks!
By the way, how do I apply to be part of the "official" EventGhost plugins? Or is that not open right now?
Thanks again!
Brilliant! thank you you very much.
The other bug you mentioned I was able to figure out myself as well but thanks for fixing it nonetheless.
Awesome, awesome support, thanks!
By the way, how do I apply to be part of the "official" EventGhost plugins? Or is that not open right now?
Thanks again!
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
B is correct.joaomgcd wrote:By the way, how do I apply to be part of the "official" EventGhost plugins? Or is that not open right now?
Author program (Bitmonster) just before he left the project, worked on major change.
You can read about it here.
I think there is no doubt that it is not appropriate to continually add new plugins to the program.
So we are looking for a person (or team) who could implement this idea. New plugins will not be added.
BTW: If I do (in the future) Android phone I buy, I'll try AutoRemote. I get a discount?
Pako
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Better than that, you'll get all my apps for free. 
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
Thanks for help getting this sorted Pako
I'd say it's worth getting yourself an Android phone (a Nexus 4 if you can) just because of what it + AutoRemote + EventGhost can all achieve together. I cannot imagine not using any of them on a regular basis every single day 
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: AutoRemote EventGhost plugin:EG->Android and Android->EG
This is amazing!joaomgcd wrote:Better than that, you'll get all my apps for free.
And how do I do it, when it will current? (You can use PM ...)
Pako