Posted: October 28 2002 at 16:47 | IP Logged
|
|
|
Bob,
I looked over my earlier message and realized that the ph_x10setstat would'nt set it to unknown. But did play around and you can get the effect with direct SQL. What I would do is create a trigger for X-10 Out for both C6 On and C6 Off. Use direct SQL and set the status to unknown. Send an X-10 status request for the device and then wait for the status to come back. You don't have to create a trigger for the status request because if you request the status and it comes back, it will automatically update the status. As an example, here is a Send Keys command for the X-10 Out for the C6 On or Off:
ph_rtne(ph_directsql("update x10unitcode set status = 0 where id = 'C' and code = 6") + ph_x10refreshstat() + ph_x10(1,"C",6,0) + ph_x10(1,"C",15,0))
This will directly set the status to "Unknown", refresh your status screen and automatically send the code to request a status from the C6 device (the ph_x10 commands assume you are using controller 1).
A list of X-10 commands is:
All Units Off 00
All Lights On 01
On 02
Off 03
Dim 04
Bright 05
All Lights Off 06
Extended Code 07
Hail Request 08
Hail Acknowledge 09
Pre-set Dim (1) 10
Pre-set Dim (2) 11
Extended Data Transfer 12
Status On 13
Status Off 14
Status Request 15
Let me know if the above works out for you.
Dave.
|