al-one / hass-xiaomi-miot

Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. 小米米家智能家居设备接入Hass集成
https://miot-spec.com
Apache License 2.0
4.69k stars 664 forks source link

自動模式下 IMILAB EC5 Floodlight Camera 攝像頭 Camera Control 接入後 不可用 之後轉為 待命 另外 燈泡 開關有問題 #1270

Open chiuking45 opened 1 year ago

chiuking45 commented 1 year ago

Device model / 设备型号

chuangmi.camera.055a02

Component version / 插件版本

0.7.11

HA core version / HA版本

2023.8.3

Integrated mode / 集成方式

Automatic (自动模式)

The problem / 问题详情

1.IMILAB EC5 Floodlight Camera 攝像頭用账号集成添加完畢後,實體裝置攝像頭感測器會顯示"Preview of the IMILAB EC5 Floodlight Camera Camera Control" 無法顯示攝像畫面。 2.燈泡Indicator Light 開關控制理論上因該是補光燈的開關,結果控制的是攝像機藍色電源燈的開關。

Entity attributes / 实体属性

1.camera.chuangmi_055a02_b7c0_camera_control unavailable entity_picture: /api/camera_proxy/camera.chuangmi_055a02_b7c0_camera_control?token=91922177d208d3c47869643024d509d1a9fd5eefd439557492104f41898ce048 friendly_name: IMILAB EC5 Floodlight Camera Camera Control supported_features: 1

2.camera.chuangmi_055a02_b7c0_camera_control IMILAB EC5 Floodlight Camera Camera Control idle access_token: 3be5e6f485cff5498339a8e315c3cd685338a9e3d74842258944b65ac9c965c3 model_name: chuangmi.camera.055a02 brand: chuangmi model: chuangmi.camera.055a02 lan_ip: 192.168.50.235 mac_address: 94:F8xxxxxxx entity_class: MiotCameraEntity home_room: 萬年路 客廳 miot_type: urn:miot-spec-v2:device:camera:0000A01C:chuangmi-055a02:2 camera_control.on: true camera_control.image_rollover: 0 camera_control.night_shot: 5 camera_control.wdr_mode: true glimmer_full_color-2-6: true camera_control.recording_mode: 0 camera_control.motion_tracking: false camera_control.time_watermark: true camera_capacity: boundary,key_area lock_region.lock_region_attr: {"lock_region":0,"legal_status":0} white_light_control: {"switch":1,"brightness":2} brightness_on_night-13-2: 5 hotspot: {"switch_enable":"0","ap_switch":"0","ap_name":"xiaobaishexiangji","ap_passwd":"12345678"} people_detect_attr-10-1: {"switch":1,"start_time":"00:00","end_time":"23:59"} object_detect_attr-10-2: {"switch":1,"start_time":"00:00","end_time":"23:59"} fav_area: fav_area.boundary_attr: fav_area.key_area_attr: fav_area.active_fav_area: 0 fav_area.motor_position: [50,93] motion_detection: true motion_detection.alarm_interval: 5 detection_sensitivity-5-3: 1 motion_detection_start_time-5-4: 00:00:00 motion_detection_end_time-5-5: 23:59:00 memory_card_management.status: 0 storage_total_space-4-2: 524223232 storage_free_space-4-3: 515368704 storage_used_space-4-4: 8854528 indicator_light.on: true state_updater: lan sub_entities: indicator_light-3, camera_control-2.on-1 entity_picture: /api/camera_proxy/camera.chuangmi_055a02_b7c0_camera_control?token=3be5e6f485cff5498339a8e315c3cd685338a9e3d74842258944b65ac9c965c3 friendly_name: IMILAB EC5 Floodlight Camera Camera Control supported_features: 1

3.sensor.mi_6674912752_message IMILAB EC5 Floodlight Camera: 05:10畫面變動! entity_class: MihomeMessageSensor filter_homes: exclude_types: 13 msg_id: 1693732356236664800 is_new: 1 type: 6 title: 05:10畫面變動! content: IMILAB EC5 Floodlight Camera user_id: 6674912752 ctime: 1692652236 timestamp: 2023-08-22T05:10:36+08:00 model: chuangmi.camera.055a02 device_id: 1056944619 home_name: 萬年路 room_name: 客廳 event: smart_camera_motion event_data: createTime: 1692652228668 fileId: '95467141834744064' isAlarm: true jump2Live: false offset: 0 startDuration: 0

prev_message: IMILAB EC5 Floodlight Camera: 05:02畫面變動! icon: mdi:message friendly_name: Xiaomi 6674912752 message Xiaomi 6674912752 message

Home Assistant Logs / 系统日志

1.自行安裝整合產生錯誤。

Logger: homeassistant.helpers.entity Source: custom_components/xiaomi_miot/core/xiaomi_cloud.py:599 Integration: Xiaomi Miot Auto (documentation, issues) First occurred: 上午4:51:47 (32 occurrences) Last logged: 上午5:22:47

Update for camera.chuangmi_055a02_b7c0_camera_control fails Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 714, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 403, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 1053, in _validate_conn conn.connect() File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 472, in connect _match_hostname(cert, self.assert_hostname or server_hostname) File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 545, in _match_hostname match_hostname(cert, asserted_hostname) File "/usr/local/lib/python3.11/site-packages/urllib3/util/ssl_match_hostname.py", line 155, in match_hostname raise CertificateError("hostname %r doesn't match %r" % (hostname, dnsnames[0])) urllib3.util.ssl_match_hostname.CertificateError: hostname 'tw.business.smartcamera.api.io.mi.com' doesn't match 'home.mi.com'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/connectionpool.py", line 798, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='tw.business.smartcamera.api.io.mi.com', port=443): Max retries exceeded with url: /common/app/get/eventlist?data=Og9%2F%2BQYPFHXtZF6aQSt5x2Ujz4GYAy1cAfGZgxZtC2BZFQtt%2Fagn6Ovlan%2FWqZ1n%2FHCPs4KYh1mN6HGkc6EGY7FqUK1GllYLUalJdecu5o7ty7qcUIaDatOgeYWOqWEeCjDnZ82Do36P5ua54uRda5nSVyBbmYhLO36tKUersxpspTYXGJnosGOagXUD4V0BGbcOn7aPd1EMSDATIjzsPIj%2F%2BmF2ynjj7pKiazjafTr0PNnEJhK%2BDDmeJ4thdLZS2TkeFlamvUbHpWqIBKR1b65Kw7M2kreJJTq4mA%3D%3D&rc4_hash__=JFVV5wBlF3ypew%2FUMVIYoyR2m5zLRS9%2FVdjqhA%3D%3D&signature=P%2BiGM8inV3IcrUAu7uxWEYyufFU%3D&ssecurity=%2F7qr1QpNx71Wi1eXn0wY2g%3D%3D&_nonce=QDyQYPWT9sEBrnaj (Caused by SSLError(CertificateError("hostname 'tw.business.smartcamera.api.io.mi.com' doesn't match 'home.mi.com'")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 699, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 938, in async_device_update await self.async_update() File "/config/custom_components/xiaomi_miot/camera.py", line 295, in async_update rdt = await mic.async_request_api(api, rqd, method='GET', crypt=True) or {} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 171, in async_request_api return await self.hass.async_add_executor_job( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 185, in request_miot_api rsp = self.request_rc4_api(api, params, method, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_miot/core/xiaomi_cloud.py", line 599, in request_rc4_api response = self.session.get(url, params=params, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get return self.request("GET", url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='tw.business.smartcamera.api.io.mi.com', port=443): Max retries exceeded with url: /common/app/get/eventlist?data=Og9%2F%2BQYPFHXtZF6aQSt5x2Ujz4GYAy1cAfGZgxZtC2BZFQtt%2Fagn6Ovlan%2FWqZ1n%2FHCPs4KYh1mN6HGkc6EGY7FqUK1GllYLUalJdecu5o7ty7qcUIaDatOgeYWOqWEeCjDnZ82Do36P5ua54uRda5nSVyBbmYhLO36tKUersxpspTYXGJnosGOagXUD4V0BGbcOn7aPd1EMSDATIjzsPIj%2F%2BmF2ynjj7pKiazjafTr0PNnEJhK%2BDDmeJ4thdLZS2TkeFlamvUbHpWqIBKR1b65Kw7M2kreJJTq4mA%3D%3D&rc4_hash__=JFVV5wBlF3ypew%2FUMVIYoyR2m5zLRS9%2FVdjqhA%3D%3D&signature=P%2BiGM8inV3IcrUAu7uxWEYyufFU%3D&ssecurity=%2F7qr1QpNx71Wi1eXn0wY2g%3D%3D&_nonce=QDyQYPWT9sEBrnaj (Caused by SSLError(CertificateError("hostname 'tw.business.smartcamera.api.io.mi.com' doesn't match 'home.mi.com'")))

2.自行安裝整合產生錯誤。

Logger: urllib3.connection Source: custom_components/xiaomi_miot/core/xiaomi_cloud.py:599 Integration: Xiaomi Miot Auto (documentation, issues) First occurred: 上午4:51:47 (32 occurrences) Last logged: 上午5:22:47

Certificate did not match expected hostname: tw.business.smartcamera.api.io.mi.com. Certificate: {'subject': ((('commonName', 'home.mi.com'),),), 'issuer': ((('countryName', 'US'),), (('organizationName', 'DigiCert, Inc.'),), (('commonName', 'RapidSSL Global TLS RSA4096 SHA256 2022 CA1'),)), 'version': 3, 'serialNumber': '0FC72ECBD2721FB74A661799810FEC8F', 'notBefore': 'May 15 00:00:00 2023 GMT', 'notAfter': 'Jun 7 23:59:59 2024 GMT', 'subjectAltName': (('DNS', 'home.mi.com'),), 'OCSP': ('http://ocsp.digicert.com',), 'caIssuers': ('http://cacerts.digicert.com/RapidSSLGlobalTLSRSA4096SHA2562022CA1.crt',), 'crlDistributionPoints': ('http://crl3.digicert.com/RapidSSLGlobalTLSRSA4096SHA2562022CA1.crl', 'http://crl4.digicert.com/RapidSSLGlobalTLSRSA4096SHA2562022CA1.crl')}

Id1new commented 10 months ago

Проблему не решили ???