Eventghost and TCP/IP messages

If you have a question or need help, this is the place to be.

Eventghost and TCP/IP messages

Postby prb238 » Tue Aug 21, 2007 2:27 am

All -

I have been playing around with Eventghost for several weeks. I have it set up to use the Generic Serial plugin and I have successfully gotten it to control my NAD T163 Receiver. I ended up having to play around with the formatting of the commands that NAD supplied and eventually got the correct hex format (looked nothing like what NAD had in their manual :) ).

My next step is to use NetRemote to send commands over my network via TCP/IP and have Eventghost receive those commands and respond with triggering the appropriate events.

I have been playing around with the Generic Plugin on the NetRemote side and have written specific code to create a TCP/IP connection and attempt to connect to Eventghost. I have read various posts in the forum and I have followed the format of the Network Send script on the Eventghost side. After I connect to the port, I send the string "quintessense\r". I have verified the string is being sent. My program then receives the cookie from Eventghost and then calculates the MD5 hash from the cookie and the password concatenated together. My issue is that Eventghost never responds to the "quintessence" string and doesn't pass anything back to my Generic Plugin module in NetRemote.

I am by no means an experienced TCP/IP socket programmer, however, I do have significant programming background and experience in many languages. I have basically been following examples and tips that I have found on the internet, the Eventghost forum, and the Netremote forum.

Anyone have any suggestions for how to get Eventghost to respond once I send the "quintessense" string to connect? I am probably missing something simple, but I need an assist to get over this hump.

I am currently testing NetRemote on my HTPC which is where Eventghost is also installed. My plan was to get it working on there and then test it on my HP IPAQ through my wireless network.

Thanks!

prb238
prb238
 
Posts: 5
Joined: Tue Aug 21, 2007 2:01 am

Re: Eventghost and TCP/IP messages

Postby Bitmonster » Tue Aug 21, 2007 2:16 pm

Have you added linefeed and carriage-return to the "quintessence" string?

If you only want to use Netremote, you don't need to write any code at all. EG's "Network Event Receiver" uses the same protocol as Girder's "Internet Event Server", so you can simply send the events from Netremote to EG the same way as you would do to Girder.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Eventghost and TCP/IP messages

Postby prb238 » Tue Aug 21, 2007 11:17 pm

Thanks for the reply. Yes, I have tried the string with both linefeed and carriage return chars. I'll try again just to be safe.

I did try to set up the connection to EG in NetRemote using the Girder plugin - it lets you choose between Girder 3 and Girder 4. It has been a few weeks since I attempted that so I can't recall what the issues were. I will attempt that again and see if it works.

Thanks.

prb238
prb238
 
Posts: 5
Joined: Tue Aug 21, 2007 2:01 am

Re: Eventghost and TCP/IP messages

Postby prb238 » Thu Aug 23, 2007 2:08 am

ok - I tried using the built in Girder plugin within NetRemote to try and connect to EG and here is what I get (I tried both Girder3 and Girder4):

9:57:41 PM error: uncaptured python exception, closing channel <pluginImport.NetworkReceiver.Server_Handler connected 172.16.1.40:3913 at 0x20d1120> (<type 'exceptions.UnicodeDecodeError'>:'ascii' codec can't decode byte 0xa5 in position 1: ordinal not in range(128) [asyncore.pyc|read|68] [asyncore.pyc|handle_read_event|390] [asynchat.pyc|handle_read|137] [C:\Program Files\EventGhost\plugins\NetworkReceiver\__init__.py|found_terminator|106] [C:\Program Files\EventGhost\plugins\NetworkReceiver\__init__.py|state1|121] [C:\Program Files\EventGhost\eg\Init.py|PrintError|437] [C:\Program Files\EventGhost\eg\Log.py|DoPrint|116] [C:\Program Files\EventGhost\eg\Log.py|Write|104])

I see some similar type of posts and fixes in the bug forum but not quite sure what I should do here. Do I need to change the decoding format in the state3 procedure?

I can't find the source for the Girder plugin within NetRemote, so I can't debug it on that side . . . . .

Any ideas? Would you like more info on what NetRemote is passing over to EG?

Thanks.

prb238
prb238
 
Posts: 5
Joined: Tue Aug 21, 2007 2:01 am

Re: Eventghost and TCP/IP messages

Postby prb238 » Thu Aug 23, 2007 2:45 am

Alright - I spoke too soon. I went out and installed the latest beta file - 0.3.6.1103 and IT WORKS!!!!!! I was definitely making it too hard by trying to write my own plugin within NetRemote . . . . .

I set NetRemote up to use the Girder3 plugin and my commands are received by EG and sent to my NAD T163 via the Serial Plugin. NICE.

Now to test it from my HP IPAQ.
Last edited by prb238 on Fri Aug 24, 2007 1:12 am, edited 1 time in total.
prb238
 
Posts: 5
Joined: Tue Aug 21, 2007 2:01 am

Re: Eventghost and TCP/IP messages

Postby prb238 » Thu Aug 23, 2007 4:20 am

Update - I have tested the interaction between NetRemote and EG from my HP IPAQ over my wireless network and everything works great.

Thanks Bitmonster for suggesting to look again at the Girder plugin - otherwise I'd still be sitting here messing around with custom code . . . :)
prb238
 
Posts: 5
Joined: Tue Aug 21, 2007 2:01 am


Return to General Support

Who is online

Users browsing this forum: Bing [Bot] and 2 guests