-
-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Amcrest ASH21 IP Camera Integration - #54346
Comments
amcrest documentation |
Hey there @flacjacket, mind taking a look at this issue as it has been labeled with an integration ( |
Can you try accessing the camera with the upstream
If that doesn't work, we can take this to the upstream package ticket that I see was just recently opened for this camera here: tchellomello/python-amcrest#183, it may be that the camera doesn't support the API and you will need to just use the RTSP stream. If you are able to get something out from that, then we can try to figure out what is happening in the integration. |
Flacjaket - thanks for quick response. Could I get a link on how to install amcrest python package please? |
Depending on how you have home assistant installed, you may be able to use the |
Using the following code:
from amcrest import AmcrestCamera
camera = AmcrestCamera('192.168.1.51', 80, 'admin', 'amcrest7879').camera
print(camera.general_config)
print(camera.software_information)
print(camera.version_http_api)
I receive the following error
Traceback (most recent call last):
File "c:/Users/Randy Kreisel/Documents/amcrest/python-amcrest/test2.py", line 3, in <module>
print(camera.general_config)
File "C:\Users\Randy Kreisel\AppData\Local\Programs\Python\Python37\lib\site-packages\amcrest\system.py", line 55, in general_config
return self.__get_config("General")
File "C:\Users\Randy Kreisel\AppData\Local\Programs\Python\Python37\lib\site-packages\amcrest\system.py", line 49, in __get_config
f"configManager.cgi?action=getConfig&name={config_name}"
File "C:\Users\Randy Kreisel\AppData\Local\Programs\Python\Python37\lib\site-packages\amcrest\http.py", line 171, in command
self._generate_token()
File "C:\Users\Randy Kreisel\AppData\Local\Programs\Python\Python37\lib\site-packages\amcrest\http.py", line 106, in _generate_token
resp = self._command(cmd).content.decode()
File "C:\Users\Randy Kreisel\AppData\Local\Programs\Python\Python37\lib\site-packages\amcrest\http.py", line 225, in _command
raise CommError(error) from error
amcrest.exceptions.CommError: HTTPConnectionPool(host='192.168.1.51', port=80): Max retries exceeded with url: /cgi-bin/magicBox.cgi?action=getMachineName (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x00000225C8DA0EB8>, 'Connection to 192.168.1.51 timed out. (connect timeout=6.05)'))
From: Sean Vig ***@***.***>
Sent: Tuesday, August 10, 2021 9:05 AM
To: home-assistant/core ***@***.***>
Cc: rkkreisel ***@***.***>; Author ***@***.***>
Subject: Re: [home-assistant/core] Amcrest ASH21 IP Camera Integration - (#54346)
Can you try accessing the camera with the upstream amecrest package directly? I am not able to test this camera, but I see there is some discussion on what if any of the camera API the smart home Amcrest cameras can support (see here <https://amcrest.com/forum/ip-cameras-f18/can-t-use-the-http-rstp-api-with-ash42-b-camera-t13694.html> and here <https://amcrest.com/forum/amcrest-smart-home-f32/smart-home-rtsp-t13833.html> ). If you are able to install and test the amcrest python package, you should be able to:
from amcrest import AmcrestCamera
camera = AmcrestCamera(ipaddress, 80, username, password).camera
print(camera.general_config)
print(camera.software_information)
print(camera.version_http_api)
If that doesn't work, we can take this to the upstream package ticket that I see was just recently opened for this camera here: tchellomello/python-amcrest#183 <tchellomello/python-amcrest#183> , it may be that the camera doesn't support the API and you will need to just use the RTSP stream. If you are able to get something out from that, then we can try to figure out what is happening in the integration.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#54346 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIGUHN5BBGYUXZ4H2UXR7DTT4EPW3ANCNFSM5B2SWZGA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email> . <https://github.com/notifications/beacon/AIGUHN3VJ4PENCVVTT6CDFLT4EPW3A5CNFSM5B2SWZGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGVUANXY.gif>
|
Alright, does I'm thinking the ASH21 does not support the API, which is what the Amcrest integration uses. In which case, you can use either the RTSP stream, which looks like it would be |
I tried setting up using onvif and the camera does not show on discovered list and when I manually configure it I get the unknow error below using port 554.
I tried to connect using VLS and rtsp . . . and it failed. Screen shot below
Can’t seem to connect to the camera via VLC.
From: Sean Vig ***@***.***>
Sent: Wednesday, August 11, 2021 8:49 AM
To: home-assistant/core ***@***.***>
Cc: rkkreisel ***@***.***>; Author ***@***.***>
Subject: Re: [home-assistant/core] Amcrest ASH21 IP Camera Integration - (#54346)
Alright, does camera.version_http_api show anything?
I'm thinking the ASH21 does not support the API, which is what the Amcrest integration uses. In which case, you can use either the RTSP stream, which looks like it would be rtsp:https://<IPADDRESS>/cam/realmonitor?channel=1&subtype=0 or you can setup the camera with the Onvif plugin. Unfortunately, neither of these would give you any of the motion or AI detections that the camera is capable of providing to the app.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#54346 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIGUHN662D6ZCMMQELV5V3DT4JWVFANCNFSM5B2SWZGA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email> . <https://github.com/notifications/beacon/AIGUHNYALAGY6WYFGNYEHCDT4JWVFA5CNFSM5B2SWZGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGV2A5IQ.gif>
|
Any thoughts?
From: randy kreisel ***@***.***>
Sent: Wednesday, August 11, 2021 9:34 AM
To: 'home-assistant/core' ***@***.***>
Subject: RE: [home-assistant/core] Amcrest ASH21 IP Camera Integration - (#54346)
I tried setting up using onvif and the camera does not show on discovered list and when I manually configure it I get the unknow error below using port 554.
I tried to connect using VLS and rtsp . . . and it failed. Screen shot below
Can’t seem to connect to the camera via VLC.
From: Sean Vig ***@***.*** ***@***.***> >
Sent: Wednesday, August 11, 2021 8:49 AM
To: home-assistant/core ***@***.*** ***@***.***> >
Cc: rkkreisel ***@***.*** ***@***.***> >; Author ***@***.*** ***@***.***> >
Subject: Re: [home-assistant/core] Amcrest ASH21 IP Camera Integration - (#54346)
Alright, does camera.version_http_api show anything?
I'm thinking the ASH21 does not support the API, which is what the Amcrest integration uses. In which case, you can use either the RTSP stream, which looks like it would be rtsp:https://<IPADDRESS>/cam/realmonitor?channel=1&subtype=0 or you can setup the camera with the Onvif plugin. Unfortunately, neither of these would give you any of the motion or AI detections that the camera is capable of providing to the app.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#54346 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIGUHN662D6ZCMMQELV5V3DT4JWVFANCNFSM5B2SWZGA> .
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email> . <https://github.com/notifications/beacon/AIGUHNYALAGY6WYFGNYEHCDT4JWVFA5CNFSM5B2SWZGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGV2A5IQ.gif>
|
Just wanted to point out that the AD110 and AD410 doorbells are both "ASH" (Amcrest SmartHome) devices which support RTSP and the Amcrest API (for the most part), along with some SmartHome-specific events. So @rkkreisel - entering the following command in your browser fails on the ASH21 (after authenticating)? If that fails, does this work? This displays a dump of all the camera configurations, most of which can be queried or changed individually via the API. In this dump, there should be: The other thing I noticed was your use of stream_source: mjpeg in the config. Try using rtsp instead. Please note what the HASS Amcrest documentation states:
|
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
Trying to configure Amcrest ASH-21 IP camera for the first time. Receiving the following error in the log file
The camera is set up with a static ip address
Logger: amcrest.http
Source: /usr/local/lib/python3.8/site-packages/amcrest/http.py:211
First occurred: 2:39:45 PM (10 occurrences)
Last logged: 2:41:59 PM
None:None Trying again due to error: ConnectTimeout(MaxRetryError("HTTPConnectionPool(host='192.168.1.51', port=80): Max retries exceeded with url: /cgi-bin/magicBox.cgi?action=getMachineName (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at ADDRESS>, 'Connection to 192.168.1.51 timed out. (connect timeout=6.05)'))"))
What is version of Home Assistant Core has the issue?
core-2021.4.6
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Amcrest
Link to integration documentation on our website
https://github.com/NAStools/homeassistant/blob/master/homeassistant/components/camera/amcrest.py
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: