my setup: a RFID-Reader connected to EventGhost via Serial Port Plugin.
I receive events from the reader that contain the RFID-Tag-ID but also date and time (Hex).
This events come from the same RFID-Tag for example:
Code: Select all
Serial1.550E2000FA77AECD573914240412DD
Serial1.550E2000FA77AECD583914240412D2
Serial1.550E2000FA77AECD593914240412D3
Serial1.550E2000FA77AECD004014240412F3Code: Select all
Serial1.550E20006A6DAECD19461424041266
Serial1.550E20006A6DAECD2046142404125F
Serial1.550E20006A6DAECD2146142404125ETherefore I must tell EventGhost to ignore everything that comes after the 16th character of the event.
Is there a way to wildcard parts of event names?
I tried something like:
Serial1.550E20006A6DAECD*
But that obviously doesn't work in EG.
Can anybody help me out with a phyton script?
(I'm designer without phyton skills - but I could make a small donation to EG for your help).
Thank you very much,
Matthias
___
This is my current test file:
Code: Select all
<EventGhost Version="1568" Guid="{718DEE46-54C9-4A9E-AEC1-F578F49A3B5F}" Time="1335052766.77">
<Autostart Name="Autostart" Expanded="True">
<Action>
EventGhost.EnableExclusive(XmlIdLink(-1))
</Action>
<Plugin Identifier="Serial" Guid="{D565171F-1703-4212-972C-B824B55329CB}" File="Serial">
gAIoSwBNgCVLA0sASwBLAIhYBAAAAFx4QUFxAFgHAAAAU2VyaWFsMXEBSwF0cQIu
</Plugin>
</Autostart>
<Folder Name="test_event" Expanded="True">
<Macro Name="test_event_hello_world" Expanded="True">
<Event Name="Serial1.550E2000FA77AECD*" />
<Action>
EventGhost.PythonScript(u'print "Hello, World!"\n')
</Action>
</Macro>
</Folder>
</EventGhost>