yonubear
Posts: 90
Joined: Thu Sep 12, 2013 11:11 pm

Communicate with PI using TCP

Thu Sep 12, 2013 11:34 pm

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

User avatar
rpdom
Posts: 15188
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Communicate with PI using TCP

Fri Sep 13, 2013 7:03 am

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.

yonubear
Posts: 90
Joined: Thu Sep 12, 2013 11:11 pm

Re: Communicate with PI using TCP

Fri Sep 13, 2013 4:28 pm

Thanks wasn't sure if something existed.

User avatar
ddxfish
Posts: 75
Joined: Wed Aug 07, 2013 5:17 pm
Location: Florida
Contact: Website AOL

Re: Communicate with PI using TCP

Fri Sep 13, 2013 4:59 pm

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.
My Pi Guides: http://www.etcwiki.org/wiki/Category:Raspberry_Pi
My AIM screen name: ddxfish
Always happy to chat about the Pi!

yonubear
Posts: 90
Joined: Thu Sep 12, 2013 11:11 pm

Re: Communicate with PI using TCP

Sun Sep 15, 2013 7:47 pm

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.

Return to “Automation, sensing and robotics”