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.58k stars 649 forks source link

Camera chuangmi_029a02 is not working #1202

Open lor08 opened 1 year ago

lor08 commented 1 year ago

Home Assistant Docker

device: chuangmi.camera.029a02 object: camera.chuangmi_029a02_12c1_camera_control_2 data


entity_picture: >-
  /api/camera_proxy/camera.chuangmi_029a02_12c1_camera_control_2?token=...
friendly_name: Mi 360° Home Security Camera 2K Camera Control
supported_features: 3
keep_streaming: 'true'
video_attribute: '1'
chunk_properties: 1
access_token: 303b15df8f7ae94e7913794911db90d9fbb38a68c5720b4fdd3dbbfa485894e4
model_name: chuangmi.camera.029a02
brand: chuangmi
frontend_stream_type: hls
model: chuangmi.camera.029a02
lan_ip: ****
mac_address: ********
entity_class: MiotCameraEntity
miot_type: urn:miot-spec-v2:device:camera:0000A01C:chuangmi-029a02:2
speaker.volume.error: '-704040002 Service does not exist'
camera_control.on: true
camera_control.image_rollover: 0
camera_control.night_shot: 2
camera_control.wdr_mode: false
glimmer_full_color-2-6: true
camera_control.recording_mode: 0
camera_control.motion_tracking: false
camera_control.time_watermark: true
stream_status-8-9: 1
stream_status-7-9: 1
motion_detection: true
motion_detection.alarm_interval: 30
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: 30416
storage_free_space-4-3: 32
storage_used_space-4-4: 30384
indicator_light.on: true
state_updater: cloud
sub_entities:
  - indicator_light-3
  - camera_control-2.on-1
  - motion_event
motion_video_time: '2023-07-16 13:42:56'
motion_video_type: ObjectMotion:PeopleMotion
motion_video_latest:
  startDuration: 0
  cut: false
  offset: 0
  isCloud: false
  isRead: false
  videoStoreId: >-
    CAMERA_VIDEO_GKACQDlsvy....
  eventType: ObjectMotion:PeopleMotion
  expireTime: 1690108979428
  isAlarm: true
  isShowImg: true
  imgStoreId: >-
    CAMERA_IMG_GKACQDlsvy...
  fileId: '93816917374012160'
  extraInfo: '{"ver":"1.0.0","alarmStart":true,"eventType":"ObjectMotion"}'
miot_action_result:
  did: '372030040'
  miid: 0
  siid: 7
  aiid: 1
  code: 0
  out:
    - >-
      https://ru01.livestreaming.io.mi.com/hlstranscode...
  exe_time: 0
  withLatency: 0

Error: Error from stream worker: Error opening stream (ERRORTYPE_111, Connection refused) https://ru01.livestreaming.io.mi.com/hlstranscoder

object: camera.chuangmi_029a02_12c1_motion_event data

friendly_name: Mi 360° Home Security Camera 2K Camera Control motion_event
supported_features: 2
entity_picture: >-
  /api/camera_proxy/camera.chuangmi_029a02_12c1_motion_event?token=.......
access_token: ***************
model_name: chuangmi.camera.029a02
brand: chuangmi
frontend_stream_type: hls
entity_class: MotionCameraEntity
parent_entity_id: camera.chuangmi_029a02_12c1_camera_control_2
stream_address: >-
  https://ru.business.smartcamera.api.io.mi.com/common/app/m3u8?data=..............
image_address: >-
  https://ru.processor.smartcamera.api.io.mi.com/miot/camera/app/v1/img?data=............

Error: Error from stream worker: Error demuxing stream: [Errno 1094995529] Invalid data found when processing input: 'https://ru.business.smartcamera.api.io.mi.com/common/app/m3u8?data=Rxdeim%2BGepsJNX0op

The camera is connected, it seems that the integration is taking place, but only the preview of the motion_event object works. Also, when I start watching video from the camera, a notification comes to miHome. But at the same time in the browser console I see a 500 error on the address that broadcasts the stream.

изображение

lor08 commented 1 year ago

I changed the server from Russia to Germany and everything worked, what could be the problem? But it doesn't work locally.