Controller.pm


Insteon::RemoteLinc

SYNOPSIS

Configuration:

Depending on your device and your settings, your remote may offer 1, 4, or 8 groups. Your configuration should vary depeninding on you remote style.

In user code:

   use Insteon::RemoteLinc;
   $remote_1 = new Insteon::RemoteLinc('12.34.56:01',$myPLM);
   $remote_2 = new Insteon::RemoteLinc('12.34.56:02',$myPLM);
   $remote_3 = new Insteon::RemoteLinc('12.34.56:03',$myPLM);
   $remote_4 = new Insteon::RemoteLinc('12.34.56:04',$myPLM);

In items.mht:

   INSTEON_REMOTELINC, 12.34.56:01, remote_1, remote_group
   INSTEON_REMOTELINC, 12.34.56:02, remote_2, remote_group
   INSTEON_REMOTELINC, 12.34.56:03, remote_3, remote_group
   INSTEON_REMOTELINC, 12.34.56:04, remote_4, remote_group

DESCRIPTION

Provides basic support for Insteon RemoteLinc models 1 and 2. Basic support includes, linking and receiving set commands from the device. More advanced support is offered for RemoteLinc 2 in the form of battery level notifications.

MisterHouse is only able to communicate with a RemoteLinc when it is in "awake mode." The device is in "awake mode" while in its linking state. To put the RemoteLinc into "awake mode", follow the instructions for placing the device into linking mode. In short, the instructions are to hold down the set button for 4-10 seconds until you hear a beep and see the light flash. The RemoteLinc will now remain in "awake mode" for approximately 4 minutes.

To scan the link table, sync links, or set settings on the device, the RemoteLinc must first be put into "awake mode."

INHERITS

Insteon::BaseDevice, Insteon::DeviceController, Insteon::Insteon::MultigroupDevice

METHODS

new()

Instantiates a new object.

set_awake_time([0-255 seconds])

Only available for RemoteLinc 2 models.

Sets the amount of time, in seconds, that the RemoteLinc will remain "awake" after sending a command. MH uses the awake time to send battery level requests to the device. If the device is not responding to the battery level requests, consider increasing this value. However, keep in mind that a longer awake time will result in more battery usage.

The factory setting is 4 seconds, 10 seconds seems to work well with MisterHouse without causing adverse battery drain.

get_extended_info()

Only available for RemoteLinc 2 models.

Requests the status of various settings on the device. Currently this is only used to obtain the battery level. If the device is awake, the battery level will be printed to the log.

You likely do not need to directly call this message, rather MisterHouse will issue this request when it sees activity from the device and the set_battery_timer() has expired.

set_battery_timer([minutes])

Only available for RemoteLinc 2 models.

Sets the minimum amount of time between battery level requests. When this time expires, Misterhouse will request the battery level from the device the next time MisterHouse sees activity from the device. Misterhouse will continue to request the battery level until it gets a response from the device.

Setting to 0 will disable automatic battery level requests. 1440 equals a day.

This setting will be saved between MisterHouse reboots.

_is_battery_time_expired()

Returns true if the battery timer has expired, else returns false.

_process_message()

Checks for and handles unique RemoteLinc messages such as battery voltage messages. All other messages are transferred to Insteon::BaseObject::_process_message().

Also checks the battery timer and sends a battery request if needed.

get_voice_cmds

Returns a hash of voice commands where the key is the voice command name and the value is the perl code to run when the voice command name is called.

Higher classes which inherit this object may add to this list of voice commands by redefining this routine while inheriting this routine using the SUPER function.

This routine is called by the Insteon::generate_voice_commands manpage to generate the necessary voice commands.

AUTHOR

Gregg Liming / gregg@limings.net, Kevin Robert Keegan

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.


Insteon::RemoteLinc_Battery

SYNOPSIS

Configuration:

Currently the object can only be defined in the user code.

In user code:

   use Insteon::RemoteLinc_Battery;
   $remote_battery = new Insteon::RemoteLinc_Battery($remote);

Where $remote is the RemoteLinc device you wish to monitor.

DESCRIPTION

This basic class creates a simple object that displays the current battery voltage as its state. This is helpful if you want to be able to view the battery level through a web page. Battery level tracking is likely only available on RemoteLinc 2 devices.

This object's state will be updated based on interval defined for set_battery_timer() in the parent Insteon::RemoteLinc object.

Once created, you can tie_events directly to this object, for example to alert you when the battery is low.

INHERITS

Generic_Item

METHODS

new()

Instantiates a new object.

set_receive()

Receives voltage messages from the parent object and sets the state of this device accordingly.

AUTHOR

Kevin Robert Keegan

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

 Controller.pm