question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

This component supports Xiaomi cameras, but if you need to be able to play video streams in HA, the device needs to meet the following conditions:

  • Service camera-stream-for-google-home needs to be defined in camera device miot-spec (find your camera spec here)
  • The stream address can be obtained after the device is integrated (stream_address attribute in entity state)
  • The stream address can be accessed normally within the validity period (stream_http_status and stream_http_reason attributes in entity state)
  • The stream address can be transcoded normally by ffmpeg, test via shell command:
    ffmpeg -v warning -y -protocol_whitelist file,http,https,rtp,udp,tcp,tls,crypto -i 'https://cn.livestreaming.io.mi.com/hlstranscoder/XXXXXX_H265transH264/playlist.m3u8' -an -c:v mjpeg -f mpjpeg xiaomi_camera_video
    

What information do you need to show me when report a bug for camera ?

  • Camera device model (Like: brand.camera.abc) Required
  • Masked stream_address
  • stream_http_status and stream_http_reason attributes in entity state
  • ffmpeg test results

本组件支持小米摄像机,但是如果需要能在HA中播放视频流,需要设备满足以下条件:

  • 相机设备miot-spec中需定义流服务 (在这里找到你的相机规格)
  • 集成设备后能够获取到流地址 (实体状态的属性stream_address)
  • 流地址在有效期内能够正常访问 (实体状态的属性stream_http_statusstream_http_reason)
  • 流地址能被ffmpeg能够正常转码,通过shell命令测试:
    ffmpeg -v warning -y -protocol_whitelist file,http,https,rtp,udp,tcp,tls,crypto -i 'https://cn.livestreaming.io.mi.com/hlstranscoder/XXXXXX_H265transH264/playlist.m3u8' -an -c:v mjpeg -f mpjpeg xiaomi_camera_video
    

报告Bug时需要向我展示哪些信息?

  • 相机设备型号 (如:brand.camera.abc) 必填
  • 掩码的流地址
  • 实体状态的属性stream_http_statusstream_http_reason
  • ffmpeg测试结果

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:53 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
al-onecommented, Aug 18, 2021
  1. Obtain the stream address via HA service:
service: xiaomi_miot.call_action
data:
  entity_id: camera.mi_jia_xiao_zhi_camera_control
  siid: ? # Get from https://home.miot-spec.com/spec?model=brand.camera.your
  aiid: 1
  params:
    - 0
  throw: true
  1. Find the stream address from the notification in the left sidebar.
  2. Test the stream address through ffmpeg:
ffmpeg -v warning -y -protocol_whitelist file,http,https,rtp,udp,tcp,tls,crypto -i 'https://cn.livestreaming.io.mi.com/hlstranscoder/XXXXXX_H265transH264/playlist.m3u8' -an -c:v mjpeg -f mpjpeg xiaomi_camera_video
1reaction
al-onecommented, Aug 26, 2021

@Zeunas Thanks for your hard testing! I checked the v0.3.8 and v0.4.0 versions of the code, and there is no difference when they get the live stream. If you can get the live stream address in both versions, it means that the component works well for your camera. The main function of the camera integration of this component is to obtain the stream address and process it through HA. If it cannot be played, you can test the stream address through the method in https://github.com/al-one/hass-xiaomi-miot/issues/166#issue-972598869. The test results may have the following situations that the component cannot solve:

  • Streaming address cannot be accessed
  • Streaming address is forbidden (403)
  • ffmpeg reports errors
Read more comments on GitHub >

github_iconTop Results From Across the Web

Camera doesn't work in Windows - Microsoft Support
Select Start , type device manager, then select it from the search results. · Find the problem webcam from the list of devices...
Read more >
Camera Troubleshooting: Fixing Common Webcam Problems ...
Issues with your camera driver, or driver software · Faulty wired or wireless device connection · Incorrectly configured system settings · Antivirus software ......
Read more >
How To FIX Camera NOT Working on Windows 10 Problem
Link to Camera Being Used By Another App [0xa00f4243(0xc00d3704)] on Windows 10 Fix -https://youtu.be/XE2ULFlzkxwLink to the Black Camera ...
Read more >
How to fix common camera problems on Windows 10
How to fix camera detection on Windows 10 · Open Start. · Search for Device Manager, and click the top result to open...
Read more >
Laptop Camera Not Working? Here Are Five Easy Ways To ...
Common Laptop Camera Problems & Solutions · 1. Laptop Camera Showing Black Screen · 2. No Audio When Webcam Is Turned On ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found