[RELEASE] Amcrest IPM-721 & IP2M-841 LIVE Video/PTZ/Night Vision/Motion/Video Record/+More IP Camera DTH

Unless you want to connect an Open/Close sensor that has accessible contacts to be triggered by the camera’s alarm setting to communicate to ST (or some similar 3rd piece of hardware), this is not possible as far as I know.

I agree with your sentiments about ST and the Amcrest cameras. :smile:

Thanks for the quick response!

Oh and I was thinking it might be possible to have email sent from camera on motion and then use ifttt or something to then trigger ST.

Yes, that is certainly possible. I have all of my cameras set to send emails on motion when armed using ST routines. It works quite well. I can see using IFTTT as you propose, but I would imagine there might be a bit of a delay.

I can’t seem for the life of me to get live video working. PTZ controls work and I can take a snapshot but live video never comes up.

I was trying to use the substream (channel 1 I think) as I have set this to much lower quality.

In the log I see this:

/cgi-bin/mjpg/video.cgi?channel=0&subtype=0

It seems the channel 0 is hard coded? Also if I append that URL to my camera IP/port the browser never comes up with anything.

What am I missing here?

I have a IP2M-841W

The channel 0 should be fine for MJPEG. Channel 1 is used for RTSP. Which protocol are you trying to use?

Are you accessing the camera locally or through a name server (DDNS)?

Can you successfully view the video stream using the Amcrest Web View tool?

For remote view am I suppose to use DDNS (name.Amcrestddns.com) or 192.168.1.XXX?

I have no issues with Amcrest remote app using DDNS.

If you are using a local IP (192.168…) then you should have no issues streaming video as all of the ports are available locally.

If you use DDNS then you also have to setup port forwarding in your router to make sure the inbound traffic is sent to the correct camera.

Said another way, if your camera is using a static IP of 192.168.1.100 then the PTZ functions and MJPEG streaming would be accessed using an address of “http://192.168.1.100:80/…” and for RTSP it would be “rtsp://192.168.1.100:554/…”.

For the same camera using DDNS and an external port of 8088 it would be “http://mycameraname.com:8088/…” and you would configure your router to use Port Forwarding for inbound TCP/UDP traffic for port 8088 to point to the camera found at 192.168.1.100.

I hope that helps.

NOTE:

I hard-coded the RTSP port to be 554 for RTSP, so you may have issues with more than 1 camera using DDNS for video streaming. The MJPEG protocol uses the same port as the PTZ functions.

I didn’t realize the channel wasn’t for main stream /sub stream. I have set it to channel - and changed the subtype to 1 and it appears to be working now. It doesn’t seem to like the main stream which I have set for HQ video for pics/vid on motion so not sure ST likes that.

Hello guys. I have installed the device handler to access IPM 721 on ST but anytime I try to pan/tilt or use a preset the live feed stops I have to restart it again. Anyone having the same issue? Can someone help me?

Thanks

I am glad to see that you have it working now @jjslegacy, enjoy!

1 Like

@idioffo89, using the PTZ functions interrupts the ST stream. I believe this is outside of my control.

Okay thanks for the infos I thought I was doing something wrong. Quick question @Belgarion, where does the snapshots taken from smartthings get saved?

You are welcome @idioffo89.

The snapshots are save in the ST cloud, but you can download them to your phone or share them as an MMS.

Okay great, is there anyway to delete them and is there a limit on the number of snapshots @belgarion. Thanks for your help and sorry for the multiple questions

The ST cloud is a closed system so the limits are unknown (to me) and deletion could be done with code (I believe), but I do not see a reason to… yet.

You could have the cameras send a snapshot to your email address on alarm events, which is what I do.

Would this camera work with this DH?

Model number is IPM-HX1B

@Belgarion Thanks for this DTH. I tried installing the same and I think followed the steps, however I get the Error on the SmartThings mobile add “Camera cannot be found. We are trying to connect”.

Appreciate your advice…

I turned the debug on and below is snippet from the live logging :

99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: error grails.validation.ValidationException: Validation Error(s) occurred during save():
- Field error in object ‘physicalgraph.device.Device’ on field ‘deviceNetworkId’: rejected value [0A000010:0FCB]; codes [physicalgraph.device.Device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.error.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique.error,device.deviceNetworkId.unique.error.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.error.deviceNetworkId,device.deviceNetworkId.unique.error.java.lang.String,device.deviceNetworkId.unique.error,physicalgraph.device.Device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.deviceNetworkId,physicalgraph.device.Device.deviceNetworkId.unique.java.lang.String,physicalgraph.device.Device.deviceNetworkId.unique,device.deviceNetworkId.unique.physicalgraph.device.Device.deviceNetworkId,device.deviceNetworkId.unique.deviceNetworkId,device.deviceNetworkId.unique.java.lang.String,device.deviceNetworkId.unique,unique.physicalgraph.device.Device.deviceNetworkId,unique.deviceNetworkId,unique.java.lang.String,unique]; arguments [deviceNetworkId,class physicalgraph.device.Device,0A000010:0FCB]; default message [{0} must be unique]
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGet -> hubAction = GET /cgi-bin/snapshot.cgi HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 10.0.0.16:4043
Authorization: Basic U2tpcHBlckE6U2tpcHBlckEh

99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug convertPortToHex -> Port passed in is 4043 and the converted hex code is 0fcb
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGet -> headers = [‘HOST’:10.0.0.16:4043, ‘Authorization’:‘Basic U2tpcHBlckE6U2tpcHBlckEh’]
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGet -> Using IP ‘10.0.0.16’
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGet -> Network Device Id = 0A000010:0FCB
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug convertIPtoHex -> IP address passed in is 10.0.0.16 and the converted hex code is 0a000010
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGet -> apiCommand = /cgi-bin/snapshot.cgi (size = 21)
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGet -> BEGIN
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug ipIsLocal -> Found = 00001010
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGetImage -> Local IP detected: Switching to HubAction
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug ipIsLocal -> Host IP ‘10.0.0.16’ is Local
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug convertIPtoBinary -> IP address passed in is 10.0.0.16 and the converted binary is 00001010000000000000000000010000
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGetImage -> Using IP ‘10.0.0.16’
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug apiCommand = /cgi-bin/snapshot.cgi
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: debug hubGetImage -> BEGIN
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:23 PM: info Taking Photo
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:01 PM: debug ipIsLocal -> Host IP ‘10.0.0.16’ is Local
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:01 PM: debug ipIsLocal -> Found = 00001010
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:01 PM: debug convertIPtoBinary -> IP address passed in is 10.0.0.16 and the converted binary is 00001010000000000000000000010000
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:01 PM: debug videoStart -> Streaming MJPEG video; apiCommand = /cgi-bin/mjpg/video.cgi?channel=0&subtype=0, IP = 10.0.0.16, Port = 4043
99f80bb8-ab00-4b27-9b33-318aff97b443 2:36:01 PM: info videoStart -> Turning Video Streaming ON
99f80bb8-ab00-4b27-9b33-318aff97b443 2:35:55 PM: debug configure -> Executing
99f80bb8-ab00-4b27-9b33-318aff97b443 2:35:55 PM: debug ‘updated()’ called…
99f80bb8-ab00-4b27-9b33-318aff97b443 2:35:55 PM: debug configure -> Executing
99f80bb8-ab00-4b27-9b33-318aff97b443 2:35:55 PM: debug ‘updated()’ called…

Sorry about the late replay @skhandu… things have been crazy for me lately.

Based on the error information my guess would be that your Device Network ID. You can not have more than 1 device with the same Device Network ID in ST and, in the case of this DTH, the Device Network ID is calculate as a combination of the IP and Port used. Since the image is returned by the ST cloud to the Device Network ID IP and Port, your definition of “AmcrestEnteranceCam01” is causing the problem.

Try going into the configuration setting within the DTH again and change the Port to a different number, file it using “Done”, then go back in and set the port back to 4043 and file again with “Done”. When you view the device again in the IDE Devices List you should see that the Device Network ID has been changed to something else. Leave it alone and try your snapshot again.

I hope that helps.

You have the

@Belgarion - Thanks for your reply. I was able to get rid of the Device Network ID conflict - I had not removed my old foscam which had the same IP/port :frowning:. Removing it - the connectivity came back on.

My only remaining issue now is not getting live video feed - will try a few more things… I saw updates above RTSP, MPEG… if you have any suggestions that would be great… but the good news is that my requirements to take snapshots is now working !! Thanks !!