The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: Great gadget components website...


[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: "Mark Walker" <davros@xxxxxxx>
  • Date: Tue, 11 Nov 2003 17:25:50 -0000
  • Mailing-list: list ukha_d@xxxxxxx; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

Thanks for all your help guys, thats just what I needed to know.
Thanks
Mark


--- In ukha_d@xxxxxxx, "Paul Gale" <groups@s...> wrote:
> Long post coming up!!!
>=20
> This is the 'Serial Data Input' code for serial port 3 (extra=20
serial port on HV):
>=20
> 		Serial port 3: Put binary value of received serial=20
character # 1 into Result Value
> 		Var  #43 (Test - serial char 1) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 2 into Result Value
> 		Var  #44 (Test - serial char 2) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 3 into Result Value
> 		Var  #45 (Test - serial char 3) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 4 into Result Value
> 		Var  #46 (Test - serial char 4) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 5 into Result Value
> 		Var  #47 (Test - serial char 5) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 6 into Result Value
> 		Var  #48 (Test - serial char 6) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 7 into Result Value
> 		Var  #49 (Tset - serial char 7) =3D Result Value
> 		Serial port 3: Put number of received serial=20
characters into Result Value
> 		Var  #1 (Serial Buffer Size) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 1 into Result 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=20
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=20
through 3 are 'IP'
> 		Then
> 		; Zone sensor activated
> 		; Get zone number - it's in ASCII Hex  format -=20
change to decimal
> 		Var  #4 (Test - Location) =3D 13
> 		Serial port 3: Put binary value of received serial=20
character # 4 into Result Value
> 		Var  #6 (Serial Character 1) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 5 into Result 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=20
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=20
through 7 are '1'
> 		Then
> 		Var  #4 (Test - Location) =3D 16
> 		; Add the offset (10) to the Zone Number to activate=20
the Macro
> 		Var  #9 (Lighting Macro Number) =3D var #8 (Result of=20
HEX-DECIMAL conv.)
> 		Var  #9 (Lighting Macro Number) =3D var #9 (Lighting=20
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=20
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=20
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=20
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=20
actual change)
> 		Serial port 3: Serial input characters number 2=20
through 3 are 'M?'
> 		Or  Serial port 3: Serial input characters number 2=20
through 3 are 'MD'
> 		Then
> 		Serial port 3: Put value of received serial=20
character # 5 into Result Value
> 		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=20
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=20
through 3 are 'C?'
> 		Or  Serial port 3: Serial input characters number 2=20
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=20
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=20
character # 6 into Result Value
> 		Var  #6 (Serial Character 1) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 7 into Result 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=20
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=20
character # 6 into Result Value
> 		Var  #6 (Serial Character 1) =3D Result Value
> 		Serial port 3: Put binary value of received serial=20
character # 7 into Result 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=20
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
>=20
> This is an example of some of the serial commands received and=20
acted upon. The hex to decimal conversion macro is:
>=20
> 		MACRO EVENT # 1 'Hex digits to decimal number'
>=20
> 		; Converts Hex ASCII digits to decimal
> 		Var  #7 (Serial Character 2) =3D var #7 (Serial=20
Character 2)  -  48
> 		If
> 		Var #7 (Serial Character 2) > 9
> 		Then
> 		Var  #7 (Serial Character 2) =3D var #7 (Serial=20
Character 2)  -  7
> 		End If
> 		Var  #6 (Serial Character 1) =3D var #6 (Serial=20
Character 1)  -  48
> 		Var  #6 (Serial Character 1) =3D var #6 (Serial=20
Character 1) =D7 2
> 		Var  #6 (Serial Character 1) =3D var #6 (Serial=20
Character 1) =D7 2
> 		Var  #6 (Serial Character 1) =3D var #6 (Serial=20
Character 1) =D7 2
> 		Var  #6 (Serial Character 1) =3D var #6 (Serial=20
Character 1) =D7 2
> 		Var  #7 (Serial Character 2) =3D var #7 (Serial=20
Character 2)  +  var #6 (Serial Character 1)
> 		Var  #8 (Result of HEX-DECIMAL conv.) =3D var #7=20
(Serial Character 2)
>=20
> The Comfort login macro: (not actually used much as the UCM stays=20
logged in - ACE deals with this anyway)
>=20
>=20
> MACRO EVENT # 0 'Comfort login'
>=20
> 		Var  #5 (Comfort Control Character) =3D 3
> 		Serial port 3 transmit: Variable #5 (Comfort Control=20
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=20
Character) value as 1 binary byte
>=20
> Where 'xxxxxx' is your login code.
>=20
> I also have a macro which is called by any security mode changes -=20
let me know if you want that and I'll send off list (for security=20
reasons obviously!)
>=20
> Paul.
>=20
>=20
>=20
> -----Original Message-----
> From: Mark McCall [mailto:lists@a...]=20
> Sent: 11 November 2003 09:09
> To: ukha_d@xxxxxxx
> Subject: Re: [ukha_d] HomeVision and Comfort users
>=20
> > I then have a Comfort serial UCM talking directly to one of
the=20
serial
> > ports on HV Pro - HV then listens to the serial messages
>=20
> Paul
>=20
> How big a job is it writing the macros to allow HV to decode the=20
serial
> commands coming from Comfort?  Can you cut and paste an example or=20
two?
>=20
> Thanks
>=20
> M.
>=20
>=20
>=20
>=20
> UKHA 2004: 15th and 16th May 2004
>=20
> 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
>=20
> Your use of Yahoo! Groups is subject to=20
http://docs.yahoo.com/info/terms/



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.