
Submission By: Marcus Warrington Introduction Like almost all the currently available UK X10 modules, the LD11 does NOT support status response. This coupled with the fact that X10 commands can sometimes “go astray” and seemingly disappear into the electrical ether before reaching the chosen device, means that the tracking of the current status of a device is very error prone.
The possible solution One new solution to this problem is the use of Frank McAlinden’s Probe System. This system was originally designed to allow Homevision to obtain the current status of A/V Equipment in multiple zones (see This Article), but Frank has now expanded on this with a probe that uses a Super Bright white LED and detector designed to read the status of an LD11 unit.
The Hardware
Probe Zone Hub (PZH) – This connects either directly to the HV units internal ports , or via Franks HomeVision I/O Expander (to the HomeVision internal bus) or via the serial interface (9600 baud). The Probe Zone Hub provides the power (12v) and retrieves the status of any of the Probe Zone Monitors attached probes. Up to 8 Probe Zone Monitors can be attached to a single Probe Zone Hub. This gives a potential total 48 devices that can be queried.
* It should be noted that the system does require the user to supply their own 12v power supply (centre pin positive).
Probe Zone Monitor (PZM) – Each Probe Zone Monitor can monitor 6 different devices or 4 devices and 2 Dallas thermometer probes. Each Probe Zone Monitor connects to the PZH via a single piece of standard Cat5 cable. This provides power and communications with the Probe Zone Monitor, and allows the Probe Zone Monitors to be distributed around the home at convenient points.
LED Probe – This detects when the device is on (usually by detecting the on/off LED of the device, but in our case they detect the Super Bright white LED connected to the LD11). You need one of these per LD11. Each probe is approximately 1 meter long with a stereo jack on one end and a mono jack on the other. The stereo jack plugs into the back of the Probe Zone Monitor while the mono jack plugs into the LED Module.
Super Bright LED Module – This connects to the output of the LD11, and you will need one of these per LD11 module. The LED (and detector) are housed in a 16mm screw together plastic cylinder. This effectively gives opto isolation between the LD11 (High voltage output) and the Probe system (12 Volt).
Frank also sells these in kit form for you to make up yourself.
HomeVision IO Expander
Connects directly to HV bus (or via the serial interface) and allows HV to communicate with the PZH Unit via the IC2 bus.
Mutli Probe Adaptor – A simple black box that allows you to monitor several LD11’s via a single probe input on the PZM. This can be useful if you have several banks of lights in a room (scene lighting) and you don’t care to know which banks of lights are actually on, only that at least one of them is on.
Build Quality – The first thing that strikes you about the hardware is the highly professional finish and build quality of the units. Each unit is professionally engraved with whitened lettering on its front panel detailing the ports and status lights. The units have a strong and functional feel about it, each unit even has its own serial number, barcode and warranty information label attached.
Fitting the Super bright white LED modules – Each module requires the drilling of a small 16mm hole in the consumer unit above each LD11. The LED modules are composed of two plastic halves that screw together. One side of the unit holds the Super Bright LED and has two wires (live and neutral) for connection to the LD11 module. The other half houses the LED detector and has a jack socket for connection to the PZM unit.
This method keeps the low voltage components separated from the high voltage components inside the consumer units. I would recommend using a 16mm wood drill to make the necessary holes in the consumer units, as the spiked tip allows you to accurately position where the hole will be
My Installation – My X10 installation is a retrofit affair and as such the LD11’s are housed in 3 different locations around the house, attic cupboard, cupboard on first floor landing and above the suspended dining room.
Since each PZM is connected to then PZH via standard cat5 (for both power and status) this meant that I could place the PZM’s at each of these locations and connect them back to the PZH which was located at separate location convenient for my HomeVison. Eventually the HomeVison and PZH will be moved to my Node0 (when I finish it).
To start the project rolling I decided to concentrate on just one location and see how things went. The cupboard under the stairs on the first floor contains four consumer units housing 13 LD11 modules; these feed all the first floor bedrooms, bathroom, hallway and landings, and front rooms. I have so far mounted 6 of the probes covering the main bedrooms and hallways
Attaching to HomeVision – This is a fairly simple procedure but does involve opening up the HomeVision unit to attach the HV IO ribbon cable to the HV Bus via a push on block connector. Anyone who has ever connected an IDE drive to a PC should have no problem doing this. The other end of this ribbon cable then needs connecting inside the HV IO expander in a similar procedure. The HV IO expander then simply plugs onto the DB9 male connector on the rear of the PZH. There is also an rj12 connector on the front of the unit that is actually a serial connector for communicating with the device via a serial port (more on this later)
Once everything is connected (and everything double checked) its time to write some code and test everything. Testing the probes from HomeVision Software Frank’s HV IO Expander uses the Homevison IC2 bus and requires a registry patch to enable access to it, but if your using HomeVisionXL instead of the HomeVisions original software then the setting should be changed in the HomeVisionXL .ini file instead.
The probes status is tested by polling the HV IO Expander using the code specified in the documentation. Once code is entered, testing a probe status is simply a matter of setting a couple of variables (Probe Number and Zone Number) , calling the macro and then testing the flag (Probe status). This whole process seemed to take approximately ½ a second from start to finish.
Initial test was to simply to test the status of a single light, by running the macro to poll the status of a specific probe. The LED probes are very sensitive and are able to detect that a light is on even when it is at its lowest dim setting.
Initially the PZM (and PZH) reported the light as constantly on, its LED light showing red, until I realised I had connected the probe the wrong way around. The stereo jack plugs into the PZM and the mono jack end plugs into the LED Module.
Second test was to continually run this macro every 3 seconds to update a status flag within HomeVision and reflect the status of the light to ourbedside table lamps. This worked brilliantly and allowed the table lamps to come on automatically (within 3½ seconds) of someone switching on the main light.
Scream if you want to go faster – Having seen how useful it was to be able to track a lights status and mirror it to a table lamp, I set about trying to use the serial connection to provide a quicker refresh of probe statuses. The reason why this would be faster is that the serial protocol allows testing of all probes on a zone in one request and response message.
The Probe unit uses a simple but effective serial protocol that consists of a few ASCII characters, terminated by a single carriage return character.
e.g. “#QA1(cr)” = Query status of all probes on Zone 1
e.g. “#Q14(cr)” = Query status of probe 4 on Zone 1
The PZH responds with ;
e.g. “#RA1:ynyyyn(cr)”. Where ynyyyn is the status of each probe 1 – 6.
e.g. “#R14:y(cr)”
Not having a second serial port on my HomeVision unit, I setup a simple procedure whereby a IR remote could toggle the inbuilt HV comms port between being used to query the HV on a continual basis (at a baud rate 9600) and reverting to a normal control port connected to the PC (at a baud rate 19200).
The code to toggle the inbuilt serial port is pretty simple; on the receive of a known IR signal.
If
Timer #8 (ProbeHub_SerialScanningTimer) is stopped
Then
; turn ON – probe hub serial scanning
; ——————————————
Controller command: Disable Master Report Mode
Controller command: Set Baud Rate to 9600
;
; Set bit0 to flag that LasteState is unknown and should be initialised
; This means that an event will fire for each probe for the first call
Set bits 0 in Var #5 (ProbeScan_Zone1_LastState)
;
Load Timer #8 (ProbeHub_SerialScanningTimer) With 0:00:01:00 And Start
;
Controller command: Turn User LED On
Else
; turn OFF – probe hub serial scanning – revert back to HV control
; ——————————————————————————
Stop And Clear Timer #8 (ProbeHub_SerialScanningTimer)
Stop And Clear Timer #9 (ProbeHub_FailSafe_QA#)
Controller command: Set Baud Rate to 19200
Controller command: Enable Master Report Mode
;
Controller command: Turn User LED Off
End If
The code to request the PZH to send the status of all probes on zone 1 is automatically ran every 3 seconds via TIMER #8: ProbeHub_SerialScanningTimer ;
; Trasnmit “Query all Probes on Zone 1”
Stop And Clear Timer #9 (ProbeHub_FailSafe_QA#)
Serial port 1: Transmit string ‘#QA1’
Serial port 1: Transmit bytes ‘0D’
;
; Fail safe.. if Hub not repsonded in 10 seconds then resend query
Wait 0:00:10:00 with timer #9 (ProbeHub_FailSafe_QA#), Then:
If
Timer #8 (ProbeHub_SerialScanningTimer) is not stopped
Then
Load Timer #8 (ProbeHub_SerialScanningTimer) With 0:00:00:01 And Start
End If
End Wait
Once a request is sent, nothing else will be sent until a response to the query is received. The “ProbeHub_FailSafe_QA# timer” is used in case a response is missed, and will simply send the request again if no response is received within 10seconds.
The response to the query is captured in the “Data Input” event of SerialPort 1 of the HomeVision. The code check each probe status against the last known status and calls macro “#5 (ProbeStatusChange)” if the probe status has changed. The code has been shortened to only show the testing of probe 1 for the sake of conciseness. To test the other probes simply duplicate the “TEST PROBE 1” code changing the assignment of “VAR #2” and the “bit test” each time
; Bit 0 set = initialise the LastState i.e.call macro for probe state change regardless
; Bits 1 -6 are flags to store last known status so only call macro if probe state changed
If
Timer #8 (ProbeHub_SerialScanningTimer) is not stopped
And Serial port 1: Serial input characters number 1 through 3 are ‘#RA’
Then
Serial port 1: Put value of received char 4 into Result Value
Var #1 (Zone Buffer) = Result Value
;
; TEST PROBE 1———————————————
Var #2 (Probe Buffer) = 1
If
Serial port 1: Serial input characters number 6 through 6 are ‘y’
Then
; Probe is ON
If
Var #5 (ProbeScan_Zone1_LastState) bit 1 is not set
Or Var #5 (ProbeScan_Zone1_LastState) bit 0 is set
Then
; Probe has changed state since last scan
Set Flag #6 (ProbeScan_State)
Do Macro #5 (ProbeStateChanged) once
End If
Set bits 1 in Var #5 (ProbeScan_Zone1_LastState)
Else
; Probe is OFF
If
Var #5 (ProbeScan_Zone1_LastState) bit 1 is set
Or Var #5 (ProbeScan_Zone1_LastState) bit 0 is set
Then
; Probe has changed state since last scan
Clear Flag #6 (ProbeScan_State)
Do Macro #5 (ProbeStateChanged) once
End If
Clear bits 1 in Var #5 (ProbeScan_Zone1_LastState)
End If
; ——————————————————–
;
; ensure that initialise bit is now clear
Clear bits 0 in Var #5 (ProbeScan_Zone1_LastState)
;
; Start the sequence again by sending request for all status’
Load Timer #8 (ProbeHub_SerialScanningTimer) With 0:00:00:50 And Start
;
End If
MARCRO #5 ProbeStateChanged – This macro can then be used to do what ever you want to do. I have setup the code so that a the shelf lighting comes on and off with the main light.
If
Flag #6 (ProbeScan_State) is set
Then
; ‘New Status is ON
If
Var #1 (Zone Buffer) = 1
Then
If
Var #2 (Probe Buffer) = 1
Then
; 1=Bedroom 1 (Front Box Room)
X-10: A 7 (Bedroom1 shelf lighting) On
End If
End If
Else
; New Status is OFF
If
Var #1 (Zone Buffer) = 1
Then
If
Var #2 (Probe Buffer) = 1
Then
; 1=Bedroom 1 (Front Box Room)
X-10: A 7 (Bedroom1 shelf lighting) Force Off
End If
End If
End If
Using this method has meant that all 6 probes in a zone can be scanned in approximately 1 second. This compares to approximately ½ a second per probe (i.e.3+ seconds total) using the HV IO Expander method.
Multi Probe Adaptor In my Bathroom I have 6 recessed ceiling lights arranged in 3 banks of two lights. Each bank of lights is wired back to an LD11 module, with the single main light switch being wired to each of the 3 LD11’s. The reason for this is that (eventually) I plan on having scene lighting in the bathroom controlled by IR or WiFi form a PocketPC. The idea is that I could have the lights over the bath dimmed to 50% while the rest of the room is dimmed to 10-20% giving a more relaxed atmosphere while bathing and watching the bathroom TV (that I will hopefully be fitting).
Normally this arrangement would need to use 3 probe inputs i.e. half of the total inputs on a single PZM, but using Franks “Multi Probe Adaptor” means that I can get away with using only 1 input. The adaptor takes 3 probe inputs and aggregates them onto a single output that can then be connected to the PZM. If any of the inputs is “ON” then the output will also be “ON”. In my scenario this means that I will know if any of the lights in the bathroom are on (although not necessarily which ones) and only use one probe input on the PZM.
Temperature Monitoring As mentioned earlier , probes 5 + 6 can be used for temperature measurements using a temperature probe queried via the serialinterface.
The message structure is essentially the same as before ;
#Q15(cr)
but this time response is states the temperature of the probe ;
#R15:24.5 C(cr)
At the moment I have implemented a 5 minute poll of the temperature and log this to HV data log, although it would be a trivial matter to implement a macro that would be called if a target temperature was exceed.
Limitations – The only limitation I have come across is that the probes can only detect that lights are on (even when dimmed to their lowest setting), but they can not detect the actual level they have been dimmed to.
Benefits – Bedside lamps can now be controlled in line with the main ceiling lamp.
Its allowed me to check if the kids turn on their lights after ‘lights out’ and if so turn them off again after a few minutes. Its also allowed me to verify that X10 signals have been successfully received. I’ve setup functions that check if lights are on before lights out and if so dim the lights up and down five minutes before lights out, giving occupants a warning that lights out is imminent.
One advantage of using the probe system, rather than X10 status response is that it acts independently of the X10 communications wires, communicating directly with HomeVision rather than adding more packets, congestion and possible collisions to the X10 network.
Future Project – The next stage for me is to start integrating the lighting status into an xLobby floor plan, by having Home Vision inform xLobby whenever a light status change (on or off). This will be done by sending out X10 on/off signal whenever the status of a light changes (via a light switch) this X10 signal will then picked up by a CM12 connected to my AV machine running xLobby. This will then used to keep a floor plan screen up to date with the current status of the lights and devices in the house. Eventually I will use xAP or xPL for this (rather than X10) but that will require buying another serial port for the HomeVision.
Conclusion – The kit has been an unquestionable success, allowing me to track the status of my house lights even when changed via local control. Originally I intended to do this every minute or so, but by using the serial interface this has now become an almost real-time solution. Well done Frank, an excellent product that address one of the major failing of UK X10 modules !
You can read more about Franks projects at www.armaghelectrical.com.au. Discuss this system in our Forums.
Want More? – Follow us on Twitter, Like us on Facebook, or subscribe to our RSS feed. You can even get these news stories delivered via email, straight to your inbox every day
Be the first to comment on "X10 Lighting Monitoring – Probe Zone Hub Review"