Iris V1 Camera

To do that, one would need to understand how to write drivers. That is not part of my current skill set. I am providing the information in case there is someone with the skill and inclination to do so to have some information related to these cameras. I'm not saying they have to be prioritized over any other camera.

Well, they wouldn't have a camera to test with either....so, odds are pretty low. But i guess you can keep your fingers crossed.

Wouldn't the information needed to write a driver for the Iris V1 IP camera would apply to any IP camera?

Since I'm brand new to Hubitat and have half a dozen Iris Cameras (they stunk for me) does Hubitat integrate with any other camera control programs such as Blue Iris or Wyze via IFTTT?

Hubitat integrates with IFTTT, but no camera setups "natively" with their own drivers, some people have wrote their own drivers and have them going, but they're not currently "supported by" Hubitat since they aren't natively created by Hubitat.

I had not heard of anyone writing drivers for them. I'll have to do more searching.

Here is one thread about them. [RELEASE] BI Control - Local Blue Iris control

1 Like

That looks like it is a way to integrate Blue Iris control, not to control IP cameras directly. BI is a Windows program and I run Linux. BI is out.

1 Like

Take a look at Motioneye or motion. Basically the same thing except for Linux and Free.

Hi,
I have two Iris V1 indoor cameras (Sercomm RC8221). With Iris, I used them as motion sensors as much as anything else. Finally under Hubitat, I was able to get them to control lights based on their motion detection. I'll describe it here. It is a bit.... well lets just say Rube Goldberg would be proud.
So for starters, go here: How to Take Total Control of your Iris Cameras with the API - Questions/Help - Living withOUT Iris Forum

and follow the instructions to get the camera into a factory reset state. This will allow you to talk to the camera and get and set its configuration.

If you were able to change the settings such as the username/password, and get the camera on wifi, the rest is relatively easy.

Lets move to the Hubitat side. You will need to create a virtual motion detector. So install this Driver Code:

and make a Virtual Device:
Name: Camera Motion Sensor
Label: The-Room-It's-In Camera
Type: Virtual Motion with Switch

Use the Rule Maker to make a trigger such as "Camera Motion Detected" Use a Motion type trigger event for your The-Room-It's-In Camera with the value of active. Set it to turn on a light, or something simple that you can easily test.

Go to the device page for your The-Room-It's-In Camera, and click the "on" panel. This should turn on the light.

Install the MakerAPI App Built-In App. In the MakerAPI, you probably only need Local IP address access if the camera is on the same network as the hub. Scroll down and select your The-Room-It's-In Camera. Click the " Get All Devices with Full Details" link and you should see a page of JSON code with info all about your new device. The important parts are the ID and the Commands.

Back on the MakerAPI page, you can scroll down to the last piece of info on how to Send Device Command:
http://[your-hub-ip-address]/apps/api/[MakerAPI-id]/devices/[Device ID]/[Command]/[Secondary value]?access_token=asdf-...

You will fill in the blanks to look something like this:
http://[your-hub-ip-address]/apps/api/[MakerAPI-id]/devices/197/on?access_token=asdf-...

Paste this into a browser, and it should turn your light on just like clicking the "on" panel on the device page. In fact, if you watch the camera's device page you can see the motion state change from inactive to active.

Finally back to the camera. We need to tell the camera to make that http GET when it sees motion. So run this:
http://[your-camera-ip]/adm/get_group.cgi?group=HTTP_NOTIFY
you should see:
[HTTP_NOTIFY]
http_notify=0
http_url=
http_proxy=
http_proxy_no=80
http_method=1
http_user=
http_password=
proxy_user=
proxy_password=
event_data_flag=0

We will turn on the notifications and tell it where:
http://[your-camera-ip]/adm/set_group.cgi?group=HTTP_NOTIFY&http_url=http://[your-hub-ip-address]/apps/api/[MakerAPI-id]/devices/197/on?access_token=asdf-...

and
http://[your-camera-ip]/adm/set_group.cgi?group=HTTP_NOTIFY&http_notify=1

We need to tell the camera to make the call on motion. So looking at the EVENT info:
http://[your-camera-ip]/adm/get_group.cgi?group=EVENT

We want to change some values to:
event_trigger=1
event_interval=0 (this sets continuous detection. set to 1 for detections 1 minute apart minimum)
event_schedule=0
event_mt=email:0;ftpu:0;op1:0;httpn:1;smbc:0;sd:0
event_pir=email:0;ftpu:0;op1:0;httpn:1;smbc:0;sd:0

On the MOTION page:
http://[your-camera-ip]/adm/get_group.cgi?group=MOTION
be sure:
md_mode=1
md_switch1=1

On the SYSTEM page, I have:
pir_mode=1
pir_mot_mode=1
pir_mot_timer=1

but not entirely clear about that.
The camera has a log here:
http://[your-camera-ip]/adm/log.cgi

That you can look at (you need to refresh it yourself). If you put your hand in front of the camera you should see:
Alert: PIR & Motion Detection (bundle) triggered.
or
Alert: Detected motion.

depending if you have pir_mode=1 or pir_mode=0 under SYSTEM.And if your HTTP_NOTIFY is set correctly you will see:

HTTP-NOTIFY:Send notification successfully.

So with all that, you should be able to turn on the lights by waving your arms! Progress!
See comment 23 from Ryan780 below about changes to the driver you might want to make regarding on and off timing.

Apparently, the camera will make a video and email it to you if you are nice to it, but I'm not there yet. I think I need an SD card, for starters. I'll let you know if I get that working.

If you have an easier way to do this, please do tell.

2 Likes

Does the camera also have the capability to send an HTTP call when motion ends?

Ryan,
As far as I can tell, there is no motion end, and no motion end HTTP call. Motion just times out. There is a setting "event_interval" in the camera that sets the amount of time until motion can be detected again (in minutes).

So if you have a light that you want on only while motion is happening, I suppose you could set the "event_interval" for 1 minute, and set your light to shut off after 1.2 minutes unless another motion detect comes in (or something like that).

Or if your HTTP call needs to go somewhere other than the HE hub, you could have the HE hub make the call after a delay of 1.2 minutes if not postponed by another motion detect.

See the problem is your driver is set to turn off after 3 seconds. So, motion will go inactive after 3 seconds. So, you would want to do this with the driver:

def on() {
    sendEvent(name: "motion", value: "active")
    sendEvent(name: "switch", value: "on")
    unschedule()
    runIn(80, off)
}

note: assuming a 1 min timeout.

This would allow the motion to go Inactive after the camera stops detecting motion. You need the unschedule command otherwise it will still turn off after 80 seconds. The device can receive multiple On commands from the maker API even if it is already on. It doesn't have to be off. This would keep the motion sensor active as long as the camera detected motion.

I see. Thank you for that. I just went and found a driver that would work for me. I have an action that turns on a light for 5 minutes, so it didn't matter that the driver went back to off after 3 seconds in my case. I haven't tried setting the "event_interval" to 0. I will update my post.

By the way, my cameras sometimes drop off the WIFI and need to be restarted. I set up a driver that HTTP calls the camera that I have triggered every 2 minutes. The plan is to keep a global variable, and after 6 or so unsuccessful calls, it will cycle a smartplug to reboot the camera. Do you know of a "heartbeat" type driver or app for that kind of thing? I don't mind rolling my own, but there may be something out there with all the bugs ironed out already.

There is one for Raspberry Pi status. I'm sure it could be simplified to do what you are asking. But you'd need a RM rule to react to this device since devices can't interact with each other, only with themselves.

Is there a way to reboot the camera via HTTP call rather than pulling the power? Most will have a command somewhere in the menu's for "reboot". If you can find that, it would be easy to add into the virtual motion driver.

Yes, there is (/adm/reboot.cgi), but you have to be able to reach the camera. In this case, the camera has dropped off wifi completely.

DUH! Of course. And it doesn't automatically try to reconnect itself? Have you ever waited to see if it does?

Sometimes it does, sometimes not (at least not in the 30 minutes or so I waited). Even if it did eventually come back, a security camera that may or may not be online when it is needed is not much of a security camera.

I'm off to the store to buy a microsd card to see if the camera will record something and email it to me as the spec suggests. Not exactly HE integration, but enough for now. It is supposed to have FTP and SAMBA on it also, so I'll see if I can put the vids on another machine. I'll post my results here.

1 Like

Just a final note about the camera. With a microSD in place, the camera will take a 10 second video for each motion detected and place it on the memory card. It will also email it to you if you have an email server that has low authentication standards.

The camera seems to have no problem sending to a linux based Samba server (I was able to write to a Raspberry Pi running HassOS and Samba) . I have yet to make a Samba transfer to a Windows (10 or 8) Samba server. It would give an authentication failure, or simply failure to write.

That's all I have to say about that.