Mine works using the picture function of the camera. HA refreshes the picture every 10 seconds if you havent highlighted the camera or every 1 second if you have it maximized.
- platform: generic
still_image_url: http://CAMERAIP:80/Streaming/channels/1/picture
name: Driveway
username: *****
password: *******
1 Like
@dennisation ,
Is there a way to display Hikvision Live Stream in HASS without the 10sec delay?
Thanks
arsaboo
(Arsaboo)
April 21, 2017, 6:43pm
10
Use the following config:
camera:
- platform: generic
still_image_url: http://USER:[email protected] /ISAPI/Streaming/channels/101/picture
Replace the IP address of your camera. It updates almost every second.
Thanks for this! I noticed there’s still some delay. Could it be that the HA dashboard doesn’t refresh every sec?
Still the same.
It only updates every second if you click on the image.
arsaboo
(Arsaboo)
April 23, 2017, 4:38pm
13
Yes, every second is the expected behavior. The image updates every second.
In the default view it only updates every 10secs.
If you click on the image, only then it updates every 1sec.
arsaboo
(Arsaboo)
April 23, 2017, 6:03pm
15
Yes…that seems about right. Remember, HA is not a video surveillance system.
I understand that.
I guess my initial question should have been, can HASS display video streams in realtime
mezz64
April 26, 2017, 3:32am
18
@Coolie1101 HASS can absolutely display a realtime video stream, but there are some caveats. You can only do it in the pop-up window (main page display is limited to a 10 second refresh) and you need to configure it as a “mjpeg” camera type, not generic.
For a hikvision camera I use a URL syntax like below:
camera:
platform: mjpeg
mjpeg_url: http://X.X.X.X/Streaming/Channels/2/preview
username: user
password: pass
You then need to make sure you have the substream set to “MJPEG” in your camera settings like the in the snapshot below.
2 Likes
That’s exactly what I’m getting now with it configured as Generic, and the sub-stream set to H.264.
In the pop-up window it refreshes every second which is not really real-time.
I’ll try your recommendation and report back.
That worked.
Any reason why it can’t be configured to use the H.264 stream?
Is this configuration info available somewhere?
My cameras have built in mic, any way to get the audio stream as well?
1 Like
mezz64
April 26, 2017, 6:55pm
22
HASS and most browsers only have native support for displaying mjpeg streams. H.264 gets trickier in universal support.
No audio support as far as i’m aware on any of the camera platforms. There may be something in FFMpeg if you want to look through those docs.
I’m getting the following since I added the camera as you suggested, any ideas?
17-04-27 01:10:03 WARNING (Thread-3) [requests.packages.urllib3.connectionpool] Failed to parse headers (url=http://192.168.200.54:80/Streaming/Channels/2/preview): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 398, in _make_request
assert_header_parsing(httplib_response.msg)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/util/response.py”, line 66, in assert_header_parsing
raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
requests.packages.urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
17-04-27 01:10:13 WARNING (Thread-8) [requests.packages.urllib3.connectionpool] Failed to parse headers (url=http://192.168.200.54:80/Streaming/Channels/2/preview): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 398, in _make_request
assert_header_parsing(httplib_response.msg)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/util/response.py”, line 66, in assert_header_parsing
raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
requests.packages.urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
17-04-27 01:10:23 WARNING (Thread-9) [requests.packages.urllib3.connectionpool] Failed to parse headers (url=http://192.168.200.54:80/Streaming/Channels/2/preview): [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/connectionpool.py”, line 398, in _make_request
assert_header_parsing(httplib_response.msg)
File “/srv/homeassistant/lib/python3.4/site-packages/requests/packages/urllib3/util/response.py”, line 66, in assert_header_parsing
raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
requests.packages.urllib3.exceptions.HeaderParsingError: [StartBoundaryNotFoundDefect(), MultipartInvariantViolationDefect()], unparsed data: ‘’
mezz64
April 27, 2017, 2:57pm
25
That’s a known bug in the urllib3 library. You can suppress the log messages (they are harmless) by adding this line under your logger/logs section in your configuration.yaml.
requests.packages.urllib3: critical
Stewface
(Stewart)
May 2, 2017, 2:55am
26
I got my camera working with the above config - works a treat
arsaboo
(Arsaboo)
May 22, 2017, 5:09pm
27
Is it possible to manually trigger recording? I am using Hikvision cameras with Synology Surveillance Station (SS). Neat thing about SS is that it can automatically pre-record a few seconds (can be configured) before the actual trigger.
There is a post here that triggers manual recording, but it will be nice to get something integrated in the pyhik library.