Skip to content
ggodart edited this page Jan 1, 2021 · 2 revisions

DOORBIRD

See original

DESCRIPTION

Module for interfacing with the Doorbird line of IP Doorbells. Monitors events sent by the doorbell such as doorbell button push, motion, built in door relay trigger.

CONFIGURATION

At minimum, you must define the Interface and one of the following objects DOORBIRD_Bell, DOORBIRD_Motion, or DOORBIRD_Relay. This allows for the display of these objects as separate items in the MisterHouse interface and allows users to interact directly with these objects using the basic Generic_Item functions such as tie_event.

The DOORBIRD_Bell and DOORBIRD_Motion objects are for tracking the state of the doorbell bell button and the doorbell built in motion detector and are not for controlling the doorbell from MisterHouse.

The DOORBIRD_Relay object is for tracking the state of the built-in "door relay" in the doorbell and to control the door relay and the doorbell IR light. The relay is a standard dry contact relay that could be used for any purpose.

MisterHouse receives the states of each object from the doorbell by configuring the doorbell to send an HTTP get to MisterHouse when an action is realized, this method allows MisterHouse to track the states even when they have been triggered by the android app. The configuration of the doorbell happens when MisterHouse is started, so the doorbell must be On and accessible by MisterHouse when MisterHouse is started.

Interface Configuration

INI PARAMETERS

In order to allow for multiple doorbells, instance names are used. the following are prefixed with the instance name (DOORBIRD).

# The IP of the misterhouse server: 
DOORBIRD_mh_ip=192.168.1.10
# The port of the misterhouse server web: 
DOORBIRD_mh_port=8080
# The IP of the doorbell: 
DOORBIRD_doorbell_ip=192.168.1.50
# The username for the doorbell: 
DOORBIRD_user=doorbirduser
# The password for the doorbell: 
DOORBIRD_password=doorbirdpass

Defining the Interface Object

In addition to the above configuration, you must also define the interface object. The object can be defined in the user code.

In user code:

# $DOORBIRD = new DOORBIRD(INSTANCE);
$DOORBIRD = new DOORBIRD('DOORBIRD')
# Bell Object
#  $DOORBIRD_Bell = new DOORBIRD_Bell(INSTANCE, ENABLECONFIG);
$DOORBIRD_Bell = new DOORBIRD_Bell('DOORBIRD', 1);         # States: ON OFF
# Motion Object
# $DOORBIRD_Motion = new DOORBIRD_Motion(INSTANCE, ENABLECONFIG);        
$DOORBIRD_Motion = new DOORBIRD_Motion('DOORBIRD', 1);     # States: ON OFF
# Relay Object
#$DOORBIRD_Relay = new DOORBIRD_Relay(INSTANCE, ENABLECONFIG);
$DOORBIRD_Relay = new DOORBIRD_Relay('DOORBIRD', 1);        # States: ON OFF

Control States: TOGGLE (to trigger the relay) LIGHT_ON (to enable the IR light on the door bell)

NOTES

An example mh.private.ini:

DOORBIRD_mh_ip=192.168.1.10
DOORBIRD_mh_port=8080
DOORBIRD_doorbell_ip=192.168.1.50
DOORBIRD_user=doorbirduser
DOORBIRD_password=doorbirdpass

An example user code:

        #noloop=start
        use DOORBIRD;
        $DOORBIRD = new DOORBIRD('DOORBIRD');
        $DOORBIRD_Bell = new DOORBIRD_Bell('DOORBIRD', 1);
        $DOORBIRD_Motion = new DOORBIRD_Motion('DOORBIRD', 1);
        $DOORBIRD_Relay = new DOORBIRD_Relay('DOORBIRD', 1);
        #noloop=stop

        if ($state = state_changed $DOORBIRD_Motion) {
         run_voice_cmd 'start cam 8' if ($state eq 'on');
         run_voice_cmd 'stop cam 8' if ($state eq 'off');
        }

INHERITS

Generic_Item

METHODS

Method Description
register() Used to associate child objects with the interface.

DOORBIRD_Bell

SYNOPSIS

User code:

# $DOORBIRD_Bell = new DOORBIRD_Bell(INSTANCE, ENABLECONFIG);
$DOORBIRD_Bell = new DOORBIRD_Bell('DOORBIRD', 1);

See new() for a more detailed description of the arguments.

DESCRIPTION

Tracks doorbell button pushes in MisterHouse.

INHERITS

Generic_Item

METHODS

Method Description
new($doorbell, $config ) Instantiates a new object.
$doorbell = The DOORBIRD of the doorbell that this zone is found on
$config = If you want this module to configure the DOORBIRD doorbell to post updates to MisterHouse, then this value should be a 1, else 0. If you disable auto configure (0), you must manually configure the doorbell using the API with the MisterHouse URL you want the doorbell to post to.

DOORBIRD_Motion

SYNOPSIS

User code:

# $DOORBIRD_Motion = new DOORBIRD_Motion(INSTANCE, ENABLECONFIG);
$DOORBIRD_Motion = new DOORBIRD_Motion('DOORBIRD', 1);    # States: ON  OFF

See new() for a more detailed description of the arguments.

DESCRIPTION

Tracks doorbell motion in MisterHouse.

INHERITS

Generic_Item

METHODS

Method Description
new( $doorbell, $config ) Instantiates a new object.
$doorbell = The DOORBIRD doorbell that this motion sensor is found on
$config = If you want this module to configure the DOORBIRD doorbell to post updates to MisterHouse, then this value should be a 1, else 0. If you disable auto configure (0), you must manually configure the doorbell using the API with the MisterHouse URL you want the doorbell to post to.

DOORBIRD_Relay

SYNOPSIS

User code:

# $DOORBIRD_Relay = new DOORBIRD_Relay(INSTANCE, ENABLECONFIG);   # States: ON OFF
$DOORBIRD_Relay = new DOORBIRD_Relay('DOORBIRD', 1);

Wherein the format for the definition is:

  Control States:
  TOGGLE (to trigger the relay)
  LIGHT_ON  (to enable the IR light on the door bell)

See new() for a more detailed description of the arguments.

DESCRIPTION

Tracks/controls doorbell relay in MisterHouse.

INHERITS

Generic_Item

METHODS

Method Description
new( $doorbell, $config ) Instantiates a new object.
$doorbell = The DOORBIRD doorbell that this door relay is found on
$config = If you want this module to configure the DOORBIRD doorbell to post updates to MisterHouse, then this value should be a 1, else 0. If you disable auto configure (0), you must manually configure the doorbell using the API with the MisterHouse URL you want the doorbell to post to.

INI PARAMETERS

None

NOTES

AUTHOR

Wayne Gatlin [email protected]

SEE ALSO

Clone this wiki locally