Amcrest AD110 - Button Push Event - An Unsolved Mystery

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
I've searched, experimented, installed, uninstalled, created a number of Virtualboxes to try many of the things I've found. I've tried a range of home automation and security software, but I have had no luck in triggering an event based on an AD110 doorbell push. Seems like a simple function and what's odd is that the most complex functions of the AD110 doorbell are supported by most software, just not the doorbell push. Why? I would appreciate, and perhaps pay, for clear guidance on how to access the doorbell push event so I can trigger an automation? I've spent weeks searching and testing many solutions, to include conversations in this forum and others, none worked and most of the posts are a few years old with no clear resolution. I've tried unsupported code and watched hours, if not days, of youtube videos in this quest. AD110 video support works great, motion detection fine, but capturing a doorbell press event, no. If anyone can help, I'd appreciate it so much! I'm not really a forum/blogger and it's been a while, maybe years, since I've had to reach out to a community for tech support, so I'm really hoping someone has solved this and can provide help. After experimenting with several software tools, I'm currently using Blue Iris as it has all the right checkboxes and features I need once the button press event is solved. However, I will switch to any tool that will capture the button push event and send an email or SMS. My intent is to SMS trigger an AWS Lambda event when the button is pressed. I'm able to do that with a Nest Doorbell camera, but unfortunately, Nest doesn't offer a means to turn off the outdoor doorbell chime (a hard requirement).

Thanks in advance to anyone who has solved this mystery and is willing to share the solution with someone on the verge of giving up! I can't buy more cameras to experiment with, lol. I have a 4 different doorbell cameras, not counting 2 Amcrest AD110's (6 total). I only need one brand to work.

Mike
 

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
p.s.s. I hope this doesn't break forum protocol, but I would be willing to send a new Google Nest Doorbell Camera (battery), with a wall plug (I purchased separately from Google) to anyone who can solve this.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,869
Reaction score
48,505
Location
USA
Maybe something with this will help get you to your endpoint?

 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,703
Reaction score
38,874
Location
Alabama
+1^^.
But in case you don't want to open up and solder anything inside your AD110, consider this:

In May of last year @GaryOkie had got his AD110 interfaced with HA and might have some good info for you ==>> Amcrest AD110 - Can I do better than this?

He said "....I’m using Home Assistant to capture snapshots and send to our phones via Telegram along with a link to the recorded video. HA also knows when we aren’t home and if the doorbell is pushed, it will play some really loud vicious dogs barking at the door. "
 

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
Thanks, TonyR. I've tried Home Assistant (camera works fine, it offers some motion sensors, but not sure if they actually work, didn't try). According to several blog posts on various sites and code posted in Github, at one time there was a solution that offered granular AD110 controls, but HA has since been upgraded and necessary tools like Portainer, are not supported or "allowed" in the HA ecosystem. I also tried Zoneminder, it works fine with the cameras, but no button event detection. I tried a few other home automation software, but don't recall the names--none of them offered button press events. I'm using Blue Iris now, camera works fine and it offers triggers for unspecified internal camera events, but can't get any to trigger. I haven't sniffed the network to see if Amcrest sends signal to China; however, if it does, it's hardly the first device/software to do that. Sometimes that functionality is needed for firmware management, sometimes it's used for collecting customer usage data (and to seek out cloned products), and sometimes it's used for enhancing profiles about specific people (like collecting DNA profiles from Ancestry for purposes other than genealogy).
 

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
Maybe something with this will help get you to your endpoint?

Thanks, wittaj. I have experience with circuit boards and developing IoT devices using platforms like Arduino. For the button press problem, I'm not planning on cracking open the Amcrest case to modify or tap into the physical hardware or firmware. I need a software solution for this problem. Amcrest offers an SDK and I quickly scanned it for a means of getting the button press event, but it's written in a language beyond my current coding knowledge. If it were a simple API, I could probably figure it out. Much of the sample code I pulled from various projects on Github for AD110 were written in Python, which I can use, but I couldn't get any of the projects to work. Some were dependent on running within the Home Assistant environment, but have been deprecated for years or tied to much older versions of HA. All dead ends.
 

GaryOkie

Pulling my weight
Joined
Jul 28, 2017
Messages
246
Reaction score
141
Location
Route 66, OK
2 years ago I was perhaps the first to post on Github how it was possible to detect AD110 doorbell press events. The capability to subscribe to any Amcrest/Dahua event was just added to the python-amcrest library back then, which was key. Amcrest_mqtt was initially used to pass these events to Home Assistant, but the Amcrest integration was later updated to incorporate event handling to easily trigger on doorbell presses and PIR (AD110) or Human detection (AD410) motion events. Note that there is a separate custom HASS Dahua integration that uses a different Dahua VTO python library which is just as capable.

You can use python code to import the python_amcrest library to detect doorbell presses or ANY event. Below is code I use to monitor "All" events for testing. You can then parse the json payload that is returned for code="CallNoAnswered" + action="Start" for a doorbell press. Likewise, code="AlarmLocal" + action="Start"/"Stop" can be used to detect AD110 PIR motion events which is much more reliable than the VideoMotion event. The AD410 uses the CrossRegionDetection event for human detection and does not have a PIR sensor.

Code:
from amcrest import AmcrestCamera, AmcrestError                                                                                                                           
from datetime import datetime
                                                             
cam_ip="192.168.xxx.xxx"                                        
cam_port=80                          
cam_id="admin"       
cam_pw="xxxxxxxx"                    
camera = AmcrestCamera(cam_ip, cam_port, cam_id, cam_pw).camera
                                                                
print ("---------------------------------------------------------------\n",
       "Amcrest/Dahua Event Code Captures\n",                              
       camera.machine_name, " Camera IP: ", cam_ip, "\n",                  
       camera.device_type, camera.device_class,                            
       "- HTTP API", camera.version_http_api, "\n",      
       "Firmware", camera.software_information, "\n",    
       "--------------------------------------------------------------"
)                                                                       
while True:                                                             
  try:                                                                  
    for code, payload in camera.event_actions('All', retries=5):
      if not ("Time") in code:    #ignore NTP-related events    
                                                                 
        print (datetime.now().replace(microsecond=0), "| ", payload)
                                                                     
  except AmcrestError as error:                                      
    _LOGGER.warning(                                                 
      "Error while processing events from %s camera: %r", name, error
    )
 
Last edited:

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
Thanks, GaryOkie! That gets me closer. On my lunch break, I imported the Amcrest Python library described here (tchellomello/python-amcrest). I used your code sample in Visual Studio Code. The API seems to work with regard to connecting to the doorbell and pulling basic camera info (name, IP, type, HTTP API version, and firmware version). It doesn't appear to be returning a value for device_class. The API request for event_actions returns a 400 client error. I'm going to troubleshoot it this evening. I found the development guide and the specific syntax for the event_actions call (). Maybe I can get it to work. I'll have to modify the library and then figure out how to use the modified library in place of the one I modify (haven't done that before).

If I'm missing something, please let me know.

Mike
 

GaryOkie

Pulling my weight
Joined
Jul 28, 2017
Messages
246
Reaction score
141
Location
Route 66, OK
The device class for doorbells should be returned as "DB". It's odd you don't see that, but it's just an info header item. What's more troubling is your 400 error for camera.event_actions. I'm running this code now on both an AD410 and AD110 and not seeing any issue.

You might want to also take a look at the amcrest2mqtt app that also leverages python_amcrest. It too should be functional outside of Home Assistant.

(and BTW - apologies for the example code that was missing essential python space formatting. The CODE markup was not working earlier, but somehow is now)
 

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
I abandoned trying to troubleshoot the Amcrest Python library. Maybe your AD110 has an older firmware version. I'm going through the Amcrest CGI API pdf and I can get most of the GET requests to work using Postman. But of course, the one that doesn't work is the one I need, "Attach." At least, I think that's the one I need. Of the 35 API requests I've tested from the pdf file, 5 don't work, which concerns me because if those 5 don't work, maybe the one I need doesn't work either or doesn't work on my firmware version. The doorbell is using firmware version 1.000.00AC003.0.R.191113. If you have a chance and could post your firmware version, that would help me eliminate a variable. And, if it's a firmware issue, I'm not sure if an older version is available or whether I can telnet it to the device. I need a break and then I'll obsess over this until I reach some conclusion. After I exhaust the API approach, I'll take a look at the amcrest2mqtt. I may have looked at that option before, but didn't try it for some reason.

When this is solved, however it's solved and whatever the results, I'll post it here and it'll hopefully help someone else. If I can figure out how to export all of my Postman Python code without having to touch each one, I'll pop it into a text document and post it here too.
 

Attachments

GaryOkie

Pulling my weight
Joined
Jul 28, 2017
Messages
246
Reaction score
141
Location
Route 66, OK
Here's the header info for my 2+ year old AD110 that has had several firmware updates.

Amcrest/Dahua Event Code Captures
LakeHouse Camera IP: 192.168.x.x
AD110 DB - HTTP API version=2.61
Firmware ('1.000.00AC006.0.R', '2020-09-22')
 

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
I'm 99% sure this is a firmware version problem. I sent a message to Amcrest to try and get the updated firmware because it isn't listed on their site. Unfortunately, the Amcrest Smarthome software lists the firmware as up to date. If you updated your firmware and still have the file, please share.
 

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
Amcrest sent me the latest firmware, newer than what you're using. It isn't listed on their website, not sure why. I upgraded and that fixed the problem. Wow, I haven't done that level of troubleshooting since the 90s. Firmware problems are extremely difficult to identify. If you wouldn't have posted your firmware version, I probably would have eventually given up. Attached is the latest AD110 firmware, use at your own risk. It takes a while to complete and when it hits 100%, it still displays a message that doesn't really imply that it's complete--should be a declaration. I took the risk and hit the return button. I could write a small book on what I learned about Nest, Ring, Blink, and Amcrest, and Home Assistant, Zoneminder, and Blue Iris over the past few weeks, with all the nuances of opened/closed systems issues and my nightmare, the button push event. Although I'm not too happy with any of them, Amcrest and Blue Iris satisfied my objectives. If you update your firmware, use the tool listed in these instructions:
 

Attachments

ThomasCamFan

Pulling my weight
Joined
Dec 14, 2020
Messages
142
Reaction score
226
Location
USA
Nice. If you don't mind, please come back and share how you implemented your doorbell event detection.

I'm interested in using a ESP32 or ESP8266 to receive the doorbell press events. Maybe your solution will assist my coding journey.

- Thomas
 

GaryOkie

Pulling my weight
Joined
Jul 28, 2017
Messages
246
Reaction score
141
Location
Route 66, OK
Hey @saigmike - great to hear you're back on track with your integration! Yeah, I knew you would see right away your firmware was way out of date, but I didn't realize that Amcrest has apparently neutered the firmware update check in SmartHome. My suspicion is that they encountered way too many problems with firmware updates and just did away with the check and now only send them out with a trouble ticket. It does suck though the app fibs saying the latest version is installed.

And for what it's worth, my AD410 that I've had since it's release has never had a single firmware update notice in the app. Now I think I know why. In the past, Amcrest has not not done a very good job providing release notes. Now with the firmware update they sent you, was it accompanied with any notes at all? I'm tempted to install this newer version, but I don't really have any significant issues other than spiders activating the PIR alarm and such. I would need to get further info from Amcrest on what this update addresses first, as well as ask them about AD410 updates.

EDIT: There is a more recent Amcrest HTTP/CGI API manual (v2.13) than the v1.15 you posted. This is for cameras and does not contain any SmartHome/Doorbell specific info, but there is a lot of commonality.
 
Last edited:

saigmike

n3wb
Joined
Jul 27, 2022
Messages
11
Reaction score
8
Location
United States
Thanks, GaryOkie! Amcrest provided no details on updates in the firmware, and you're probably right--every software distro is thousands of problems waiting to happen.

ThomasCamFan, attached are a few slides that demo how to test the Amcrest API's (or any API), how I use Blue Iris to trigger on doorbell push events, how Blue Iris sends notifications via SMS, and one of the landing zones for my data, Amazon IVS. There are 3 more parts to this config, Aurora RDS, S3, and a Lambda function, but that's secret sauce stuff with a very specific, off label use case.
 

Attachments

jack7

Getting comfortable
Joined
Mar 21, 2019
Messages
323
Reaction score
250
Location
USA
@saigmike
In your attached pdf, a note says:
"BUT, note that closed systems
like Nest and Ring don’t work
with any system other than
what’s provided by Google and
Amazon, unless you’re an
exceptional coder."

A system that does support Nest is Camect. But that may be because the Camect founders are ex-Googlers.
 

GaryOkie

Pulling my weight
Joined
Jul 28, 2017
Messages
246
Reaction score
141
Location
Route 66, OK
Just created an Amcrest support ticket asking about the "new" firmware update process - will post back how Amcrest replies.
Do I understand correctly that the SmartHome app's check for new firmware updates has been disabled for the AD110/AD410 doorbells? And that we have to ask for an update from support, if needed?

I ask this because in the forums I know that other users are being provided with newer firmware versions despite the SH app saying that I have the latest firmware installed.

For example, my AD110 says that its version ('1.000.00AC006.0.R', '2020-09-22') is up to date, but it is actually 2 years old and not really the latest.

The latest AD110 version identified from the forums is V20210422. Can you please provide release notes what it (and any prior versions) this update addresses?

I also have an AD410 that has never had a firmware update notice identified by the SmartHome app. It has 20210220 installed which was the original firmware it came with. Are there newer versions for it that fix problems?

Since we can no longer rely on SH app to let us know that new firmware updates are available, please provide release notes and the new firmware to let me decide if they are worth installing.

Thanks!
Gary
UPDATE (8/1/2022): Just now received a reply from Amcrest Support. They only provided a helpdesk cookbook reply attaching AD110 firmware and configtool install info. Completely ignored all my questions. Contacting them again to see if they can go beyond the cookie cutter,
 
Last edited:
Top