
|

|

|
|

|

|

|

|
Technical Challenges in Market-Driven Automated Service Provisioning
>> more info | 5736 views
Aligning Information System Design and Business strategy - A Starting Internet Company
>> more info | 6333 views
Designing Value-based Inter-organizational Controls Using Patterns
>> more info | 6417 views
A Model-based Approach to Aid the Development of e-Government Projects in Real-life Setting Focusing on Stakeholder Value
>> more info | 6538 views
Business strategy-IT alignment in a multi-actor setting: A mobile e-service case
>> more info | 13084 views
Consistency Checking Between Value Models and Process Models: A Best-of-Breed Approach
>> more info | 12997 views
Value-driven coordination process design using physical delivery models
>> more info | 13163 views
Value-Driven Service Matching
>> more info | 13134 views
Next >>>
|
|
|
|
|
|
Gordijn.org >> Personal >> Homeautomation >> CM11ASimulator >> Index
|
Print page E-mail page
|
A CM11A simulator.
|
|
Rationale
I do most of my programming during traintrips and flights. So, I have then no CM11A at my disposal. That's why I needed a simulator. The development of the CM11AXPL gateway was almost entirely done using this emulator. |
|
Funtionality
The simulator has the following functionality:
- The simulator does simulation for:
- The CM11A itself
- One or more simulated X10 devices (on/off devices, dimmers)
- A remote control
- For the CM11A, it simulates:
- CM11A X10 command (if you ask to change a device's state this happens) (not: X10 extended commands)
- CM11A Event report (if a X10 device changes state, the simulator reports this).
- CM11A Status report (if you ask for the status of the CM11A, this is reported back) .
- X10 devices are simulated:
- On/Off devices and dimmers
- Two way devices (not X10 extended codes)
- Remote control: using a command line interface, you can change the state of X10 devices, and the CM11A emulator reports this accordingly.
|
|
Installation
The distribution below are the sources, which you have to build yourself. To do so, you need:
- log4j (I used version 1.2.13).
- RXTX (serial API for Java). Please take note that not only you have to compile the simulator with RXTX, but that you have also to install the runtime files of RXTX (in short putting rxtxParallel.dll and rxtxSerial.dll in the bin directory of your Java distribution, see the RXTX documentation for more information).
- com0com (this creates two virtual serial ports on your PC, which are connected as a null model. You connect the simulator to one port, and the program - communicating with the simulated CM11A) that should communicate with the simulator to the other port).
In CM11AEmulator.java, you can build your simulated X10 network:
- Go to the constructor (CM11AEmulator())
- Find here the statement "x10Network.add(new X10Device("Test", 'A', 1, true, true, cm11aExternalEventsSender));"
- This is the way to create a new X10 device. The arguments are:
- A user-friendly name for the device
- Houscode
- DeviceCode
- Boolean: indicates if the device reports on X10 state requests
- Boolean: indicates if the device reports events
- always "cm11aExternalEventsSender"
|
|
Usage
You can start the code, as you are used to in your development environment. The following command line argument is taken:
This indicates the COM port used by the simulator (here, we use COM6, because this is a COM port we have configured with com0com).
After starting, every state change is logged.
You can also send commands yourself using a remote-control emulator. The following commands are available (thanks to Jesse Peterson, see below):
commands = helpcmd | quitcmd | +( "(" command ")" )
helpcmd = "help"
quitcmd = "quit"
command = house-code key-code [extra data]
house-code = "A"
| "B"
| "C"
| "D"
| "E"
| "F"
| "G"
| "H"
| "I"
| "J"
| "K"
| "L"
| "M"
| "N"
| "O"
| "P"
key-code = "01" ; Unit 1
| "02" ; Unit 2
| "03" ; Unit 3
| "04" ; Unit 4
| "05" ; Unit 5
| "06" ; Unit 6
| "07" ; Unit 7
| "08" ; Unit 8
| "09" ; Unit 9
| "10" ; Unit 10
| "11" ; Unit 11
| "12" ; Unit 12
| "13" ; Unit 13
| "14" ; Unit 14
| "15" ; Unit 15
| "16" ; Unit 16
| "A0" ; All Units Off
| "L1" ; All Lights On
| "ON" ; On
| "OF" ; Off
| "DI" ; Dim
| "BR" ; Bright
| "L0" ; All Lights Off
| "S1" ; Status On
| "S0" ; Status Off
| "SR" ; Status Request
Example:
| Turn on device A3 | (A03)(AON) |
| Turn off all lights for house code A |
AL0 |
| Dim B13 by 11 dims | (B13)(BDI11) |
|
|
Limitations
-
As told earlier, not all CM11A functionality is covered, and also not all X10 functionality (e.g. no extended codes, and no macros)
-
The simulator does not simulate any timing issues of the CM11A (a real CM11A needs e.g. some time to respond on a command, this is not simulated).
|
|
Acknowledgements
The CM11A uses some of Jesse Peterson's Java classes (borrowed from his Java API for the CM11A), and some of his example code (e.g. for the remote control simulator |
|
|
|
|
Files and links
|
CM11A simulator |
A Java-based simulator for the CM11A X10 device |
12/05/06 |
55 KB | |
|
Sort by name,date,type
|
|
|
|
Publications of Jaap Gordijn can be found here
|
|
|
A Java-based gateway between XPL (Lighting scheme) and the X10 CM11A
|
|
|
A Java-based simulator for the X10 CM11A device
|
|
|
Interested in a MSc assignment?
|
|
|
HBO graduates in Information Sciences
|
|
HBO (HEAO-BI, HIO, HTS-TC, IandI, IE) graduates who want to start a master Information Sciences at Vrije Universiteit (VU) Amsterdam, please read on.
|
|
|
|
|
|
|
|