Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insteon: Add Initial Support for Linking i2cs Devices in MH #213

Merged
merged 1 commit into from
Jun 8, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions lib/Insteon/BaseInsteon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,33 @@ sub unlink_to_interface
}
}

=item C<enter_linking_mode(group)>

BETA -- Can be used to create the initial link with i2cs devices. i1 devices
will not respond to this command. In the future, this will be incorporated into a
one-step process -- BETA

Places the object into linking mode as if you had held down the set button on
the device. To create a link wherein the PLM is the controller, first run the
PLM voice command "initiate link as controller". Then run this command. Finally,
run the voice command "scan link table" on this device.

The group argument is optional and not needed for group 01.

Returns: nothing

=cut

sub enter_linking_mode
{
my ($self,$p_group) = @_;
my $group = $p_group;
$group = '01' unless $group;
my $extra = sprintf("%02x", $group);
$extra .= '0' x (30 - length $extra);
my $message = new Insteon::InsteonMessage('insteon_ext_send', $self, 'linking_mode', $extra);
$self->_send_cmd($message);
}

sub _aldb
{
Expand Down