Stream Component: Confirmed Cameras and Configurations

The problem was that I have an android tv with chromecast built-in that has two media player components, one for the tv and one for the chromecast, and I was trying to stream to the tv and not to the chromecast.

Depends on the browser you are using like older fire tablets or older iOS.

So does that mean I would not want to use this setting if I was using an older fire tablet?

Probably not, this is what the docs say.

Honestly the bug mentioned above should be fixed so this isnā€™t necessary.

Iā€™ve got that as well.
Iā€™ve got 3 WiFi access points in my house and suspect that when the camera changes from one point to the other, the stream breaks.

I was asking about the type of the dafang camera you are using. Is this hacked with not-original firmware or this is with original xiaomi firmware? Which is the config you use for this camera into HA?

I hacked the camera with dafang hack.
My config:

  • platform: generic
    name: Camera
    still_image_url: https://192.168.x.y/cgi-bin/currentpic.cgi
    stream_source: rtsp://192.168.x.y:8554/unicast
    verify_ssl: false
    username: root
    password: ********
    authentication: basic

I have an NRV with hikvision cameras.

- platform: generic
  name: Front House
  still_image_url: http://usr:[email protected]:80/PSIA/Streaming/channels/102/picture
  stream_source: rtsp://usr:[email protected]:8554/Streaming/Unicast/channels/102

I have configured the stream component and I use Hass.io 0.91.2.

In frond end i can see my cameras (working through still_image) , however when i click on the camera i can get the player with black window and infinite spinning wheel. At the same time i have no issue to use the ā€œcamera.play_streamā€ service and play the same camera stream on google display.

I do not get any errors in the log file.

Why am i not getting the player playing the stream, but the stream works fine on google chrome cast smart display?

Hi,

I have added my Hikvision camera to use it with the new Stream component.
However, recently (or maybe after upgrading to 0.91.3) I have some problem to load the stream and now it just shows a black screen with the spinning wheel.
In the log I can then find this:

H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)

If I wait a couple of minutes and try the same stream again it might work.
Does anybody else have this problem or might know whatā€™s causing this?

- platform: generic
  name: Test
  still_image_url: "http://user:password@ip-address/ISAPI/Streaming/channels/101/picture"
  stream_source: "rtsp://user:password@ip-address:554/Streaming/channels/3/"

Hass.io 0.91.3
Hikvision DS-2CD2385FWD-I

I saw some people said about that but I didnā€™t find if there is a solution. It seems to be after camera.play_stream Home Assistant looses the stream and on UI when I click on the camera it displays old buffered video for 20-30 seconds until I restart Home Assistant. After restarting it works fine again. Foscam FI9900P

- platform: generic
  still_image_url: "https://192.168.x.x:443/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=user&pwd=password"
  stream_source: "rtsp://user:[email protected]:88/videoMain"
  name: "Foscam 1"
  verify_ssl: false

Ok, so in my case no way to have it working. I donā€™t have the hackā€¦
Will you please show me how you integrated the camera inside lovelace?

Iā€™m using the xiaomi hack firmware and the stream breaks constantly

In order to use xiaomi dafang in home assistant you have to hack it.
Is simple following this guide https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks, once hacked you can integrate it in home assistant.

try to reduce the bitrate. If doesnā€™t work try to enable swap memory https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/blob/230f4d3cf306d7842287e9e5002d806513c4b2b8/firmware_mod/run.sh#L59

Is there a way to stream a camera external to HA? There is an API call to get a still image: /api/camera_proxy/camera.[name]. Is there something similar for the stream?

1 Like

I just got my two different Hikvision cameras working in two different ways. Models: DS-2CD2542FWD-IWS and DS-2CD2442FWD-IW

Depending on the authentication method set in the cameras configuration I had to use either the single URL or separated out digest method. When all said and done I opted for single URL with digest/basic selected in my cameras configurations.

2019-04-12%2010_33_20-Window

Single URL with digest/basic authentication selected in the cameras configuration.

  - platform: generic
    name: Camera1
    still_image_url: "http://uid:[email protected]/ISAPI/Streaming/Channels/101/picture"
    stream_source: "rtsp://uid:[email protected]:554/Streaming/Channels/101"

Separated out digest with digest authentication selected in the cameras configuration.

  - platform: generic
    name: Camera1
    still_image_url: "http://192.168.0.10/ISAPI/Streaming/Channels/101/picture"
    stream_source: "rtsp://uid:[email protected]:554/Streaming/Channels/101"
    username: uid
    password: pass
    authentication: digest
1 Like

Just updated to the RTSP enabled firmware from Wyze on a couple of Wyzecam 2.0ā€™s. Havenā€™t found a still image but streaming seems to work well with a 5-10 second delay.

Might be worth mentioning my hardware. No-name Mini PC with a J4105 and 4Gb RAM. Streaming barely moves the needle in CPU usage

  - platform: generic
    name: Front Door Camera
    still_image_url: https://192.168.0.10/jpg/image.jpg
    stream_source: rtsp://user:[email protected]/live
3 Likes

I have looked but I havenā€™t found the info, someone has achieved to make it work with a xiaomi dafang ARM hacked with https://github.com/samtap/fang-hacks?

Cross referencing the fanghacks github you linked it looks like the stream url is the same as the dafang info listed in the OP op of the thread, rtsp://device-ip/unicast though Iā€™m less clear on whether you need to specify port 8554. Maybe try with and without. Not sure about still image but, again, you might try the dafang settings as a starting point.

I have triyed, but the main problem that I have encountered is that I am unable to have the still_image. as far as I know, that hack only allows to have the image url or the rtsp stream, but not both at same time. I ask just in cause that someone have done something, but I think it canā€™t be used at this moment :frowning: