Skip to content
ggodart edited this page Jan 6, 2021 · 1 revision

Stargate

See original

SYNOPSIS

  unless ($unithi = $table_iounit{lc($bytes[2])})
  {
    print "$::Time_Now Error, not a valid Stargate IO base: $code\n";
    next;
  }

  unless ($unitlo = $table_iounit{lc($bytes[3])})
  {
    print "$::Time_Now Error, not a valid Stargate IO base: $code\n";
    next;
  }

  $unitstates = (($unithi * 16) + $unitlo);

  #print "$::Time_Now Digital IO State change base:hi:lo=$base:$unithi:$unitlo:$unitstates\n";

DESCRIPTION

From MisterHouse HomeBase.pm

         I/ODevice         Offset

  TimeCommander-Plus         0x00    1-16
  reserved                   0x01
  IO Xpander -1              0x02    17-32
  IO Xpander -2              0x03    33-48
  IO Xpander -3              0x04    49-64
  IO Xpander -4              0x05    65-80

  DI Xpander-1               0x06
  DI Xpander-2               0x07
  DI Xpander-3               0x08
  DI Xpander-4               0x09

  RO Xpander-1               0x0a
  RO Xpander-2               0x0b
  RO Xpander-3               0x0c
  RO Xpander-4               0x0d

For reference on dealing with bits/bytes/strings:

  print pack('B8', '01101011');   # -> k   To go from bit to string
  print unpack('C', 'k');         # -> 107 To go from string to decimal
  print   pack('C', 107);         # -> k   To go from decimal to srting
  printf("%0.2lx", 107);          # -> 6b  To go to decimal -> hex
  print hex('6b');                # -> 107 to go from hex -> decimal

Examples:

  0x5a -> 90  -> Z
  0xa5 -> 165 -> ~N (tilde over N)
  0xc3 -> 195 -> |-
  0x3c -> 60 -> <

INHERITS

METHODS

Method Description
serial_startup This code create the serial port and registers the callbacks we need
set_time This command was decoded empirically from Starate/WinEVM interaction Homebase (Stargate) command is ##%05AAAALLLLTTSSYYMMDDRRHHMMCC AAAA = Latitude, LLLL = Longitude, TT=Timezone (05=EST) SS="Is daylight savings time used in your area?" (01=Yes) YY=Year, MM=Month, DD=Day, RR=DOW (Seems to be ignored, but set as Th=01, Wen=02, Tu=04, Mo=08, Sun=10, Sat=20) CC=00 (Checksum? doesn't appear to be used)
send_telephone Valid digitis 0-9, * #
OnHook = +
OffHook = ^
Pause = ,
CallerID C
HookFlash !
`

INI PARAMETERS

StargateDigitalInput

SYNOPSIS

DESCRIPTION

INHERITS

Generic_Item

INI PARAMETERS

METHODS

StargateVariable

SYNOPSIS

DESCRIPTION

INI PARAMETERS

INHERITS

Generic_Item

METHODS

StargateFlag

SYNOPSIS

DESCRIPTION

INI PARAMETERS

INHERITS

Generic_Item

METHODS

StargateRelay

SYNOPSIS

DESCRIPTION

None

INHERITS

Generic_Item

INI PARAMETERS

METHODS

StargateThermostat

SYNOPSIS

DESCRIPTION

INHERITS

Generic_Item

INI PARAMETERS

METHODS

StargateTelephone

SYNOPSIS

DESCRIPTION

INHERITS

Telephony_Item

INI PARAMETERS

METHODS

StargateASCII

SYNOPSIS

DESCRIPTION

INHERITS

Generic_Item

INI PARAMETERS

METHODS

StargateVoicemail

SYNOPSIS

DESCRIPTION

INHERITS

Generic_Item

INI PARAMETERS

METHODS

StargateIR

SYNOPSIS

DESCRIPTION

INHERITS

Generic_Item

INI PARAMETERS

METHODS

Clone this wiki locally