Connect to xiaoyi webcam!

Can you add xiaoyi webcam support?
Regards.

1 Like

Have you tried:

or

I try both, but I cannot connect.

Main stream: rtsp://ipaddress:554/ch0_0.h264
Minor stream: rtsp://ipaddress:554/ch0_1.h264
Audio stream: rtsp://ipaddress:554/ch0_3.h264

http://xiaoyi.querex.be/instructions/

Neither method would work as there is currently no RTSP support for HA; however there have been feature requests posted for it so you may want to add your votes there.

In the interim, you may want to look into these posts:

I successfully use the following configuration with xiaoyi camera:

camera:
  - platform: ffmpeg
    name: Cam
    input: -rtsp_transport tcp -i rtsp://192.168.x.x:554/ch0.h264
3 Likes

Note that you will have to install ffmpeg on your Pi in order for this to work.

@rpitera How I install ffmpeg in RPI?

Update: installed libav-tools and created a symbolic link. It’s working! Thanks.

Regards,

I’ve seen a lot of people having problems setting this up; would you mind explaining your steps?

Yes.
1/ install libav-tools: sudo apt install libav-tools
2/ create symbolic link: sudo ln -s /usr/bin/avconv /usr/bin/ffmpeg

Regards,

7 Likes

Thanks - I don’t use this but I’m sure this will help a lot of people and I appreciate your taking the time!

You can also install ffmpeg from backports:
https://backports.debian.org/Instructions/

apt-get -t jessie-backports ffmpeg

How would one know the correct suffix after “:554/”? This site uses “:554/tcp/av0_0” while here you use “:554/ch0.h264”. Both cases doesn’t work on my setup.

Please help. Thanks.

This is my entry in configuration.yaml, if it helps you. Works fine for me.

camera:

  • platform: ffmpeg
    name: Living Room
    input: -rtsp_transport tcp -i rtsp://x.x.x.x:554/ch0_0.h264

It depends on how it has been defined in your firmware for the cam.

I have to do reverse engineering.

  1. Using telnet I’ve found the prompt to be RT-IPC

  2. I’ve searched "RT-IPC” using Google and found that the the rtsp urls are as follows:
    rtsp://:554/11 -> 720P resolution or “MainFlow”
    rtsp://:554/12 -> VGA or “MinorFlow”

  3. Verified using VLC

You could also can get more details using this generic query http://<ip address>/cgi-bin/hi3510/param.cgi?cmd=getserverinfo gives me
var serialNum="VVVIPC1507283580HSDS-jPD4tU5cTcv"; var model="RT_IPC"; var hardVersion="3500-ov9712a"; var softVersion="V3.5.4.2301-S50-SMC-B20150723B"; var ipcname="IPCAM"; var startdate="1970-1-1 8:0:17"; var runtimes="0 day, 0:20"; var sdstatus="out"; var sdfreespace="0 "; var sdtotalspace="0 "; var builddate="Jul 28 2015 "; var productmodel="null"; var vendor="RTJ"; var swver=""; var hwver=""; var mppver="mpp2";

The model is RT_IPC and the vendor is RTJ, you can search using this and will find the correct rtsp url.

1 Like

Any one know about how to add xiaomi fang with RTSP?

Check out this project.

i know about it, i ask about how to add it to HA :slight_smile: but i find how so Thanks any way

How did you?

  - platform: ffmpeg
    name: Test Camera
    input: -rtsp_transport tcp -i rtsp://192.168.31.41/unicast
1 Like