Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Hardware
 PowerHome Messageboard : PowerHome Hardware
Subject Topic: Motorized TV Mount - 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: January 19 2009 at 15:58 | IP Logged Quote smarty

I went ahead and purchased this motorized TV mount from Best Buy.Link

This can either be controlled locally by IR, or serially via RS-232 (see attached RS-232 codes).
2009-01-19_153331_20080703_crestron_protocol_for_Omni_080701 .zip

Presently, I am able to send serial commands. The commands take the form of:

ph_comsendstring(1,"\xAD\xA2\x01\x02\xA5\")<=Left
ph_comsendstring(1,"\xAD\xA2\x01\x05\xA8\") <=Center

While sending one way commands works, ideally I would like to also RECIEVE and intrepret message comming BACK from this unit.

Since I have other RS-232 controlled devices, I tried using the same approach ...see lines 30-90 of the picture below.

Note: This is just an example macro (this is how I control my LG TV).

This approach does NOT seem to work.

Since the rs-232 instructions say all commands are in Hex, I wonder if "ph_comrecvchar(1)" works with Hexadecimal?

Any help with this is appreciated.



Edited by smarty - January 19 2009 at 16:01


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

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 19 2009 at 19:55 | IP Logged Quote TonyNo

The mount is using binary, so you can just switch your ph_comrecvchar(1) to a ph_comrecvstring( 1, 1 ).

From Help...

Quote:
This function is also capable of receiving binary characters as well. Characters with ASCII values from 32 to 125 and not equal 92 will be returned as their standard character counterparts. Characters below 32, greater than 125, or equal to 92 will be returned as an escape sequence consisting of the "\" character followed by three decimal digits representing the ASCII value. For example, the "\" (backslash character) will be returned as "\092". A carriage return character will be returned as "\013". This counts as a single character concerning the number of characters returned.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 19 2009 at 20:08 | IP Logged Quote TonyNo

...and, of course, get rid of the CHAR( INTEGER()) bit as these will not translate to ASCII. That should be...

Set System [TEMP1] "[TEMP1]" + "[LOCAL1]"

After the string is built, you can compare to your encoded responses, just in decimal not hex ("\xAD" would come in as "\173").

Edited by TonyNo - January 19 2009 at 20:11
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 20 2009 at 09:30 | IP Logged Quote smarty

Tony you are AWESOME!!!   

As a non-programmer I am not sure I would have ever figured this out.

Thank You!!

Edited by smarty - January 20 2009 at 10:02


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

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 20 2009 at 13:56 | IP Logged Quote TonyNo

Quote:
As a non-programmer...

Not for long!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 20 2009 at 21:52 | IP Logged Quote smarty

Edit
Let me better clarify: With macro logging enabled, it appears that I never see any incoming traffic on my com control, ie, my "COM PORT LG MOUNT" macro is NOT called.

End edit.

++++++++++++++++++++++++++++++++++++++++++++++++++++++
Shoot....it still does not seem to recieve any incoming serial traffic.

This is how I open my serial port:
ph_comopen(1,16,9600,"N", 8, 1, 1, 0, 0, 1, 0, 0, 0, "?","COM PORT LG MOUNT")

I open the above port, send out a
ph_comsendstring(1,"\xAD\xA2\x01\x05\xA8\")

I keep this com control open for about 3 seconds before i close it. That should be plently of time for serial traffic, but the "COM PORT LG MOUNT" macro never gets called.

One way communication is all I can get presently.





Edited by smarty - January 21 2009 at 07:55


__________________
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