Announcement

Collapse
No announcement yet.

2 way IP - the approach?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    2 way IP - the approach?

    Hi,

    I would like to control a TCPIP device via HomeSeer and HSTouch.
    A simple use case is:

    1. A vb.net program (or script or dll or something) open a connection to the device and keeps it open, listening for data from the device.

    2. If I click a button in an HSTouch device, it tells the program in #1 to perform an action (send the TCPIP device a command). (i.e. change to channel 704)

    3. When certain data is received by the program in #1, it triggers feedback to the HStouch panel. (i.e. I'm on channel 705, update the panel text).

    4. The connection stays open unless HS closes - whereupon it would close too.

    My questions are how to go about this:
    A. Should I build a vb.net dll and then import that .dll into the HS namespace (settings.ini)? or

    B. Should I create a vb program that references HS (ie.Imports HomeSeer2) -- but in this case, how do I receive input from HS?

    C. Can this be done in a script? Seems to be more difficult to manage/code.

    D. Is the only way through a plugin? Seems like a lot of work!

    Am I missing the obvious????

    p.s. How would I trigger the event to update the HSTouch Panel...i.e. "update panel text to 705".

    Thanks in advance!

    Suresh

    #2
    Theres a plugin that was released only recently that will trigger events upon receipt of TCP commands - may be suitable, not sure if it sends data though. There is a script called socketsendtext.vb that will transmit TCP commands - combination of both you might be able to get two way comms working.

    Failing that I would say you may be better writing a plugin and using the .net.sockets namespace.

    To update data in HSTouch you are pretty much limited to updating devices which in turn display in the project, as long as you update the device string the data will update.

    Comment


      #3
      I think my TCP Trigger plugin will do most of what you want to do. It listens on a port for text strings and triggers events based on what it receives. I'm not familiar with HSTouch devices but if they can be made to send output to a remote ip address/port, the plugin can listen for them and act upon them.

      http://forums.homeseer.com/showthread.php?t=151068

      As for sending data to other remote devices via IP, it's going to depend a lot on what that device actually is. As mentioned in the previous post, socketsendtext.vb may be what you need. Or if the device you are trying to control has a web interface, you may be able to use "&hs.GetURL()" as a event action. I use this in some of my events to send commands to DirecTV receivers. What are you looking to control?

      Regards
      David

      Comment

      Working...
      X