Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Feature Requests
 PowerHome Messageboard : PowerHome Feature Requests
Subject Topic: Detecting PH changes in external apps Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
eHomeCreations
Groupie
Groupie


Joined: February 02 2007
Location: Ukraine
Online Status: Offline
Posts: 64
Posted: April 06 2007 at 15:41 | IP Logged Quote eHomeCreations

Detecting PH device changes from a external application.

'---------------------------------
If there is a good way to do this then someone tell me... (aaaahhh CAT FIGHT!!!    with REAL cats! Yep, outside my window as I write this) OK, back to the issue.

Anyway...

If I have my way. I suggest a UDP broadcast. That way anybody listing will know about it. A simple PH message structure might be:

UNIQUE_MSG_ID:MSG:PARAMS

Just a thought...   




__________________
--Steve       http://www. ehomecreations.com
Back to Top View eHomeCreations's Profile Search for other posts by eHomeCreations Visit eHomeCreations's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 11 2007 at 21:31 | IP Logged Quote dhoward

Steve,

Ive been churning on this idea for a little while myself and had ultimately come to the same conclusion as you...a UDP broadcast.

The thing Im trying to decide upon is using a single port for ALL PowerHome broadcast messages (Control Center change, device status change, trigger firing, table change, etc.) or using multiple ports for each type of broadcast message so that an app doesnt have to weed out the messages it's not interested in.

Would like to hear from you and any other developers/interested parties on what approach they think would be best. Right now Im leaning towards multiple ports.

Thanks,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
eHomeCreations
Groupie
Groupie


Joined: February 02 2007
Location: Ukraine
Online Status: Offline
Posts: 64
Posted: April 11 2007 at 21:51 | IP Logged Quote eHomeCreations


Hey Dave.

I think the multi ports is the way to go if you do have allot of different categories of messages you want to send. Although a single port would work.

I have done allot of commercial UDP work in the past and if I can make a suggestion. Prefix all UDP messages with a unique ID and broadcast them 3 or 4 times with a slight delay. The reason being. On a busy network you will loose around 50% of your messages. (UDP is not guaranteed to arrive) The unique message id is for the receiving application. That way it can tell if it has already received the message.

--Steve


__________________
--Steve       http://www. ehomecreations.com
Back to Top View eHomeCreations's Profile Search for other posts by eHomeCreations Visit eHomeCreations's Homepage
 
eHomeCreations
Groupie
Groupie


Joined: February 02 2007
Location: Ukraine
Online Status: Offline
Posts: 64
Posted: April 28 2007 at 13:15 | IP Logged Quote eHomeCreations

Hey Dave.

Getting any other feedback about this?

I am getting to a point in my eHome dev work that I have almost finished my importing of devices, global vars and macros from PH and also sending commands to PH. My touch screen interface is about 75% done.

Just wondering if you have a time line on this at all.
Thanks.



__________________
--Steve       http://www. ehomecreations.com
Back to Top View eHomeCreations's Profile Search for other posts by eHomeCreations Visit eHomeCreations's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: April 29 2007 at 23:06 | IP Logged Quote dhoward

Steve,

Heh, didnt get any other feedback so went ahead and implemented your suggestions.j

The next version of PowerHome will have a UDP broadcast server. So far Im broadcasting 4 different types of PowerHome events. It should cover pretty much everything.

The first UDP broadcast is for PowerHome Control type messages. This includes startup, shutdown, reinitialize, timed event start/stop, etc.

The second UDP broadcast is all triggers. Anywhere a trigger would be checked (whether or not a trigger actually exists), a UDP broadcast is made with the same information that would be used for a trigger check. Device changes, global variable changes, IR, etc. will all be broadcast.

The Third UDP broadcast are Device Status changes. This will be strictly for devices that show on the Device Status screen and will contain only devices that have changed.

The Fourth UDP broadcast will be Control Center changes. Anytime the Control Center changes from any of the ph_setccobj functions, the resulting data will be broadcast.

The upcoming remote CC/Device Status client will utilize these broadcasts.

Per your suggestion, the broadcasts will all have a unique ID and will be sent 3 times.

Im hoping to have this release out in 2 or 3 weeks.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: April 30 2007 at 07:35 | IP Logged Quote TonyNo

Is there a way to do something like this for plugins?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
cmhardwick
Senior Member
Senior Member
Avatar

Joined: July 08 2006
Location: United States
Online Status: Offline
Posts: 290
Posted: April 30 2007 at 09:59 | IP Logged Quote cmhardwick

Or can we just have the format of the messages to use (capture) in other apps?

__________________
Cicero, Enjoying automation!
Back to Top View cmhardwick's Profile Search for other posts by cmhardwick Visit cmhardwick's Homepage
 

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