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.

Controlling EventGhost with RS232 instead of IR?

If you have a question or need help, this is the place to be.
Post Reply
kelboswell
Posts: 6
Joined: Mon Jun 19, 2006 7:01 pm

Controlling EventGhost with RS232 instead of IR?

Post by kelboswell »

I'm a complete n00b to this, but have a question. Is there any way to get RS232 commands into EventGhost? I have an old AMX touchpanel that will send simple commands (that I can make at will) out an RS232 port. I'd like to be able to draw buttons on the AMX panel, and have it communicate with EventGhost. I've tried using the serial plugin, but I can't get it to listen to the port. I think it's just able to send. :(
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Well, the serial plugin is able to listen, but only as the reaction to something else.

What you need would be a special plugin. How are commands separated from this device? Or in other words: what is the terminator of a command?
kelboswell
Posts: 6
Joined: Mon Jun 19, 2006 7:01 pm

String termination

Post by kelboswell »

I can send any ASCII string I want. If there was a plugin that would listen for a 3-digit number followed by a character (such as < as the terminator), I could work with it. Then, I could draw a button, and just have it output 334<, and the EventGhost plugin would show an event called 334. Am I making any sense? :) That way, it would be able to respond to 1000 separate commands.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: String termination

Post by Bitmonster »

kelboswell wrote:Am I making any sense? :)
Yes. If you can, you could also directly use keywords for the events like "PowerOff" and terminate it with a carriage return.

I will see if I can make a configurable plugin for this in the next days. Similiar plugins are already written, like the Denon plugin or the UIRT2 plugin. But they are specially made for a single device and are not configurable till now.
kelboswell
Posts: 6
Joined: Mon Jun 19, 2006 7:01 pm

Post by kelboswell »

Yes. I am controlling Winamp right now with one of it's own plugins that will 'learn' strings coming from the serial port. I send stuff like 'play', 'stop', 'next', etc. And it works great. I'm not sure what kind of character the panel sends when I tell it to send a 'return' though. I don't know if it's a CR, LF, or CR/LF. I just don't send a 'return' at all using the Winamp plugin.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

I have just uploaded a new version (build 612) with an extended serial plugin. You can get it here:
http://www.eventghost.org/downloads/
First install the latest *_Setup.exe from there and after that install the latest *_Update.exe over it.

In the plugin configuration you will now find some more options. Enable "Generate events" and set an appropriate terminator. You can use Python string escapes there, so "\r" (without quotes) will match a CR, "\n" will match LF and "\r\n" will match CR/LF.
kelboswell
Posts: 6
Joined: Mon Jun 19, 2006 7:01 pm

Post by kelboswell »

That's AWESOME! I can't wait to give it a try! I'll let you know how it comes out for me. :)
kelboswell
Posts: 6
Joined: Mon Jun 19, 2006 7:01 pm

Post by kelboswell »

Sorry it took so long to get back...

It looks like it's going to work great! I've got the touchpanel connected, and I can see events being triggered when I press buttons. Looks like the touchpanel only sends a carriage return without linefeed when a 'return' is sent. :D
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Post by Bitmonster »

Is it possible to trigger an event different from the keypress if you release a button?

Background:
EG has some advanced functions that take the duration of the keypress into account (like autorepeat, IfLongPress, etc). To make such functions possible, some kind of information about the duration of the keypress is needed. So it would be great if you can get different events for the keypress and the keyrelease for example.
kelboswell
Posts: 6
Joined: Mon Jun 19, 2006 7:01 pm

Post by kelboswell »

I know that using an AMX panel with an actual AMX 'Master', a 'PUSH' and 'RELEASE' is sent when a button is pushed or released. Under serial control, I don't know of any way to do it. :( It would have been great if AMX had put that in their firmware. If anybody knows how to do this, please let us know.
Post Reply