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

Recording Mode Update Required #10

Closed
rehpa opened this issue Jul 8, 2022 · 1 comment
Closed

Recording Mode Update Required #10

rehpa opened this issue Jul 8, 2022 · 1 comment

Comments

@rehpa
Copy link

rehpa commented Jul 8, 2022

I have a new Hubitat setup and I've been testing this driver you have here. Enjoying it so far, but I found one issue I wanted to share. With my setup I have to change one of the Recording Mode values in the unifiProtectCamera driver for it to work correctly. Without this change you are unable to set the mode back to "detections".

The word "motion" in this function does not work in my setup, it must be changed to "detections". Maybe you could just add that value to the array if "motion" is still valid in other use cases.

`def setRecordingMode(mode)
{
if(!(["always", "motion", "never"].contains(mode)))
{
log.debug "unsupported recording mode (${mode})"
return
}

try
{
    getParent()?.httpExecWithAuthCheck("PATCH", parent?.genParamsMain(getCameraBaseUrl(), new groovy.json.JsonOutput().toJson([recordingSettings: [mode: mode]])), true)
}
catch (Exception e)
{
    log.debug "setRecordingMode() failed: ${e.message}"
}

}`

My current setup where this change is required
CloudKey Gen2
Unifi OS: 2.4.10
Network: 7.1.66
Protect: 2.0.1

Thank you for taking the time to build and share this driver with the community!

@tomwpublic
Copy link
Owner

tomwpublic commented Jul 8, 2022

Good catch -- I made a change to add "detections" and also left "motion" as supported, since that name worked on older versions.

2e37b25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants