Amcrest ASH26 Floodlight Camera

I was looking to control the floodlights on my Amcrest ASH26 floodlight camera and wrote a driver to connect via the HTTP API via digest authentication:

This small driver meets my needs, but it exposes the entire Amcrest API:

https://drive.google.com/file/d/1VM2Tb-q4PhmZuvLxSk5OwWInbFxUuTR-/view?usp=sharing

I'm hoping folks more inventive than myself can build something even better!

2 Likes

This looks really interesting. I took at look at the Armcrest and their API documentation and it looks pretty complete for integration with HE. I'm really looking to get away from my Ring cameras as I can't do anything fun with them.

How do you find the hardware/quality? I'm now reading the docs to see if its possible to subscribe to events so the camera pushes to HE instead of having HE poll the camera.

Quality seems good enough, on par with a Hikvision I also have outside. I may be mistaken, but I think it's an OEMed Dahua IPC-L26N:

My criteria was a drop-in replacement for a standard floodlight that supported RTSP. The options were fairly slim, but I've been happy so far even if it's only 1080p.

This is exacly how I felt as well. I also wanted to replace my ring doorbell too and it looks like they have a replacement for that as well. So I may grab a few and play around its it looks like it does what I was looking for.

Do you think it would be difficult to add monitoring the motion detection so it could report motion to HE?

It looks like logging locally or sending an email on motion detect is possible. If there were a way to receive and process the email, I suppose near real-time notification might be possible. Otherwise, I think polling the API for recent log entries would be the only way to do it.

I could be missing something, though...

If you've exposed the entire Amcrest API in the code, isn't motion detected a separate event?

I hope you don't mind, I'm trying to modify this driver for Dahua cameras too as I have both Amcrest and Dahua. Your driver made a connection with Dahua perfectly it just wouldn't read anything on refresh or do anything with on/off, so I changed the Lighting_V2[0][0][1].Mode to Lighting[0][1].Mode (where 1 is the cameras Day profile, which it uses 24/7) and now the On and Off work for the white LEDs on my IPC-T5442TM-AS-LED, although I haven't figured out the refresh options, I found the Dahua API at

This is the first time I've tried to modify a driver on Hubitat. I'd like to fix the refresh optionsat some point, but I'm just happy to finally be able to automate the white LED!

Thanks!

So far as I can tell the API is a simple HTTP GET-based affair and requires a persistent connection to receive events. That said, I'm not a developer and welcome those that are (and who want to do more than just turn on the lights) to take a look at the API docs and see what is possible.

You are correct.

I just got a response back from their support team. Their is no way to have the camera push events to HE. The only way is to have HE poll the devices for events and act on them.

This kind of sucks as I wouldn't want to have so many drivers constantly doing this as I add more cameras.

These devices meet about 99% of my requirements.

Am I misreading the logs, The driver as written is polling every minute to status the light condition. So is it difficult to just add the Motion. I tried reading the api description, but I could not determine what actually signified a Motion sense

That's how it currently operates, but perhaps a persistent HTTP connection to the camera would allow for real-time motion detection alerts. That's beyond my capabilities (and not sure HE even supports it), but might be worth some exploration.

Dave

Thank you for writing this!
I’ve been looking for a way to tell my amcrest cameras to save a video or snap a still using a motion event from an IR sensor on my HE as a trigger. Do you think this driver will open up that possibility?

What system do you use with your Amcrest cameras for monitoring/recording? If you use Blue Iris it's easy to get the motion events to trigger Hubitat virtual motion sensors for use in automations.

Will this work with any Amcrest camera or only the ASH26 Floodlight Camera?
I have 3 amcrest cameras but none is the floodlight.
Plus what exactly will i be able to do with this driver?

I currently have 2 4K 30fps POE cams feeding into an Amcrest NVR, NV2180E-HS.

If this driver opens up the full Amcrest API, hoping it might work with either my PoE cams or the NVR.

Edit to add, I recall researching this a year ago, or so, and iirc people were suggesting to use the http post trigger that’s supported by the cameras, but the HE did not offer a way to forward the authentication (username and password) that they require.

I don’t know if it will work with your models, but I suspect it will. Currently it only turns on the floodlight, but can be modified to access anything in the API. I also read some of the previous threads and, if I remember correctly, the old community drivers were discontinued due to the move to HTTP digest authentication. This driver does that, so it may be able to be backported into some of those more robust implementations. I can’t seem to find them now, it if you want to send a link along I can pass along the info to the authors or potentially fork if they have given up supporting them.

What are the keys features folks would be looking for in a more advanced driver?

Dave

This is great, it would be wonderful to be able to control the light functions (amongst other settings) with HA! My WAF would increase significantly if even just the light on/off could be controlled. Silly question, is there an app that uses this driver - how does one integrate this?

You can control the light with the driver in the current version of the driver, no app needed. Simply install the driver code and add a new device, specifying the ASH26 device type.

Best,
Dave

Thanks for the reply, that worked! For those reading this in the future, add a virtual device using the driver and when you do it will add the device allowing you to specify the IP and credentials.