Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: Comm Control and Global Cache Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: July 25 2016 at 13:16 | IP Logged Quote smarty

I have a general question regarding the above topic. From prior posts, I am aware that PowerHome has 5 “built-in” com controls (1-5). Since I have more than 5 different serially controlled devices, I make use of all 5 of these com controls, PLUS, I use the “PH_Comm.phcomm” plugin for the remainder of the serial devices (so each device has its own com control).

I already have a GC-100 with two serial ports. To set up each port, I run two instances of the following plugin: (PH_VSP.phvsp as the Active X Classname, and initialization data that looks like: 8 4999 192.168.0.189). Fast forward…..I now need to add another GC-100 and set up more serial ports.

It appears to me that by using the Global Cache plugin (PH_VSP.phvsp), it is expected (that is my question)??? that the com control SHOULD?? be handled by one of the five built-in com controls? Is that implied for the GC? Or, can I also set up a PH_Comm.phcomm plugin to be the com control for the GC (so I don’t have to reconfigure the built in 1-5 when I add a another GC to my system – assuming that I already have all 5 internal com’s assigned). Thoughts?


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: July 26 2016 at 22:31 | IP Logged Quote dhoward

Steve,

Not sure if I completely follow but will try to
explain.

PowerHome indeed has 5 "built-in" COM controls that
can be assigned to any existing serial port
(regardless if the serial port is a physical or
virtual port). These are the legacy COM controls that
have been a part of PowerHome for awhile and work just
fine. The only "disadvantage" is that they all run
from within the main PowerHome thread.

In more recent times, PowerHome received the plugin
architecture with one of the available plugins being
the serial control plugin. This plugin is very similar
to the built in COM controls in that it can be
connected to either a physical or virtual COM port.
The advantage of the plugin is that it runs in it's
own thread and won't necessarily burden PowerHome with
background communications.

The last piece of the puzzle is the Virtual serial
port plugin. This plugin allows you to declare a
virtual serial port (it will appear to the computer
and PowerHome as a physical serial port) that will
ultimately communicate with a socket connected device.
The serial ports on the Global cache need to be
defined as virtual serial ports. If you've got 2
Global Caches (with 2 serial ports each), you'll need
4 instances of this virtual serial plugin running.

Once you've got your Global cache serial ports
appearing on your computer as physical serial ports
(using the Virtual serial plugin), you are then free
to interact with those serial ports using either the
built in COM controls (1 thru 5) or as many instances
of the Serial plugin (PH_Comm.phcomm) as you need to
cover everything.

Depending upon what your serial devices are, you may
be able to reuse the built-in controls or the serial
plugin controls if you like. If you're mainly just
sending commands and receiving a response, you can
open the port, send the data, receive the data, and
close the port and then reuse it for a different COM
port. If you're needing it to stay connected though
and receive background communications, then you'll
need to designate a built-in or serial plugin for each
port.

Anyways, hope that explains it.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: July 28 2016 at 13:03 | IP Logged Quote smarty

Explains it wonderfully - Thanks!

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum