Amcrest Switch Deprecated

https://amcrest.in/firmware/ has the previous firmware

@MIthras.ftw @kahka @IMAsleep @franciszeks

I just submitted PR 30843 with many improvements for robustness. I can’t guarantee that it will help with the issues you’ve been having with newer firmware versions, but I’d be interested to hear how the changes work for you.

Regarding versions, as noted above, all the cameras I have report their “HTTP API” version as 2.0.0, yet there seems to be a newer version 2.29 (or maybe that’s 2.2.9???) Anyway, I asked Amcrest (via DM on Facebook) if there was indeed a newer version, and if so, if there was a doc for it available. Unfortunately they just gave me a link to the doc I already had. When I asked for clarification, guess what, no reply.

So, bottom line, the way the HTTP API works may have changed, but unfortunately I don’t have anything that describes those changes, nor do any of my cameras have firmware loaded that implements it.

There does appear to be newer firmware for two of my cameras, but as might not surprise you, I’m hesitant to try them. In theory the older versions are available via the amcrest.in site, but I’m not sure how much I want to trust those files.

Oh, and get this. For the IP2M-841, the amcrest.in site has:

V2.420.AC00.18.R 2017-05-21
V2.520.AC00.18.R 2017-06-29 <- what I'm currently running

BUT, the official site (https://amcrest.com/firmwaredownloads) has this available (or, at least, that’s what the file name implies):

V2.420.AC00.18.R 2019-08-03

WTF?! That’s the same version number of an older firmware, but with a new date!

2 Likes

Perhaps turn off motion detection with the API by setting the sensitivity to zero?

So I’m thinking about buying Amcrest cameras just because the feature to toggle motion detection/recording from Home Assistant but looks like it’s not working anymore.

Can someone comment on that please, would hate to buy these for this one feature of its not working anymore.

Thanks.

It’s working, but it may depend on the exact model you buy, and/or its firmware version.

This is the situation with Amcrest: They published an HTTP API spec, which is what the integration is based on. However, they seem to have changed that API in some of their newer models and/or newer firmware versions, but they won’t admit they have, AND they won’t supply a new, corresponding API spec. I’ve tried many times, in many ways, to get them to admit they’ve made this change and to supply a new spec, but they won’t.

So, that means, the integration works with many, many camera models and firmware versions, but it may not completely work with newer camera models or firmware versions. There’s just no way to know.

Also unfortunate is that, even though there has been a list maintained as to which camera models have been known to work, that list does not provide firmware version, so even though a model may be listed doesn’t mean that it’s guaranteed to work (if it has newer firmware than what the list was based on.)

Sorry, but that’s just the way it is. Personally, even though I’ve been doing most of the maintenance of this integration (including its pypi.org package), I probably won’t ever buy another Amcrest camera, at least until they admit what they’ve done and provide an updated spec.

1 Like

Thank you Phil for taking the time to get back to me on this - really appreciated!

Frustrating to read this since Amcrest was my goto system for getting a bunch of cameras. I think it’s time for companies to start taking the software more seriously and also making sure that the functionality that was there when the product was bought is expected to continue being available.

Since this feature is so important to me I’m not really sure what to do now. Looks like Foscam can toggle motion detection with some semi-hack when an URL is being called but who knows for how long that is going to work…

Automation Problem Amcrest IP4M-1026W
I have a problem with the following automation. When I run the automation the Motion DetectVideo enable turns on but the Record enable does not. When I delete the camera.enable_motion_detection and then run the automation the Record enable turns on. This has worked at one time but during one of the HA upgrades my automation stopped working.
Any help would be appreciated.

- id: '1585323653606'
  alias: Amcrest Front Yard Camera On
  description: ''
  trigger:
  - entity_id: binary_sensor.front_door_motion
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data: {}
    entity_id: camera.amcrest_front_yard
    service: amcrest.enable_motion_recording
  - data: {}
    entity_id: camera.amcrest_front_yard
    service: camera.enable_motion_detection
  - data: {}
    entity_id: timer.amcrest1
    service: timer.start

Amcrest Camera Setting

Motion DetectVideo TamperHelp Center
Enable
ScheduleSetup
Anti-Dither
0
Seconds(0~100)
Detection AreaSetup
Record
Record Delay
10
Seconds(10~300)
Send Email
Snapshot
[/quote]

Please try to post your YAML code so it is formatted correctly. As you may know, YAML is very sensitive to indentation, and if you look at your post you will see there is no way to check that.

You can try enabling debug for the amcrest integration which should write some detailed messages to home-assistant.log that should help show what’s going on.

logger:
  default: error
  logs:
    homeassistant.components.amcrest: debug

Sorry about that I did a copy and paste which did not work hopefully this is better. I have turned on debug and this is what I see in the error log.

Log Details (WARNING)

Logger: amcrest.http
Source: components/amcrest/__init__.py:158
First occurred: 7:59:34 PM (1 occurrences)
Last logged: 7:59:34 PM

<Aker Front Door:Z053D94876C07> Trying again due to error: HTTPError('500 Server Error: Internal Server Error for url: http://192.168.1.69:80/cgi-bin/snapshot.cgi')

It’s much more helpful to look at all the lines in home-assistant.log that contain [homeassistant.components.amcrest.xxx]. E.g.:

grep -F 'homeassistant.components.amcrest' home-assistant.log

Or even just:

grep amcrest home-assistant.log

Depending on what you have configured and how long you run it that may result in a lot of output, but hopefully should provide some clues. The one message from the system log isn’t very helpful. It has nothing to do with enabling motion detection or motion recording.

I am not sure if this helps I have several Amcrest camera’s but this is just a sample of what printed but all of the outputs look the same.

2020-05-03 14:03:05 DEBUG (SyncWorker_9) [homeassistant.components.amcrest.binary_sensor] Updating Aker Front Door Online binary sensor
2020-05-03 14:03:07 DEBUG (SyncWorker_14) [homeassistant.components.amcrest.sensor] Updating Amcrest Back Yard SD Used sensor
2020-05-03 14:03:07 DEBUG (SyncWorker_12) [homeassistant.components.amcrest.sensor] Updating Amcrest Front Yard SD Used sensor
2020-05-03 14:03:07 DEBUG (SyncWorker_1) [homeassistant.components.amcrest.sensor] Updating Aker Basement Door SD Used sensor
2020-05-03 14:03:18 DEBUG (SyncWorker_15) [homeassistant.components.amcrest.sensor] Updating Amcrest Back Yard SD Used sensor
2020-05-03 14:03:18 DEBUG (SyncWorker_7) [homeassistant.components.amcrest.sensor] Updating Amcrest Front Yard SD Used sensor
2020-05-03 14:03:18 DEBUG (SyncWorker_10) [homeassistant.components.amcrest.sensor] Updating Aker Basement Door SD Used sensor
2020-05-03 14:03:29 DEBUG (SyncWorker_6) [homeassistant.components.amcrest.sensor] Updating Amcrest Back Yard SD Used sensor
2020-05-03 14:03:29 DEBUG (SyncWorker_14) [homeassistant.components.amcrest.sensor] Updating Amcrest Front Yard SD Used sensor
2020-05-03 14:03:29 DEBUG (SyncWorker_15) [homeassistant.components.amcrest.sensor] Updating Aker Basement Door SD Used sensor

Most things are polled so, yes, you will see a lot of those messages repeated. Those normal output lines are not useful, other than to show that HA and the amcrest integration are able to communicate with your camera(s.)

What you want to look for are any warnings or errors, and maybe even some debug messages, that happen when you run the automation that doesn’t work. It may even be necessary to enable lower level debug messages with:

logger:
  default: error
  logs:
    amcrest: debug
    homeassistant.components.amcrest: debug

That will show every command that is sent to the camera and how the camera responds.

At this point it’s probably worth noting that some new cameras / firmware versions seem to have a new HTTP API implementation that is at least somewhat incompatible with HA’s amcrest integration. So far I have not been able to get any new information from Amcrest about what has changed. They even deny that anything has changed when it clearly has. It may just be that your cameras are affected by this. Hopefully, though, it’s something we can fix.

Let me know if you see any useful log messages that concern the services used in your automation.

Thank you for your ongoing suggestions. I believe with many trial and errors I might have came up with a solution. I moved the starting of the timer between the 2 actions associated with the camera. Now every time I activate the automation both the motion detect enable and record come on for the time period of 5 minutes. It does appear if I am analyzing this correctly there is some issue with timing either with HA or the Amcrest Camera. I am including the updated start automation along with the stop automation.

- id: '1585323653606'
  alias: Amcrest Front Yard Camera On
  description: ''
  trigger:
  - entity_id: binary_sensor.front_door_motion
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data: {}
    entity_id: camera.amcrest_front_yard
    service: camera.enable_motion_detection
  - data: {}
    entity_id: timer.amcrest1
    service: timer.start
  - data: {}
    entity_id: camera.amcrest_front_yard
    service: amcrest.enable_motion_recording

- id: '1546484088458'
  alias: Amcrest Front Yard Camera Off
  trigger:
  - event_data:
      entity_id: timer.amcrest1
    event_type: timer.finished
    platform: event
  condition: []
  action:
  - data: {}
    entity_id: camera.amcrest_front_yard
    service: camera.disable_motion_detection
  - data:
      entity_id: camera.amcrest_front_yard
    entity_id: camera.amcrest_front_yard
    service: amcrest.disable_motion_recording

If you’ve found a work around, and you’re happy with that, then that’s fine. However, that doesn’t help get to the bottom of what might be wrong.

If you can go back to the sequence that doesn’t work, with debug enabled as I suggested, and can capture the lines from the log that show how the camera reacts, that would be very helpful.

Out of curiosity, why are you temporarily enabling motion detection and motion recording in the camera when some other motion sensor senses motion? I would have thought you’d just want to record during that period (i.e., amcrest.enable_recording & amcrest.disable_recording vs the services you’re using in your automations.)

Hi @pnbruckner - I’m also trying to get an updated HTTP API doc from Amcrest. I’ve been communicating with the Amcrest Product team detailing the issues with the current firmware and outdated doc and they forwarded this to the R&D team responsible for it.

On a related note - did you know that some models of Amcrest cameras are able to be updated with Dahua firmware? This unlocks a number of features that the equivalent Dahua cameras have.

It’s critical that they need to be equivalent OEM models to Dahua models. Unique models to Amcrest, won’t have a compatible Dahua firmware to upgrade to. Not sure what the best way is to find out if a particular model works other than to trawl the web for confirmed successes.

This may also solve the problem with the newer Amcrest firmware disabling the motion detection switch capability discussed in this thread.

Here’s a link to ipcamtalk post where this was discussed. It includes a youtube video detailing this discovery.

If you make any progress getting a new API doc I’d love to hear about it (and get a copy.) But I’m not holding my breath!

No, I wasn’t aware about the possibility of running Dahua firmware on Amcrest hardware. Honestly, I’m not “into this” enough to spend any time down that road. I worked on the Amcrest integration mainly to allow me to use my few Amcrest cameras the way I wanted (and had been with Smartthings before I switched to HA.) When I started using the integration it was woefully inadequate/buggy. I’m not really in a position to do “full time” Amcrest integration maintenance, although I have done, and am still willing to do, what little I could/can.

And, from what I hear, hunterjm is making really good progress on enhancing the ONVIF integration, which the Amcrest cameras also seem to support. So maybe before too long there won’t be a lot of demand for the amcrest integration anymore, but that’s yet to be seen. (I’m not sure ONVIF allows all the same functionality.)

Funny, “not holding my breath” were my words exactly in a different post about them responding. At least the product team that I was working with (on the Amcrest AD110 doorbell evaluation) was communicative in forwarding my request.

I’ve also chatted with @hunterjm about looking forward to testing his next release of the ONVIF integration. He is working on including motion detection. I believe that’s the main feature the ONVIF camera code lacks now. I’ve never used ONVIF, so I will have to look closely later to see what other limitations it might have in comparison to your Amcrest integration.

It will be in 0.110 if this gets merged by Wednesday: https://github.com/home-assistant/core/pull/35406

I’ve tested it with an IP2M-841 and an IP8M-T2499EW both on the latest firmware.

The only missing feature would be the ability to manually trigger a recording or turn motion detection on/off. Both are possible via ONVIF, but my need for them is low, and therefore my motivation to implement it would probably be low as well :grimacing:

Just purchased two more Amcrest Cameras model IP5M-T1179E
They seem to not respond to enable/disable motion detection (camera.disable_motion_detection) or Amcrest services (amcrest.disable_recording).
Anyone having the same issue?

Thanks