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.

Event only triggering action every second time

If you have a question or need help, this is the place to be.
Post Reply
jimmy_d
Posts: 1
Joined: Thu Oct 06, 2011 4:04 am

Event only triggering action every second time

Post by jimmy_d »

Hi,

I'm running Windows 7 Professional SP1 and using EventGhost 0.4.1.r1540 with the Microsoft MCE Remote - Vista/Win 7 plugin and the XBMC2 plugin. Events from the MCE Remote are triggering actions from the XBMC2 plugin, and for the most part it is working well.

The problem I have is, every time I press a button on the MCE Remote it registers the proper event in the EventGhost log, but it is only triggering the corresponding action every second time the button is pressed. For example (from the log):

MceRemote.RC6mode6_0_8034045B
MceRemote.RC6mode6_0_8034845B
Right
XBMC2: Right
MceRemote.RC6mode6_0_8034045B
MceRemote.RC6mode6_0_8034845B
Right
XBMC2: Right

Does anyone have any ideas why it is only triggering the action every second time, and how I can fix it so that the action is triggered with every event?

Thanks!

Jimmy_d
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: Event only triggering action every second time

Post by jonib »

jimmy_d wrote:MceRemote.RC6mode6_0_8034045B
MceRemote.RC6mode6_0_8034845B
The events are slightly different that's why.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Event only triggering action every second time

Post by Pako »

This is normal behavior of remote control, that uses the RC6 protocol (or RC 5 and still some others).
Each button has two different codes, which differ in value of toggle bit. You can read about it.
This problem is usually solved in a way that in each macro you put both versions of events.
But a better solution is if you use plugin Remote event mapper. The configuration tree is then much clearer.
It even does not change even if you use another remote control. Just add a new remote control into plugin Remote event mapper.

Pako
colinwillo
Posts: 1
Joined: Tue Feb 14, 2012 4:46 pm

Re: Event only triggering action every second time

Post by colinwillo »

Hi i had the exact same problem with my xbox universal remote, it was showing the toggle bit everytime i pressed the button and i had to press each button twice, i found the problem to be the rc6 file in the irdecoder folder, it has masking bytes, but the value was not right for my remote , it had a 7 instead of a 0 to mask the toggle bit "see code below".
ive changed my file to accomodate my xbox remote but should work with any rc6 remote in win7,


# Check for MCE remote
if mode == 6 and trailerBit == 0:
value2 = value & 0xFFFF0FFF
if value2 in MCE_REMOTE:
return "Mce." + MCE_REMOTE[value2]
# else:
# print "0x%0.8X" % value2
return "RC6Lode%X_%d_%08X" % (mode, trailerBit, value)

you should then see the commands that are defined in the top portion of rc6 file in the eg window, you can add your own but be carefull of the format you use when adding.
just backup and replace the file rc6.py file in the "eventghost/eg/classes/irdecoder" folder with the one attached and it should fix the problem.
and dont forget to restart eventghost so it loads the new file you have just coppied.
Attachments
Rc6.py
(3.7 KiB) Downloaded 113 times
Post Reply