Page 1 of 1

Communicate with PI using TCP

Posted: Thu Sep 12, 2013 11:34 pm
by yonubear
I just ordered a PI and I am trying to figure out how to code so that the pi will respond to tcp packets to that I can have it monitor several sensors for my HA system but I need to be able to get the pi to accept tcp packets from my girder setup and respond to them. I am just not sure where to start. I am hoping that I missed something when I was searching.

Thanks,
Yonu

Re: Communicate with PI using TCP

Posted: Fri Sep 13, 2013 7:03 am
by rpdom
You will need a TCP server of some sort listening on the port that your girder set up is sending on.

Pick your favourite language (Python, Perl, C etc) and search the web thingy for that language and "TCP Server", possibly add "simple" or "basic" in to the search terms too.

Re: Communicate with PI using TCP

Posted: Fri Sep 13, 2013 4:28 pm
by yonubear
Thanks wasn't sure if something existed.

Re: Communicate with PI using TCP

Posted: Fri Sep 13, 2013 4:59 pm
by ddxfish
Need more information. I have had Girder running 247 for almost 10 years now, and your question still confuses me :)

What type of home automation product, where does the signal go (give us an idea of how the packet should be routed through devices/PCs) etc. Tell me about ur setup

If i get what you are asking, you COULD use girders webserver to display variables etc in LUA or global variables in girder as information on a page. You could have the pi download the page displaying the variables with wget and have it parse them to do as you please and base actions off their levels.

Re: Communicate with PI using TCP

Posted: Sun Sep 15, 2013 7:47 pm
by yonubear
ok what I am trying to do is replace my old x10 sensors and modules that are no longer reliable in my guesthouse/storage building and my first thought is use a Pi and connect it to my girder setup using a TCP server so that they can talk back and fourth. when something changes.