The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: HomeVision and Comfort users


  • To: <ukha_d@xxxxxxx>
  • Subject: RE: HomeVision and Comfort users
  • From: "Paul Gale" <groups@xxxxxxx>
  • Date: Tue, 11 Nov 2003 11:08:27 -0000
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

Long post coming up!!!

This is the 'Serial Data Input' code for serial port 3 (extra serial port
o=
n HV):

Serial port 3: Put binary value of received serial character # 1 into Res=
ult Value
Var  #43 (Test - serial char 1) =3D Result Value
Serial port 3: Put binary value of received serial character # 2 into Res=
ult Value
Var  #44 (Test - serial char 2) =3D Result Value
Serial port 3: Put binary value of received serial character # 3 into Res=
ult Value
Var  #45 (Test - serial char 3) =3D Result Value
Serial port 3: Put binary value of received serial character # 4 into Res=
ult Value
Var  #46 (Test - serial char 4) =3D Result Value
Serial port 3: Put binary value of received serial character # 5 into Res=
ult Value
Var  #47 (Test - serial char 5) =3D Result Value
Serial port 3: Put binary value of received serial character # 6 into Res=
ult Value
Var  #48 (Test - serial char 6) =3D Result Value
Serial port 3: Put binary value of received serial character # 7 into Res=
ult Value
Var  #49 (Tset - serial char 7) =3D Result Value
Serial port 3: Put number of received serial characters into Result Value
Var  #1 (Serial Buffer Size) =3D Result Value
Serial port 3: Put binary value of received serial character # 1 into Res=
ult Value
Var  #2 (First Serial Character) =3D Result Value
Var  #3 (Var 3) =3D var #2 (First Serial Character)
If
; If first character is the STX character (Ctrl-C)
Var #2 (First Serial Character) =3D 3
Then
; Comfort Command or Status Report
Var  #4 (Test - Location) =3D 10
If
; If we get NA, we're not logged in, so log in
Serial port 3: Serial input characters number 2 through 3 are 'NA'
Then
; Log in using macro
Var  #4 (Test - Location) =3D 11
Do macro #0 (Comfort login) once
Set flag #0 (Done login)
Else
; Determine the status code and act on it
Var  #4 (Test - Location) =3D 12
If
Serial port 3: Serial input characters number 2 through 3 are 'IP'
Then
; Zone sensor activated
; Get zone number - it's in ASCII Hex  format - change to decimal
Var  #4 (Test - Location) =3D 13
Serial port 3: Put binary value of received serial character # 4 into Res=
ult Value
Var  #6 (Serial Character 1) =3D Result Value
Serial port 3: Put binary value of received serial character # 5 into Res=
ult Value
Var  #7 (Serial Character 2) =3D Result Value
Do macro #1 (Hex digits to decimal number) once
; Decimal value returned in variable 'Result of HEX-DECIMAL conv.'
If
; If input reported by Comfort is a light (1-27), do lighting macro
Var #8 (Result of HEX-DECIMAL conv.) < 28
Then
If
; Actions for zone ON status
Serial port 3: Serial input characters number 7 through 7 are '1'
Then
Var  #4 (Test - Location) =3D 16
; Add the offset (10) to the Zone Number to activate the Macro
Var  #9 (Lighting Macro Number) =3D var #8 (Result of HEX-DECIMAL conv.)
Var  #9 (Lighting Macro Number) =3D var #9 (Lighting Macro Number)  +  10
Do macro at variable #9 (Lighting Macro Number) once
End If
If
; Actions for zone OFF status
Serial port 3: Serial input characters number 7 through 7 are '0'
Then
Var  #4 (Test - Location) =3D 17
End If
End If
If
; If input is 3rd button on keyfob (house symbol)
Var #8 (Result of HEX-DECIMAL conv.) =3D 31
Then
If
; Action for ON
Serial port 3: Serial input characters number 7 through 7 are '1'
Then
Do macro #56 (Open/Close Garage Door) once
End If
End If
If
; If input is 4th button on keyfob (Light symbol)
Var #8 (Result of HEX-DECIMAL conv.) =3D 30
Then
If
; Action for ON
Serial port 3: Serial input characters number 7 through 7 are '1'
Then
Do macro #57 (Lights for keyfob) once
End If
End If
End If
If
; Alarm mode change received (M? from query, MD from actual change)
Serial port 3: Serial input characters number 2 through 3 are 'M?'
Or  Serial port 3: Serial input characters number 2 through 3 are 'MD'
Then
Serial port 3: Put value of received serial character # 5 into Result Val=
ue
Var  #40 (Comfort Alarm ARM Status) =3D Result Value
If
; Only do this on ACTUAL state change
Serial port 3: Serial input characters number 2 through 3 are 'MD'
Then
Do macro #45 (Alarm state change detected) once
End If
End If
If
Serial port 3: Serial input characters number 2 through 3 are 'C?'
Or  Serial port 3: Serial input characters number 2 through 3 are 'CT'
Then
; Counter value report - for SmartFit Heating
Var  #4 (Test - Location) =3D 18
If
; Room Temperature Report
Serial port 3: Serial input characters number 4 through 5 are '00'
Then
; Convert Hex temperature to Decimal
Var  #4 (Test - Location) =3D 19
Serial port 3: Put binary value of received serial character # 6 into Res=
ult Value
Var  #6 (Serial Character 1) =3D Result Value
Serial port 3: Put binary value of received serial character # 7 into Res=
ult Value
Var  #7 (Serial Character 2) =3D Result Value
Do macro #1 (Hex digits to decimal number) once
Var  #37 (Room Temperature) =3D var #8 (Result of HEX-DECIMAL conv.)
End If
If
; Hot Water Temperature Report
Serial port 3: Serial input characters number 4 through 5 are '01'
Then
; Convert Hex temperature to Decimal
Var  #4 (Test - Location) =3D 20
Serial port 3: Put binary value of received serial character # 6 into Res=
ult Value
Var  #6 (Serial Character 1) =3D Result Value
Serial port 3: Put binary value of received serial character # 7 into Res=
ult Value
Var  #7 (Serial Character 2) =3D Result Value
Do macro #1 (Hex digits to decimal number) once
Var  #38 (Hot Water Temperature) =3D var #8 (Result of HEX-DECIMAL conv.)
End If
End If
End If
Else
End If
Wait 0:00:05.00 with timer #26 (Test Timer), Then:
Var  #4 (Test - Location) =3D 0
End Wait

This is an example of some of the serial commands received and acted upon.
=
The hex to decimal conversion macro is:

MACRO EVENT # 1 'Hex digits to decimal number'

; Converts Hex ASCII digits to decimal
Var  #7 (Serial Character 2) =3D var #7 (Serial Character 2)  -  48
If
Var #7 (Serial Character 2) > 9
Then
Var  #7 (Serial Character 2) =3D var #7 (Serial Character 2)  -  7
End If
Var  #6 (Serial Character 1) =3D var #6 (Serial Character 1)  -  48
Var  #6 (Serial Character 1) =3D var #6 (Serial Character 1) =D7 2
Var  #6 (Serial Character 1) =3D var #6 (Serial Character 1) =D7 2
Var  #6 (Serial Character 1) =3D var #6 (Serial Character 1) =D7 2
Var  #6 (Serial Character 1) =3D var #6 (Serial Character 1) =D7 2
Var  #7 (Serial Character 2) =3D var #7 (Serial Character 2)  +  var #6 (=
Serial Character 1)
Var  #8 (Result of HEX-DECIMAL conv.) =3D var #7 (Serial Character 2)

The Comfort login macro: (not actually used much as the UCM stays logged
in=
- ACE deals with this anyway)


MACRO EVENT # 0 'Comfort login'

Var  #5 (Comfort Control Character) =3D 3
Serial port 3 transmit: Variable #5 (Comfort Control Character) value as =
1 binary byte
Serial port 3 transmit: "LIxxxxxx"
Var  #5 (Comfort Control Character) =3D 13
Serial port 3 transmit: Variable #5 (Comfort Control Character) value as =
1 binary byte

Where 'xxxxxx' is your login code.

I also have a macro which is called by any security mode changes - let me
k=
now if you want that and I'll send off list (for security reasons
obviously=
!)

Paul.



-----Original Message-----
From: Mark McCall [mailto:lists@xxxxxxx]=20
Sent: 11 November 2003 09:09
To: ukha_d@xxxxxxx
Subject: Re: [ukha_d] HomeVision and Comfort users

> I then have a Comfort serial UCM talking directly to one of the serial
> ports on HV Pro - HV then listens to the serial messages

Paul

How big a job is it writing the macros to allow HV to decode the serial
commands coming from Comfort?  Can you cut and paste an example or two?

Thanks

M.




UKHA 2004: 15th and 16th May 2004

http://www.automatedhome.co.uk=20
Post message: ukha_d@xxxxxxx=20
Subscribe:  ukha_d-subscribe@xxxxxxx=20
Unsubscribe:  ukha_d-unsubscribe@xxxxxxx=20
List owner:  ukha_d-owner@xxxxxxx=20

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20






Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.