New version 0.5.0-rc4 is out

Keep up to date with EG related information here.
User avatar
topix
Experienced User
Posts: 386
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

New version 0.5.0-rc4 is out

Post by topix » Sun Jul 16, 2017 6:35 pm

0.5.0-rc4 (2017-07-16)

Enhancements:
  • Changes XmlIdLink to eg.GUID (see comment for more info) 264 (kdschlosser) (see note below)
Fixed bugs:
  • SoundMixer: Fixes traceback when using the Primary Sound Driver 255 (kdschlosser)
  • NamedPipe: Fixes traceback if returned item is not able to be evaluated 256 (kdschlosser)
  • Fixes restart not working from the file dropdown menu 257 (kdschlosser)
  • SoundMixer: Fixes lag when setting the relative volume 258 (kdschlosser)
  • EventThread: Fixes -event not working from cli if there is no EG running 261 (kdschlosser) (
  • [System] Fix Monitor On action not functioning properly in Windows > 8 262 (kdschlosser)
  • CLI: fix bug when showing message on -netsend failure 263 (topic2k)
Other changes:
Notice:
The use of XmlId made it difficult to share code that used 'Enable/Disable Action' or 'Exlusive Enable' (and others). Now with the use of GUID's this hurdle is gone.

To turn it on you would open the add plugin dialog and left click once in the upper right hand corner of the dialog (client area) and then click once in the lower left hand corner of the dialog (client area). There is a 20x20 pixel target for each of the spots so the chance of someone doing this accidentally is probably not going to happen. But in the event it does, a message box asking if you want to enable or disable it pops up.
Warning: This process cannot be undone, so make a backup copy of your config tree before enabling it.


Download now
Last edited by kgschlosser on Tue Jul 18, 2017 5:31 pm, edited 1 time in total.
Reason: Don't want it to get lost in the shuffle. and it is technically an announcement

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc4 is out

Post by Luca Brasi » Thu Jul 20, 2017 5:44 am

Hey kgschlosser,
thank you very much for the new release.
I'll test and come back if anything comes up. The thing with XmlIds has been a pain in scripts. Especially with jump actions. Although having worked around that with triggered events I'll check that out gratefully.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Thu Jul 20, 2017 7:45 am

@ Luca Brasi

Yeah I know that whole thing with not being able to sue the enable and disable actions from a script was a real annoyance. and the reason why it took almost a half a year to fix it. I had to learn a lot. and figure out the easiest way to make it work while also being backwards compatible with existing save files

Do make sure you backup your file first. the reason why we didn't enable it right off the bat is we want to make sure that the user is aware and that they make a backup. just in case something doesn't work properly. we didn't want to go and trash someone's save file. better to get it run through it's paces this way.
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 479
Joined: Thu Nov 17, 2011 1:27 am

Re: New version 0.5.0-rc4 is out

Post by blaher » Sun Jul 23, 2017 3:32 am

I got a freeze with rc4, and this seems to be the only error in the .log:

Code: Select all

13:04:54: 1 MainThread: Document.CheckFileNeedsSave()
13:04:54: 1 MainThread: Document.CheckFileNeedsSave => 5100
13:04:54: 1 MainThread: Document.Close()
13:04:54: 1 MainThread: Document.GetExpandState()
13:04:54: 1 MainThread: Document.Close => None
13:04:54: 1 MainThread: MainFrame.Iconize(flag=False)
13:04:54: 1 MainThread: MainFrame.Iconize(flag=False)
13:04:54: 0 EventGhost.Pipe.Thread: Named Pipe: return data: True
13:04:54: 0 EventGhost.Pipe.Thread: Named Pipe: Creating pipe
13:04:54: 1 MainThread: Triggering OnClose
Traceback (most recent call last) (0.5.0-rc4):
  File "wx\_core.pyc", line 16766, in <lambda>
  File "C:\Program Files (x86)\EventGhost\eg\Classes\App.py", line 66, in DoOnClose
    self.Yield()
  File "wx\_core.pyc", line 7916, in Yield
PyAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\evtloopcmn.cpp(110) in wxEventLoopBase::Yield(): wxYield called recursively
13:04:54: 0 MainThread: PluginManager.ScanAllPlugins :0.17606526401224182
13:04:54: 0 MainThread: SendKeysParser.__init__()
After end tasking it, it also seemed to kill my receiver's plugin:

Code: Select all

13:05:37: 0 Thread-5: MceMessageReceiver.__call__()
Traceback (most recent call last) (0.5.0-rc4):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
    return self(*args)
  File "C:\Program Files (x86)\EventGhost\plugins\OnkyoISCP\__init__.py", line 161, in __call__
    self.PrintError("OnkyoISCP: Error sending command, retrying: " + msg)
TypeError: cannot concatenate 'str' and 'timeout' objects
13:05:39: 0 ActionThread: ActionThread.StartSession => None
It wouldn't connect again even after restarting EG. I had to send a command via the receiver's webpage, and then EG connected to it properly after a restart.

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Sun Jul 23, 2017 4:05 am

what caused it to freeze?

I need to see the rest of the log to know what is going on.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Sun Jul 23, 2017 4:10 am

and the onkyo error is because the AVR still had the connection open. once it timed out the AVR would have closed the socket. But the error you are seeing is an error in the coding of the plugin. It seems as tho the person that coded it did some exception catching like so

Code: Select all


try:
    socket code here
except socket.error as msg:
    self.PrintError("OnkyoISCP: Error sending command, retrying: " + msg)

the problem with this is socket.error is an exception object. in this case a timeout which is not a string.. so you can't add a non string to a string unless you convert it to one

Code: Select all


try:
    socket code here
except socket.error as msg:
    self.PrintError("OnkyoISCP: Error sending command, retrying: " + str(msg))



If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc4 is out

Post by Luca Brasi » Sun Jul 23, 2017 6:41 am

Hi,

for everybody who might struggle for a sec with enabling the new GUID feature as I did. Here's a screenshot where to click exactly
screen_mmnote_2017-07-23 08 31 42.png
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc4 is out

Post by Luca Brasi » Sun Jul 23, 2017 7:31 am

Hi kgschlosser,

I am checking out the GUID feature right now.
On my test machine with a pretty simple config it is working great as expected.
But on my htpc setup with a huge config I get errors right after activating it:

Code: Select all

09:15:23   ---> Willkommen beim EventGhost <---
09:15:35   reenable start htpcapp
09:15:40   Error while saving file
09:15:40   Traceback (most recent call last) (0.5.0-rc4):
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\Document.py", line 515, in WriteFile
09:15:40       self.root.WriteXmlString(tmpFile.write)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\RootItem.py", line 89, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 435, in WriteXmlString
09:15:40       self.WriteXmlChilds(streamWriter, newIndent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 418, in WriteXmlChilds
09:15:40       child.WriteXmlString(streamWriter, indent)
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 421, in WriteXmlString
09:15:40       attr, text = self.GetData()
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 157, in GetData
09:15:40       ", ".join([repr(arg) for arg in self.args])
09:15:40     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeLink.py", line 45, in __repr__
09:15:40       return repr(self.target.guid)
09:15:40   AttributeError: 'NoneType' object has no attribute 'guid'
I guess you will need my config xml to check that out...
Attachments
egtrees_guidconverterror_170723.zip
(264.55 KiB) Downloaded 43 times
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Mon Jul 24, 2017 12:51 am

@Luca Brasi

TY for finding this bug. I do know what the issue is.. it's because you have a blank or not set Enable Exclusive, Disable, Jump actions and others of the sort.

Here is a list of the locations where the not set actions are. These will likely cause you a problem in the future that is why I am not simply fixing the bug but I am telling you where the issue is.

Code: Select all

Default\Standby Control\Standby Control Active\Set Modes\Set_Mode_Paused
Default\Standby Control\Standby Control Active\Set Modes\Set_Mode_TVPaused
Default\htpc\htpc Start / Audio Video\Aktionen Routing\HarmonyAktionen\Externe Aktion
Default\htpc\htpc Start / Audio Video\Aktionen Routing\AudioVideoRouting\Anzeige-Profile\Startaktionen\Startaktion Bild auf Beamer
Default\htpc\HTPC Apps\App Control\running htpcapp dependent\htpcapp MPortal\MediaPortal Befehle\Untertitelspur
Default\Remote Systems\Beamer\Check Sunstate/Usersetting periodically

I am thinking I am going to have EG open a dialog to inform the user that the action is not set. and if they want at that point they can click on delete or configure. Setting this up is going to take a bit of time.


and also!!!!
This is a nice OSD ya got going on here..
Default\htpc\htpc Start / Audio Video\Aktionen Routing\AudioVideoRouting\Anzeige-Profile\Modi\Alle\Show Volume OSD generic
My kind of OSD!! :shock: 8) 8)

K
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 479
Joined: Thu Nov 17, 2011 1:27 am

Re: New version 0.5.0-rc4 is out

Post by blaher » Mon Jul 24, 2017 5:01 am

kgschlosser wrote:what caused it to freeze?

I need to see the rest of the log to know what is going on.
I'm not sure, but http://dumptext.com/OH3DOevi has the full log. It's too big to post here.

I had a weird error last night relating to the MCE plugin. I didn't get any error, but all of a sudden I was getting double movements with each keypress in Kodi. I disabled the macro for say the left arrow keypress, but the remote still worked for one keypress to the left, but only once, and then it didn't work until I pressed a different direction. It was like the thing that disables the HID service suddenly failed, and Windows was handling the MCE IR blasts too. After restarting EG it's back to normal. I've also had it stop detecting signals from the IR sensor at all, until an unistall/reinstall of the service. Not sure this is much help if there's no errors in the log though...

Another oddity: when I press right I get a channeldown event a second after. It doesn't seem to do it with any other button.

14:58:01 MceRemote.Mce.Right
14:58:01 Right
14:58:01 XBMC2: Right
14:58:02 MceRemote.Mce.ChannelDown

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc4 is out

Post by Luca Brasi » Mon Jul 24, 2017 9:14 am

kgschlosser wrote:.. it's because you have a blank or not set Enable Exclusive, Disable, Jump actions and others of the sort.
...
Oh yeah. I must have collected these over time by not respecting the warning coming up when deleting an action which is targeted by some other action in any way.
I had to delete the jumps in the config file directly because eg wouldn't let me because of the error. Easiest way to do this was by searching for XmlIdLink(-1) and delete the tree for this action. Eg is running smoothly now.

kgschlosser wrote: I am thinking I am going to have EG open a dialog to inform the user that the action is not set. and if they want at that point they can click on delete or configure. Setting this up is going to take a bit of time.
That would be nice. But I don't know if you have to take on the effort or having a warning about a dirty configuration would be sufficient.
kgschlosser wrote: and also!!!!
This is a nice OSD ya got going on here..
Default\htpc\htpc Start / Audio Video\Aktionen Routing\AudioVideoRouting\Anzeige-Profile\Modi\Alle\Show Volume OSD generic
My kind of OSD!! :shock: 8) 8)
Thanks :-)

Btw whats the status on the new editor with thread handling? I guess I had an old version of it in my config before updating to rc4 and it gives me an error when I try to use it. It is not included in RC4 right now right?
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Mon Jul 24, 2017 2:55 pm

@blaher

Code: Select all

IOError: [Errno socket error] [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
Traceback (most recent call last) (0.5.0-rc4):
  File "<string>", line 1, in <module>
  File "urllib.pyc", line 87, in urlopen
  File "urllib.pyc", line 213, in open
  File "urllib.pyc", line 350, in open_http
  File "httplib.pyc", line 1053, in endheaders
  File "httplib.pyc", line 897, in _send_output
  File "httplib.pyc", line 859, in send
  File "httplib.pyc", line 836, in connect
  File "socket.pyc", line 575, in create_connection

you have a whole lot of these errors in the log. I do not know where they are stemming from. then it appears that you ran eventghost with the -restart parameter from the command line.

Code: Select all

13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: Data received
13:03:21: 1 MainThread: Named Pipe: Command: eg.namedPipe.ping, Parameters:  ()
13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: return data: pong
13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: Creating pipe
13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: Data received
13:03:21: 1 MainThread: Named Pipe: Command: eg.document.IsDirty, Parameters:  ()
13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: return data: False
13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: Creating pipe
13:03:21: 0 EventGhost.Pipe.Thread: Named Pipe: Data received
13:03:22: 1 MainThread: Named Pipe: Command: eg.app.Exit, Parameters:  ()
13:03:22: 1 MainThread: Document.CheckFileNeedsSave()
and then it looks as tho the restart option got pressed a bunch of times. and then that's it.

I couldn't tell ya..

If you can give me some steps so i can reproduce the same behavior i will know where to look
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Mon Jul 24, 2017 3:08 pm

@Luca Brasi

I am working on something much much better.
I have gotten all events to automatically run in their own threads. i posted a test version of it here viewtopic.php?f=12&t=9743

It is a very experimental thing. I just finished up altering the EG tray icon actually. so the tray icon now shows 2 bars that will light up as the event is run. the left bar indicates the percentage the current running macro is finished and the right bar is the percentage the current running event is finished. because you can tie a single event to more then one macro. the right bar (event bar) is a different color for each event that is running. I have also started adding the bits and pieces to bring up a dialog of the events that are running a means to exit a looping thread it will also tell you what specific macro/action it is processing and how long the event has been running for. these options are not yet in a test release as of yet. but maybe by the end of the week. we will see how things go.

And the python script editor does need a facelift and I would redo the script editor i did up. I have a lot more knowledge now then when i originally wrote that thing. It would end up being a better implementation. at the current moment we are more focused on functionality then aesthetics. the time will come when we focus on beautifying EG. and because of the threading support built into the event system doing it in the script editor seems kind of pointless. and the way i came up with handling the logging of data with the threaded events it makes it possible to follow what is going on.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc4 is out

Post by Luca Brasi » Mon Jul 24, 2017 3:37 pm

Great news man!
I'll check back at the end of the week and see if I can test. Love to see that coming. Spent hours with trying to make a sense of macros running in different threads, letting their loops be interrupted by eg.globals and stuff like that...
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 3238
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Mon Jul 24, 2017 8:34 pm

this is going to be a really easy thing to use. this is basically what it would look like.
EG does all of the crazy mechanics to properly return the event you are asking for.
these are the attributes that are event specific so EG is able to do the back end magic to get the proper information return to you

eg.event
eg.eventString
eg.programReturnStack
eg.programCounter
eg.result
eg.indent
eg.stopExecutionFlag
eg.lastFoundWindows
eg.currentItem


these are new

eg.event.stop - tells you if you can keep on looping or not. and also allows you to stop a loop
eg.event.Wait - causes the event to wait inside of a loop. this is not a sleep it is a non blocking form of waiting
eg.event.colour - you can set either a wxColour or a tuple (Red, Green, Blue) with a number between 0-255 for each color
eg.event.start_time - the time the this event started
eg.event.stop_time - the time the this event stopped
eg.event.run_time - how long this event ran for in milliseconds

any of the events can be accessed at any given point by doing

Code: Select all

event = eg.EventManager['Prefix.Suffix']
so as an example, if you wanted to stop a specific event that is running in a loop from another event that is running

Code: Select all

event = eg.EventManager['Prefix.Suffix']
event.stop = True
or if you wanted to have an event wait until a specific event has finished

Code: Select all

event = eg.EventManager['Prefix.Suffix']
event.Wait()

and this is what a a loop would look like

Code: Select all

# do opening code

while not eg.event.stop:
    # do your looping code here

    # if you need to wait
    eg.event.Wait(1.0)

    data  = 'some data'
    if data:
        # do code that deal with data
        some_function(data)

        # to stop the loop this also gets set when EG closes
        eg.event.stop = True

# do your closing code here

I have also changed the Wait action to use these mechanics so they are non blocking waits as well.

There is still a lot I have to finish up but it is coming together really really nice. it's going to really expand what EG can do. and the only thing I have found thus far that is not on the plus side of things is the ram use. it's 5 meg higher LOL. But I think it's worth it.

some of the above may change. but the really cool thing is that almost all existing plugins should work right out of the box (unless i missed something or they have some kind of an override in it that uses pieces of EG that are more along the lines of a private thing.). But think of all of the really cool threading actions we will be able to put into place. No more of blocking Enduring events to repeat a macro.. or EG not responding because something is taking a long time to process. I had 1000 events running at the same time. and it didn't crash. But the limit on the number of threads would be the amount of available memory. when running a 32 bit app on a 64 bit OS there is 1 meg set aside for the thread on the 32 bit side of things and 256k on the 64 bit side. so technically speaking the limit I think would be in the amount of physical free memory available. I may have to put into place something that checks this to make sure EG doesn't cause a not enough system resources message.
If you like the work I have been doing then feel free to Image

Post Reply