Home
Joey Grover — Creating a Custom Interface for X10 Home Automation
Contents
1. Sia CO a A z 01010000 01010000 01010000 01010000 01010000 01010000 01010000 01010000 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010100 01010000 01010000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000000 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 10000100 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 00001000 0 0 0 0 0 0100100 0110100 0101100 0111100 10001000 0101000 0011000 00111000 1000000 01100000 1010000 111000 OO OO O 10011000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 0 0 0 0 0 0101100 0111100 0000000 0010000 00010000 0111000 1000000 01100000 1010000 01110000 1001000 110100 a 00110000 00001000 00101000 0 0 0 0 0 0011000 0111000 01000000 1100000 01010000 1110000 1001000 01101000 01011000 16 El6 OFF E BRIGHT 005 E DIM 005 F1 ON F1 OFF F2 ON F2 OFF F3 ON F3 OFF F4 ON F4 OFF F5 ON F5 OFF F6 ON F6 OFF F7 ON F7 OFF F8 ON F8 OFF F9 ON F9 OFF F10 ON F
2. A BA A A A OD OG PBPWWNHNEF EF CO OO OO OO OO E e CH O z O 000000000 z Mm Z H Z nj 25 Z ri ka ka ka ka ka O OFF L BRIGHT 005 Z 005 u Z Hj Z Hm Z H Z H Z m Z H Z Hj tr tr tr tr tr tr tr Hj OOOOOCOCOOOOOGO hi z Z mi Z H Gm Z HM Gm Gm ka ka ka ka ka tr tr O z OFF M BRIGHT 005 M DIM 005 N rj F mi Gi Z H Z tr tr tr H Z tr 11010100 11010100 11010100 11010100 11010100 11010100 11010100 11010100 11010100 11010100 11010100 11010000 11010000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000100 00000000 00000000 00010000 00010000 00010000 00010000 00010000 00010000 00010000 00010000 00010000 00010000 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 1000100 1001100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 1000100 1001100 0000000 0010000 0001000 0011000 0000100 0010
3. 00 00 00 00 00 00 00 00 00 00 0101000 0111000 0100100 0110100 0101100 0111100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 1000100 1001100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 1000100 0 0 0 0 0 0 0 0 0 KOD TD OKO O OD ES GU OO SOD 0 00 10 0 0 0 0 0 Y JOD OO O OD DIS O DUQUE OD 0 0 0 0 0 OOO O qo Eta DE O 22 O D P1 P1 P2 P2 P3 P3 P4 P4 P5 PO P6 P6 P7 P7 P8 P8 P9 P9 P10 P10 P11 P11 P12 P12 BI P13 P14 P14 P15 P15 P16 P16 O00000000000000000H Z 005 Hu Z H Z H Z H Z H Z H Z Hm Z H Z tr tr tr tr tr tr tr tr O00000000000 HZ z Hm Z m Gi Gm Z m Z rg ka ka ka ka ka tr tr O z OFF P BRIGHT 005 P DIM 005 00100000 00110000 00110000 00110000 00110000 00110000 00110000 00110000 00 00 110000 110000 00110000 00 110000 00110000 00 00 110000 110000 00110000 00 110000 00110100 00 00 110100 110100 00110100 00 110100 00110100 00 00 110100 110100 00110100 00 110100 00110100 00 00
4. 11100100 11100100 11100100 11100100 11100100 11100100 11100100 11100100 11100000 11100000 11110000 11110000 11110000 11110000 11110000 11110000 11110000 11110000 11110000 11110000 11110000 11110000 0 0 1111000 1111000 11110000 11110000 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 11110100 01100000 01010000 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 10001000 10011000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 J BRIGHT 005 J DIM 005 KI ON Kl OFF K2 ON K2 OFF K3 ON K3 OFF K4 ON K4 OFF K5 ON K5 OFF K6 ON K6 OFF K7 ON K7 OFF K8 ON K8 OFF K9 ON K9 OFF K10 ON K10 OFF K11 ON K11 OFF K12 ON K12 OFF K13 ON K13 OFF K14 ON K14 OFF K15 ON K15 OFF K16 ON K16 OFF K BRIGHT 005 K DIM 005 L1 ON Ll OFF L2 ON L2 OFF L3 ON L3 OFF L4 ON L4 OFF L5 ON L5 OFF L6 ON L6 OFF L7 ON L7 OFF L8 ON L8 OFF L9 ON L9 OFF L10 ON L10 OFF L1
5. unit that receives the signal from noma d Ge 55 the computer and sends out the PLC signal to the other X10 modules D eg X10 Appliance Lamp Module Depending on specific applications either can be used mese in the process Sa Firecracker This is the transmitter that will send the data from the computer to the X10 transceiver It is important to get the CM17A model Computer This to run the home automation interface as well as using it for the programming software Visual Studio NET This is the software suite that will be used to program the user interface Examples will be from the 2003 edition Optional USB to Serial Adapter If there is not an available serial port on the host computer that will run the interface Make sure that the DTR and RTS pins can be used Visual Studio net Professional the Wo and Mobile Devices Version 2003 4 Tutorial Step 1 Create a new form Open up Visual Studio NET and start a new project as in Figure 4 1 New Project Project Types Templates 3 Visual Basic Projects E Ve Mi g CA visual C Projects a Visual Je Projects windows Class Library Windows 3 Visual C Projects Application Control Library CA Setup and Deployment Projects i 1 Other Projects ve 3 la E VB CA visual Studio Solutions Smart Device ASP NET Web ASP NET Web Application Application Service JA project for creating an appli
6. 0 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 10001000 10011000 00000000 00100000 00010000 00110000 00001000 00101000 0 0 0 0 0 0011000 00111000 01000000 1100000 01010000 1110000 01001000 01101000 1011000 01111000 0000000 00100000 00010000 14 B10 B11 B11 B12 B12 B13 B13 B14 B14 B15 B15 B16 B16 B BRIGHT 005 00000000000 2727 Gm Z Mm Z Hj Z Hj ka ka ka ka ka ka O OFF B DIM 005 ci ci C2 C2 3 63 C4 C4 Ch Ch C6 C6 C7 C7 C8 C8 c9 c9 C10 C10 Cll c11 C12 C12 C13 C13 C14 C14 GER GER C16 C16 C BRIGHT 005 O z OOO O O OO O EEN EN E OO OVO O rj F H Z m Z m Gm Z m Z m z tr tr tr tr tr tr tr O0000000000 0H z Z mi Gm Z Hj Z H amam ka ka ka ka ka tr tr O z OFF C DIM 005 D1 D1 D2 D2 D3 D3 D4 D4 O 0000000 N mj F Hu z m Z tr tr H Z tr 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110100 01110000 01110000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000000 01000100 01000100 01000100 01000100 01000100 0100
7. 0100 01000100 01000100 01000100 01000100 01000100 01000100 01000100 01000100 01000100 01000100 01000000 01000000 01010000 01010000 01010000 01010000 01010000 01010000 01010000 01010000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 1000100 1001100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0100100 0110100 0101100 0111100 1000100 1001100 0000000 0010000 0001000 0011000 0000100 0010100 0001100 0011100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 OO OOO 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SIGO SUDO 15 D5 D5 D6 D6 D7 D7 D8 D8 D9 D9 D10 D10 D11 D11 D12 D12 D13 D13 D14 D14 D15 D15 D16 D16 OFF D BRIGHT 005 D DIM 005 El El E2 E2 E3 E3 E4 E4 E5 E5 E6 E6 E7 E7 E8 E8 E9 E9 E10 E10 E11 E11 E12 E12 E13 E13 E14 E14 E15 E15 El6 H Z H Z tr tr H Z Hj tr tr Coe eee ee z O O00000000000 fF 272572759727 252 Hi Hy ka ka ka ka tr tr O z O H Z F Gm Z H 27572 tr tr Hj u Z H Z m Z tr tr tr O0000000000000000 HZ al Gm Z H Z Hj tj ka ka tr tr mi Gm Z j tr tr tr
8. 010000 000 0011000 000 0010100 000 0011100 1000 0100 1100 1100 1000 0100 1100 o OO VVO O OD O GO O OO 0 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 G11 G11 G12 G12 G13 G13 G14 G14 G15 G15 G16 G16 G BRIGHT 005 0000000000 z mi Z m Z u Z dz ka ka ka ka tr tr z OFF G DIM 005 I O O o J JO UD DG BWWNHNE EH OOCOOCOOCOOOOOOCO T LO H10 H10 H11 H11 H12 H12 H13 H13 H14 H14 H15 H15 H16 H16 11 ch 12 12 13 13 I4 I4 I5 O z O z OOOOOOOCOO zZ H F H Z Hj Z H Gm Z H Z H Gm Z tr tr tr tr tr Hj tr 0000000000 00 tm z 27297 Z Hj Z H amam ka ka ka ka ka tr tr O z OFF H BRIGHT 005 H DIM 005 al F amam Z tr tr tr 10100100 10 100100 10100100 10 10 100100 100100 10100100 10 100100 10100100 10 10 100100 100100 10100100 10 100100 10100000 10 10 100000 110000 10110000 10 110000 10110000 10 10 110000 110000 10110000 10 110000 10110000 10 10 110000 110000 10110000 10 110000 10110000 10 10 110000 110000 10110100 10 110100 10110100 10 10 110100 110100 10110100 10 110100 10110100 10 10 110100 110100 10110100 10 110100 10110100 10 10
9. 1 ON 11110000 11110000 11000000 11000000 11000000 11000000 11000000 11000000 11000000 1100000 1100000 1100000 1100000 1100000 11000000 11000000 11000000 11000000 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000100 11000000 11000000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010000 11010100 11010100 11010100 11010100 11010100 O O S OO 10001000 10011000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 10001000 10011000 00000000 00100000 0001000 0011000 0000100 0010100 0001100 0 0 0 0 0 0 0 0 0 0 0 0 011100 100000 101000 100100 110100 101100 111100 000000 010000 001000 011000 000100 0 OD JO OVE O 0 01100000 0 01110000 0 SIGO O OOO ECH L11 L12 L12 L13 L13 L14 L14 L15 L15 L16 L16 S SS SS S K S SK K ESZ lt z Oo oO A Je D bb GA G H b 00000000000000000 Z LO M10 M10 M11 M11 M12 M12 M13 M13 M14 M14 M15 M15 M16 M16 z
10. 10 OFF F11 ON F11 OFF F12 ON F12 OFF F13 ON F13 OFF F14 ON F14 OFF F15 ON F15 OFF F16 ON F16 OFF F BRIGHT 005 F DIM 005 Gl ON Gl OFF G2 ON G2 OFF G3 ON G3 OFF G4 ON G4 OFF G5 ON G5 OFF G6 ON G6 OFF G7 ON G7 OFF G8 ON G8 OFF G9 ON G9 OFF G10 ON G10 OFF 10000100 10 000000 10000000 10 10 010000 010000 10010000 10 010000 10010000 10 10 010000 010000 10010000 10 010000 10010000 10 10 010000 010000 10010000 10 010000 10010000 10 10 010000 010100 10010100 10 010100 10010100 10 10 010100 010100 10010100 10 010100 10010100 10 10 010100 010100 10010100 10 010100 10010100 10 10 010100 010100 10010000 10 010000 10100000 10 10 100000 100000 10100000 10 100000 10100000 10 10 100000 100000 10100000 10 100000 10100000 10 10 1010000 10 1010000 10 10 100000 10000 10000 O O S OO 10010 100100 10100100 10 100100 01111000 10001000 10011000 00000000 00100000 00010000 00110000 00001000 0010100 0001100 0011100 0100000 0110000 0101000 0111000 0 OD 0 50 00 0 01001000 01101000 01011000 0111100 0000000 0010000 0001000 0011000 0000100 0010100 0 OO OOO 0 00011000 00111000 01000000 01100000 010 0111000 010 0110100 010 0111100 1000100 100 0000000 0
11. 100 0001100 0011100 0100000 0110000 0 0 0 0 0 0 0 0 0 ODO O 0 JOD KODA ID O DOG GEO JOD OO O DO O ODNO CO QUO SO O SD DOG DUO SUS OD O 0 0 DO GELO ECO 21 2224224224242 to O CO JJ Oh CH N9 N10 N10 N11 N11 N12 N12 N13 N13 N14 N14 N15 N15 N16 N16 Ol Ol 02 02 03 03 04 04 OD OD 06 06 07 07 08 08 09 09 O10 010 011 011 012 012 013 013 014 014 O15 O15 O16 O16 O BRIGHT 005 00000000 O zZ SO O OOO EL EE E OO OO OBO amam Z tr tr tr O0000000000 0H z Z mi Z H 2959727 amam ka ka ka ka ka tr tr O z OFF N BRIGHT 005 N DIM 005 H E mi Z H Z H Z Hj Z H Z H Z H Z tr tr tr tr tr tr tr O00000000000 MH z Z m Z Hm Z Hj Z H amam ka ka ka ka ka tr tr O z OFF 00010000 010000 00010000 010000 010000 00010000 010100 00010100 010100 010100 00010100 010100 00010100 00 00 00 00 00 00 00 00 00 00 00 00 010100 010100 00010100 010100 00010100 010100 010100 00010100 010100 00010000 010000 100000 00100000 00100000 00100000 00 00 00 00 00 1000 1000 00 00 00100000 00 1000 00 00100000 00 00 1000 1000 00 00 00100000 00100000 00100000 100000 100000 00100100 100100 00100100 100100 100100 00100100 00100100 00100100 100100 100100 00100100 100100 00100100 100100 00100100 00100100 100000
12. 1101 End Sub Figure 4 6 Button click code 10 Step 5 Install X10 modules At this point the software should be completed Now the X10 units need to be installed The transceiver should be near the computer for the best reception The other units can be located anywhere else in the house However make sure all their house codes are the same and each of their unit numbers are different The transceiver X10 module will always be unit 1 Step 6 Home automation Return to the home automation form Click Debug gt Start Debugging In the first text box enter 01100000 and 00000000 into the second be sure not to include the quotes Then click send The transceiver unit should then have turned on If not click the manual switch on the transceiver and try again Form1 Ist Byte 01100000 2nd Byte 00000000 SEND Figure 4 7 Form contents to turn on transceiver 11 5 Results The form that was created can now be used to control any X10 unit in the home Using the data from Appendix A the user can choose exactly what they want to happen Just enter the first 8 bits into text box 1 and the second 8 bits into the second text box and hit send 6 Conclusion This application note shows how to create a basic form to use in X10 home automation With what has been provided it is possible to send commands to any unit using the specific binary codes that belong to that unit and action to be carried o
13. 110100 110100 00110100 00 110100 00110100 00 00 110000 110000 10011000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 0 0 0 0 0 0 0 0011000 0000100 0010100 0001100 0011100 0111000 0101100 0000000 100000 101000 100100 110100 111100 010000 001000 0 01100000 0 OD PD OKO O O E O ONO O JO 0 01000000 01100000 01010000 0111000 0100100 0110100 0101100 0111100 1000100 1001100 0 0 0 0 0 0 0 23
14. 110100 110100 10110100 10 110000 10110000 11100000 11100000 11100000 11100000 11100000 11100000 11100000 11100000 11100000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 10001000 10011000 00000000 00100000 00010000 00110000 00001000 0010100 0001100 0011100 0100000 0110000 01010000 01110000 01001000 01101000 01011000 01111000 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 01010000 01110000 01001000 01101000 01011000 01111000 10001000 10011000 00000000 00100000 0001000 0011000 0000100 0010100 0001100 0011100 0100000 OO OO O ODO O O JO DO 18 RS I6 I6 17 17 18 18 19 19 110 110 111 TET EIS 112 ELS 113 114 114 115 115 116 116 I BRIGHT 005 I DIM 000 J JO 0 DG BWWNHNE HE OOCOCOOOCOOOOOOCOCOOCO j E E ESEJ EEG I EVE Eee te EH EEPEEPEEEEEBEHEO OU UE bs GA HAH OO q LA o 000000000 H Z H Gm Z H Z Hj kal ka ka ka ka O 0 0 00 E OG E Ooo Z H Z H Z Hj Z H Z Hu Z H H mj H Kal tr tr O z O Gm Z H Gm Z H 29727 29572 tr tr tr tr tr tr tr tr H Z Z mi Z HM Gm Gm amam j tr tr tr tr tr tr O 2 000000000000 tr tr 11100000 11100000 11100000 11100000 11100000 11100000 11100000 11100100 11100100 11100100 11100100 11100100 11100100 11100100 11100100
15. Add Existing Item and browse for the CRs232 vb Wherever the rs232 zip was unzipped is where this file will be located Step 4 Setting up the code Double click anywhere on the form where there is open space The first code that will be entered is the form load event code and global statements Enter the code in Figure 4 4 as it appears in the figure However the Port setting should be changed to the appropriate value The COM port number can be obtained through the device manager E Public Class Formi Inherits System Vindows Forms Form Private Declare Sub Sleep Lib kernel32 ByVal dwMilliseconds s Long Dim setRs232 As New Rs232 ES these two lines al Windows Form Designer generated code AH Private Sub Forml_Load ByVal sender As System Object ByVal e As System Eventirgs Handles MyBase Load With setRs232 Port 5 BaudRate 9600 DataBit 8 StopBit Rs232 DataStopBit StopBit_1 Parity Rs232 DataParity Parity None Timeout 10000 Dtr True Rts True End With setRs232 0pen Sleep 50 setRs232 Rts False setRs232 Dtr False Sleep 50 setRs232 Rts True setRs232 Dtr True Sleep 50 End Sub Figure 4 4 Form load and global statements Next scroll down to the bottom of the code window Right before the End Class statement enter the code from Figure 4 5 This is the function that turns the binary data into signals to be sent through the Firecrac
16. Creating a Custom Interface for X10 Home Automation Joey Grover April 2 2010 EXECUTIVE SUMMARY Home automation control is an area that is nearly endless in possibilities However most software that is designed for home automation is limited and doesn t provide desired features to the user This application note discusses the basics of home automation with X10 modules and shows how to create a simple form that will allow the user to control the X10 home automation modules KEYWORDS Home automation X10 firecracker CM17A Table of Contents E lg na a ea E ssp bat ea eo E el aware be Ala 2 Background taa O A 2 21X10 ODE EINEN a ico a Eege Pale ej 2 LALO APA Ai eege RU SS a a ai 2 2 3 o EE EE 3 Required Components Jus intima dnd ne be aa ka ene aa 5 AULA A A ad 7 Step 1 Create a New Form a 7 Step 2 Make the Interface ad 7 Step 3 Add Serial Communication rien 8 Step 4 Setting Up the Code nacida a 9 Step 5 Install X10 Modules coccnococccccccncccnnononononnnnnnnncnnnnnnnnnnnnnnncnnnns 11 Step 6 Home Automation ri eo ii 11 E 12 Dese UCT o WEE 12 ROTOS RE A SAA 13 APPEAR 14 1 Introduction Home automation gives consumers the ability to control their appliances without having to be physically near them The control can come from either hardware or software based applications The provided software suites usually limit consumers on what can be achieved This application note will discuss the
17. ability to set up and create a basic interface for home automation using X10 modules 2 Background 2 1 X10 Operation The interface that will be described will use the X10 units for home automation The X10 Firecracker RF module will send signals to a plugged in X10 Transceiver that will then use power line carrier PLC communication to send signals to other X10 units plugged into different outlets Each unit is assigned a house code and unit number this is done on a set of dials on the unit 2 2 X10 Firecracker The X10 Firecracker does not send a signal like a normal serial output Instead of using the dedicated data lines it uses the RTS and DTR pins on the serial port This allows a second serial device to be connected onto the firecracker as long as the second device does not need the RTS and DTR pins The Firecracker is powered by keeping either the RTS or DTR line high or logical 1 When communication is done it takes place in the following manner Signal RTS DTR Reset 0 0 Logical 1 1 0 Logical 0 0 1 Standby 1 1 One important note is that when trying to send a signal through firecracker unit either the RTS or DTR lines needs to remain high to ensure the signal gets sent and the unit isn t reset This is ensured by allowing a 5ms delay between signals A typical signal would look like this Standby 1 Wait 0 Wait 1 Wait RTS DTR Obtained from Firecrac
18. cation with a Windows user interface Name Home Automation Location C Documents and Settings admin My Documents Visue y Browse Project will be created at C admin My Documents Visual Studio Projects Home_Automation Fiore Cancel Help Figure 4 1 New Project Dialog Window Step 2 Make the interface Next add two buttons two text boxes and two labels to the form It should look like Figure 4 2 TextBox1 TextBox2 Button Figure 4 2 New form with added features It is then advised that the text and names are changed to something more useful Figure 4 3 a shows what the button s name should be changed to In the same menu of the respective components the displayed text can be changed Figure 4 3 b shows what the form should look like at this point Properties nx Send System Windows Forms Butto EN EI CE Form1 DynamicProperti a B DataBindings is Tag e 1st Byte E za Name Send 2nd Byte Locked False No Modifiers Friend H CausesYalidation True H Anchor Top Left Dock None Location 176 200 Size 120 48 Properties 2 Dynamic Help a b Figure 4 3 Properties menu and final form design Step 3 Add serial communication This will enable the form to communicate through the serial port First a file CRs232 vb will be needed It can be downloaded here www codeworks it net rs232 zip Then unzip the file and go back to the form and click Project gt
19. ker User Manual 2 3 X10 Protocol The communication done from the Firecracker unit to the transceiver has a protocol that must be followed Each command that is transmitted must include a 16 bit header and 8 bit footer with the user s desired 16 bit command signal in between totaling 40 bits Header User Command Footer The binary number for the header and footer are Header 11010101 10101010 Footer 10101101 The commands that actually make the different units turn on and off are contained in the 16 bit middle part of the protocol The following breaks apart each bit Byte 1 Byte 2 x X X X 0 X 0 0 X X X X X 0 0 0 1121314151617 18 11 2 3 4 5 6 7 8 Byte 1 One for house codes E L One for house codes A D amp I L One for house codes A B G H 1 0 P One for house codes B D F H J L N P Always zero One for units 9 16 Always zero Always zero ren S E DD Ee Byte 2 One for BRIGHT or DIM One for unit codes 5 8 amp 13 16 One for OFF Zero for ON or BRIGHT DIM One for unit codes 2 4 6 8 10 12 14 16 amp DIM command One for unit codes 3 4 7 8 11 12 15 16 amp BRIGHT amp DIM commands Always zero Always zero Always zero Doo O m The complete list of codes for X10 units is located in Appendix A 3 Components Required There are a few parts that are going to be needed in order to create a basic interface for home automation X10 Transceiver This unit will be the
20. ker unit The way it is set up is it iterates through each part of the string that is passed in and determines if it is 1 or O Then it changes the DTR or RTS pin respectively It then waits 5ms to accommodate the necessary delay and then turns the pin back on This ensures that the unit will always have a pin high so it doesn t reset at an incorrect moment Public Function SendBits ByVal Transmission As String Dim i j s Long Dim SendBit As Integer For i 1 To Len Transmission SendBit ValiMid Transmission i 1 If SendBit i Then setRs232 Dtr False Sleep 0 5 setRs232 Dtr True Else setRs232 Rts False Sleep 0 5 setRs232 Rts True End If Next i End Function Figure 4 5 Send function Now the button click code needs to be entered Every time the button is clicked it will send out the 2 bytes through the Firecracker to the X10 Transceiver this is what will enable the home automation Go back to the form and double click on the send button This will automatically open up the proper place to enter the click code Enter the code from Figure 4 6 Private Sub Send Click ByVal sender As System Object ByVal e As System EventArgs Handles Send Click Header This is Always the same Call SendBits 11010101 Call SendBits 10101010 User Data This changes with each send Call SendBits TextBox1 Text Call SendBits TextBox2 Text Footer This is Always the same Call SendBits 1010
21. ut From here the user can create custom in depth applications that are suited to their needs 12 7 References CM17A Protocol X10 N p n d Web 31 Mar 2010 lt ftp ftp x 10 com pub manuals cm17a_protocol txt gt Davis Adam CM17A Protocol Adam Davis N p 25 Jan 2008 Web 31 Mar 2010 lt http www ubasics com adam electronics cm17 shtml gt 13 8 Appendix A Al ON Al OFF A2 ON A2 OFF A3 ON A3 OFF A4 ON A4 OFF A5 ON AS OFF A6 ON A6 OFF A7 ON A7 OFF A8 ON A8 OFF AQ ON AQ OFF A10 ON A10 OFF All ON All OFF A12 ON A12 OFF A13 ON A13 OFF A14 ON A14 OFF A15 ON A15 OFF A16 ON A16 OFF A BRIGHT 005 A DIM 005 Bi ON Bl OFF B2 ON B2 OFF B3 ON B3 OFF B4 ON B4 OFF B5 ON B5 OFF B6 ON B6 OFF B7 ON B7 OFF B8 ON B8 OFF B9 ON B9 OFF B10 ON 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100000 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100100 01100000 01100000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110000 01110100 01110100 01110100 00000000 00100000 00010000 00110000 00001000 00101000 00011000 00111000 01000000 01100000 0101000
Download Pdf Manuals
Related Search
Related Contents
CONDITIONS GENERALES DE VENTE REVENDEURS INFORAD User Manual - CNET Content Solutions Spectraflex Installation & User Manual Aide à la conception, évaluation et démarche qualité pour le du 3 février au 30 septembre 2014 du 3 février au 30 Kenwood KAC8101D Car Stereo System User Manual Hall Research UH-1D Manual USBモデムドライバ取扱説明書(PDF形式) SMOKIN TOKEN EXTREME TROUBLESHOOTING Dale Tiffany STH11214 Installation Guide Copyright © All rights reserved.
Failed to retrieve file