Master Control Panel

This runs in a Windows Azure Web Role and acts as the main logic for the security system. All of the code to run this part of the security system is completed but this documentation is here to explain what the function of the Master Control Panel is.

The master control panel has several functions in the home security system.

Since this is the main brain of the system there can be only one Master Control Panel in the system.

Messages

The following MQTT messages will be published from this service.

AddressDataDescription
/house1/externaldoor/front/doorbell pushed Someone clicked on the front door bell indicator on the Master Control Panel UI. This simulates that the front doorbell was pushed.
/house1/externaldoor/back/doorbell pushed Someone clicked on the back door bell indicator on the Master Control Panel UI. This simulates that the back doorbell was pushed.
/house1/externaldoor/side/doorbell pushed Someone clicked on the side door bell indicator on the Master Control Panel UI. This simulates that the side doorbell was pushed.
/house1/externaldoor/front/setlock lock/unlock The master control panel has determined that the front door should be unlocked or locked so this message is sent to the device. Someone clicked on the front locked indicator on the Master Control Panel UI. This simulates that the front door should be locked or unlocked.
/house1/externaldoor/back/setlock lock/unlock The master control panel has determined that the back door should be unlocked or locked so this message is sent to the device. Someone clicked on the back locked indicator on the Master Control Panel UI. This simulates that the back door should be locked or unlocked.
/house1/externaldoor/side/setlock lock/unlock The master control panel has determined that the side door should be unlocked or locked so this message is sent to the device. Someone clicked on the side locked indicator on the Master Control Panel UI. This simulates that the side door should be locked or unlocked.
/house1/alarmpanel/mastercontrol/code 01 A code of 01 was entered on the master control panel text box.
/house1/externaldoor/front/codevalid true/false The master control panel has determined the code that was sent from the device is valid or invalid and this message is sent to the device indicating that.
/house1/externaldoor/back/codevalid true/false The master control panel has determined the code that was sent from the device is valid or invalid and this message is sent to the device indicating that.
/house1/externaldoor/side/codevalid true/false The master control panel has determined the code that was sent from the device is valid or invalid and this message is sent to the device indicating that.
/house1/alarmpanel/masterbedroom/burglar on/off The master control panel has determined the alarm horn should change state and this message is sent to the master bedroom.
/house1/alarmpanel/bedroom1/burglar on/off The master control panel has determined the alarm horn should change state and this message is sent to the bedroom 1.
/house1/alarmpanel/bedroom2/burglar on/off The master control panel has determined the alarm horn should change state and this message is sent to the bedroom 2.
/house1/alarmpanel/firstfloor/burglar on/off The master control panel has determined the alarm horn should change state and this message is sent to the first floor.
/house1/alarmpanel/mastercontrol/alarmstate sleep/away A user is attempting to change the state of the alarm on the master control panel and this message is sent.
/house1/alarmpanel/firstfloor/alarmstatevalid true/false A user was attempting to change the state of the alarm on the first floor control panel and this message is sent out stating if that state change is allowed to occur or not.
/house1/alarmpanel/masterbedroom/alarmstatevalid true/false A user was attempting to change the state of the alarm on the master bedroom control panel and this message is sent out stating if that state change is allowed to occur or not.
/house1/alarmpanel/bedroom1/alarmstatevalid true/false A user was attempting to change the state of the alarm on the bedroom 1 control panel and this message is sent out stating if that state change is allowed to occur or not.
/house1/alarmpanel/bedroom2/alarmstatevalid true/false A user was attempting to change the state of the alarm on the bedroom 2 control panel and this message is sent out stating if that state change is allowed to occur or not.

This service should subscribe to the following MQTT messages.

AddressDataDescription
/house1/+/+/ping the message that was received by the broker A device has sent a ping request and the master control panel will send a pingresp command back to the device
/house1/externaldoor/+/doorbell pushed A device has sent a message that the doorbell was pushed. So turn on the UI indicator that shows what doorbell was pushed for 3 seconds and then turn it off
/house1/externaldoor/+/lock locked/unlocked A device has sent a message that the door was locked or unlocked. So turn on the UI indicator that shows what door was locked or unlocked.
/house1/externaldoor/+/door opened/closed A device has sent a message that the door was opened or closed. So turn on the UI indicator that shows what door was opened or closed. Also check the state of the security system to determine if the alarm should go off or not.
/house1/externaldoor/+/code 01 A device has sent a message that the user entered in a code of 01 on the keyboard. So run through some logic and determine if the alarm should be disarmed or a door needs to be unlocked.
/house1/alarmpanel/+/window opened/closed A device has sent a message that the window was opened or closed. So turn on the UI indicator that shows what window was opened or closed. Also check the state of the security system to determine if the alarm should go off or not.
/house1/alarmpanel/+/motion opened/closed A device has sent a message that the motion detector was opened or closed. So turn on the UI indicator that shows what motion detector was opened or closed. Also check the state of the security system to determine if the alarm should go off or not.
/house1/alarmpanel/+/alarmstate sleep/away A user is attempting to change the state of the alarm on one of the control panels. The master control panel must determine if the alarm state can change and send out a setalarmstate message if the state is allowed to change.
/house1/alarmpanel/+/setalarmstate sleep/away Set the Alarm state indicators on the UI to show the new state of the alarm.