Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ASH21 #183

Open
NTGDeveloper opened this issue Aug 5, 2021 · 9 comments
Open

Support for ASH21 #183

NTGDeveloper opened this issue Aug 5, 2021 · 9 comments

Comments

@NTGDeveloper
Copy link

Can this be supported? It has an RTSP stream, I don't know if it needs more for the PTZ functionality but it would be nice to see this one work.

@flacjacket
Copy link
Collaborator

Looking at the home assistant integration ticket that is tagged above, it doesn't look like the ASH21 is capable of using the Amcrest API. Do you have a device to test on? Does it give similar results as the home assistant ticket when you try to connect to it?

@rob121
Copy link

rob121 commented Sep 4, 2021

@flacjacket I do not believe ASH21 does support the api, this is a log from my HA install

Sep  4 12:45:44 ha 0eb83eaffa52[1069]: 2021-09-04 12:45:44 WARNING (SyncWorker_2) [amcrest.http] <Unconnected @ 192.168.XX.XXX> Trying again due to error: HTTPError('404 Client Error: Not Found for url: http:https://192.168.XX.XXX:80/cgi-bin/magicBox.cgi?action=getMachineName')

Rtsp stream does work on

rtsp:https://user:[email protected]/cam/realmonitor?channel=1&subtype=1

Is there any way to add support w/out the api? My use case is to add it to home assistant and then publish it to homekit

@flacjacket
Copy link
Collaborator

@rob121 Yes, you can use the rtsp stream directly in home assistant through the ffmpeg integration, where the input is the rtsp stream url. One thing that does not supply, which the amcrest integration is able to with the .snapshot API, is a fast loading preview image. Can you test if you can get a snapshot back? If so, there may be something that could be setup to get a lightweight camera-only entity in home assistant. You can check by doing:

from amcrest import AmcrestCamera
camera = AmcrestCamera(host, 80, user, password).camera
camera.snapshot(stream=False)

@rob121
Copy link

rob121 commented Sep 4, 2021

@flacjacket It doesn't appear that the ASH21 supports the snapshot api, the AD110 didn't either but a later firmware update did at it, so there is hope maybe.

The only option for getting a snapshot was something like this via ffmpeg:

ffmpeg -y -i "rtsp:https://user:[email protected]/cam/realmonitor?channel=1&subtype=1" -vsync 2  -vframes 1 snapshot.jpg

I can do it via ffmpeg as you say, but since amcrest seems to be inconsistent on some of their cameras it would be nice to have a "fallback mode" that just gives you the basics of a snapshot and rtsp stream via ffmpeg.

@arthurnn
Copy link

any movement here?
the interesting piece is that you can connect the ASH camera to the amcrest app, not the smart home one, and you can control it. So how are they connecting it? it has to have some sort of API. thoughts?

@parautenbach
Copy link

Curious about this too. Since the Amcrest Smart Home app can control it, there must be some kind of API it uses. I'll see if I can sniff the protocol, but it won't be in the next few weeks.

@arthurnn
Copy link

FWIW, I am using BlueIris, and that can control the ASH cameras PTZ

@parautenbach
Copy link

@arthurnn do you have any information on the protocol it might be using in Blue Iris?

@parautenbach
Copy link

Actually, I've done more homework: If it works with Blue Iris it should have an RTSP stream. ONVIF is used e.g. for PTZ and can be sent over RTSP (I thought ONVIF was its own communication protocol). So, I think my statement then becomes: If the camera will respond to ONVIF over RTSP, then one should be able to use any ONVIF library. That's probably why Blue Iris works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants