PDA

View Full Version : CSEVENT G5 to G6



KRO74
November 24th, 2015, 07:01 AM
Hi,

I am trying to use the csevent app to send info from G5 (running on WinXP) to G6(Running on Raspi).
What portnumber and password should be used?

Regards

Ron
November 24th, 2015, 08:30 AM
csevent from Girder 5 will not communicate with Girder 6 unfortunately. You could use the Girder webserver on the RPI to trigger events as well... Does that help?

KRO74
November 24th, 2015, 08:51 AM
csevent from Girder 5 will not communicate with Girder 6 unfortunately. You could use the Girder webserver on the RPI to trigger events as well... Does that help?

It would help, I just do not know how to do it. I saw the G6 event pumping example using network.get but I do not know how to do that in G5....
Is socket.http a good startingpoint?

Regards

Ron
November 24th, 2015, 01:01 PM
You can use the Lua socket.http function or win.URLDownloadToMemory

The URL you should use is http://localhost/gir/triggerEvent.lhtml?es=EVENT_STRING&ed=EVENT_DEVICE

Obviously change "localhost" if G5 and G6 are on different machines.

KRO74
November 25th, 2015, 03:34 PM
I used the following and it worked perfectly,

test = win.URLDownloadToMemory( "http://" .. host .. "/triggerEvent.lhtml?es=" .. EventString .. "&ed=" .. EventDevice .. "&pld1=" .. pld1 .. "&pld2=" .. pld2 .. "&pld3=" .. pld3 )
print("Done" )

The only thing I haven't figured out is the variable name for keymod so that I can forward that as well.

Thanks for the support

Regards
Rickard Ottosson