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

Update camect_connect-driver.groovy #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
17 changes: 16 additions & 1 deletion Camect/camect_connect-driver.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ metadata {
capability "Sensor"
capability "Initialize"


command "Set_AtHome"
command "Set_NotAtHome"

attribute "camectStatus", "String"
}
}
Expand Down Expand Up @@ -121,6 +123,19 @@ def off() {
sendEvent(name: "switch", value: "off", descriptionText: "Disabling alerts for All Cameras")
}

def Set_AtHome() {
parent.sendCommand('/SetOperationMode', [Mode:"HOME"])
sendEvent(name: "camectStatus", value: "HOME", descriptionText: "Setting Camect to HOME mode")
parent.sendCommand('/GetHomeInfo')

}

def Set_NotAtHome() {
parent.sendCommand('/SetOperationMode', [Mode:"DEFAULT"])
sendEvent(name: "camectStatus", value: "DEFAULT", descriptionText: "Setting Camect to DEFAULT mode")
parent.sendCommand('/GetHomeInfo')
}

void webSocketStatus(String status){
parent.ifDebug "webSocketStatus: ${status}"

Expand Down