[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.

5 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

I had this working perfectly recently (i’m just using it to turn on push notifications when HSM is set to armed away and turn off when set to disarmed), but following firmware updates to my nvr and cameras it seems to have stopped working.

Anyone else having any issues?

I noticed that http and https are both off in my settings. Not sure if this is new and happened after the update or they were off even when it was working. But assumed i need both of these on. Still not working though..

Just came across this post - thanks!

I've got 2 Reolink cameras (RLC-410W and RLC-510WA) and just wanted to do what you're doing -- when HSM is 'armed' - I want the cameras to send motion alerts.

The above HTTP request doesn't work for my cameras. I was able to figure out the request for the RLC-410W by opening Chrome's developer console and looking at the request sent when I disabled push notifications. Here's what I got for anyone with this device:

http://192.168.0.70/api.cgi?cmd=SetPush&user=USER&password=PASS
[
    {
        "cmd": "SetPush",
        "action": 0,
        "param": {
            "Push": {
                "schedule": {
                    "enable": 0,
                    "table": "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
                }
            }
        }
    }
]

It appears that the same request also works for the RLC-510WA even though it has different options in the Reolink UI


On another note - I did notice an 'official' Reolink API?

It'd be really nice if someone ultimately was able to write a Hubitat app/driver that supports Reolink devices. Even just to enable/disable these modes

also there's a REST API doc here

I noticed this one too.. I haven't really tested it out to see if it's actually working or not but hopefully

Hi,
Curious if this works with Reolink POE with 811A or 1212A cameras? I wish to have a combined alarm system with cameras and sensors based on home/away/night mode setup which allows for recording but turns of the notificiation/siren at different times.

Would this still work? Many thanks for any input.