[How to] Manage Reolink camera recording, siren, spotlight, push notifications with Rule Machine

This is tested and working with a Reolink 811A running latest firmware. I use these cameras at my cabin where there is no set schedule and I don't want recordings, sirens, auto spotlight, etc triggering while I am there... only when I am away. I now have it setup such that these things all get enabled when in Away mode, and disabled when not in Away mode.

  1. Enable HTTP on the camera. You can do this under Settings/Ports. Also, you should configure all the parameters for these features in the app (ie. recording Mask, Types of detection to trigger on, etc. as all we do is enable/disable the features, not configure the specific parameters.

  2. If your admin user's password has any non alpha-numeric characters, you will need to either change it, or add another admin user that has only alpha-numeric password as the API does not seem to work otherwise.

  3. Create a Virtual Switch (call it something like 'Camera Armed').

  4. Create a Rule machine that triggers on your virtual switch changing.

  5. Add a conditional
    a. Type (IF-Then)
    b. Capability Switch (Select your Virtual Switch)
    c. State: Switch is off
    d. Click Done with Condition
    e. Add Action Type "Send, Speak or Log Message, Send HTTP Request"
    f. Set "Which Type of Action" to Send HTTP Post
    g. Set Content Type to JSON
    h. Set Enter URL to Send Request to: "http://192.168.x.x/api.cgi?cmd=SetPushV20&user=[USERNAME]&password=[PASSWORD]" (Where ip is of course your Camera's IP.
    i. Enter Body for Post

[
  {
    "cmd": "SetPushV20",
        "param": {
            "Push": {
                "enable": 0
            }
        }
  },
  {
	"cmd": "SetAudioAlarmV20",
	    "param": {
	        "Audio": {
	 	    "enable": 0
		}
     	    }
 },
 {
	"cmd": "SetWhiteLed",
		"param": {
		    "WhiteLed": {
		    "channel": 0,
		    "mode": 0
		}
	} 
 },
{
	"cmd": "SetRecV20",
	"param": {
		"Rec": {
			"channel": 0,
			"enable": 0
		}
	}
}
]

j. Click Done with Action
k. Click to add ELSE
l. Add Action Type "Send, Speak or Log Message, Send HTTP Request"
m. Set "Which Type of Action" to Send HTTP Post
n. Set Content Type to JSON
o. Set Enter URL to Send Request to: "http://192.168.x.x/api.cgi?cmd=SetPushV20&user=[USERNAME]&password=[PASSWORD]" (Where ip is of course your Camera's IP.
p. Enter Body for Post

[
  {
    "cmd": "SetPushV20",
        "param": {
            "Push": {
                "enable": 1
            }
        }
  },
  {
	"cmd": "SetAudioAlarmV20",
	    "param": {
	        "Audio": {
	 	    "enable": 1
		}
     	    }
 },
 {
	"cmd": "SetWhiteLed",
		"param": {
		    "WhiteLed": {
		    "channel": 0,
		    "mode": 1
		}
	} 
 },
{
	"cmd": "SetRecV20",
	"param": {
		"Rec": {
			"channel": 0,
			"enable": 1
		}
	}
}
]
  1. You can now add steps to toggle the virtual switch as appropriate in your Away/Not Away routines.

NOTE: While the settings for Siren, Recording, and Spotlight will all be properly reflected in the App and/or web interface for the camera, PUSH notifications will always show Enabled. Despite this quirk, it does do the right thing.

4 Likes

I realize that came out a bit muddy. I wasn't sure where to draw the line between providing guidelines vs walkthrough. I ended up with some convoluted in-between. Hopefully there is enough that you can figure it out. Feel free to ask for clarification if needed. Sure would be nice if there were a way to share rules as templates or something. :thinking:

1 Like

Hi @josh208
Thanks for sharing this, I have newer Reolink cameras and I'm impressed with their person detection capabilities. Security is a real issue where I live, so looking to use the push notifications from the camera to turn on some exterior lights and trigger some other security events. I understand that your instructions above send instructions from Hubitat to the camera, not the other way around - correct?

1 Like

That is correct. The instructions are simply to allow Hubitat to enable/disable notifications/siren/spotlight on the camera.

1 Like

Download the Hubitat app