Home Assistant release with the issue:
0.86.3
Last working Home Assistant release (if known):
0.85
Operating environment (Hass.io/Docker/Windows/etc.):
Ubuntu 18.04 server HA running in Docker
Component/platform:
https://www.home-assistant.io/components/camera.synology/
Description of problem:
Snapshots of cameras are shown in the preview, but when opening the camera to view the live view it doesn't every show. Same issue in legacy UI.
Problem-relevant configuration.yaml
entries and (fill out even if it seems unimportant):
camera:
- platform: synology
url: IP_ADDRESS_OF_SYNOLOGY_NAS
username: YOUR_USERNAME
password: YOUR_PASSWORD
Traceback (if applicable):
Additional information:
Not seeing any errors in the logs
Can confirm this.....not working here as well. Unfortunately, nothing in the logs either. The camera thumbnails update every 10 seconds, but when I click a camera (after about 10 seconds), I see
Having the exact same problem, I am using synology for five of my cameras which until 0.86 would show live preview when you click on the preview pane. I am running HA on Pi3B+ and the problem exists on both lovelace and legacy UI. Please advise if there is any update on this.
I tried to debug what is going on and here's what I see in Chrome dev tools:
The URL that gives the 504 timeout is
https://bla.duckdns.org/api/camera_proxy_stream/camera.backyard?token=bd6548df20c13c83ae7469d0a661974ea74c89913f7b823a703eb8e49f57dc2b
However, that URL is incorrect. The correct URL (based on states) and that works in a browser is:
The difference essentially is that the incorrect url uses camera_proxy_stream
instead of camera_proxy
Based on the above my issue #20301 is also working (removing the _stream) from the url
EDIT: this doesn't auto refresh and seems to be a static image until you manually reload. So the stream probably has a use/reason.
@tr1plus is right, the _stream
is for the streaming endpoint.
If a 504 is raised, it means that Home Assistant was unable to connect to the MJPEG stream from the camera.
No, the stream refreshes when you refresh the browser page @tr1plus
as mentioned by balloob it is not a stream in that case. It is the static image that we are able to see in the UI
Great debug for this, but I am sure I am missing something, am I able to fix this somehow or will there have to be update to hass for this?
running 86.3 here, no issues with stream (synology platform)
the static image is shown in lovelace, if i click on the camera i get the stream, its slow, but it was always slow, it refreshes like every 1-2 secs, not an actual fluent stream , but i dont have an error
running 86.3 here, no issues with stream (synology platform)
the static image is shown in lovelace, if i click on the camera i get the stream, its slow, but it was always slow, it refreshes like every 1-2 secs, not an actual fluent stream , but i dont have an error
I wonder if a re-discovery of Synology config would help? delete things, add again, etc...?
never need to do it here
here is my config, it maybe helps
configuration:
camera:
- platform: synology
url: https://192.168.0.15:6003
username: !secret synology_cam_user
password: !secret synology_cam_pass
verify_ssl: false
framerate : 15
lovelace:
- title: Camera
icon: mdi:cctv
cards:
- type: picture-entity
title: Eetkamer
entity: camera.eetkamer
camera_image: camera.eetkamer
show_info: true
......
Only thing that has changed since last release that might impact it is #19957 . The url being different is a red herring, it is working as intended.
never need to do it here
here is my config, it maybe helps
configuration:camera: - platform: synology url: https://192.168.0.15:6003 username: !secret synology_cam_user password: !secret synology_cam_pass verify_ssl: false framerate : 15
lovelace:
- title: Camera icon: mdi:cctv cards: - type: picture-entity title: Eetkamer entity: camera.eetkamer camera_image: camera.eetkamer show_info: true
......
Thanks, my config is exactly this but no workie. Let me go through a re-discovery/syno integration.
Only thing that has changed since last release that might impact it is #19957 . The url being different is a red herring, it is working as intended.
Sorry how would #19957 affect this and is there a remedy?
HA uses aiohttp to obtain the image and 3.5.3 may have broken something. That is just conjecture at the moment and someone will have to confirm that.
This isn't an HA issue. I downgraded to the previous version of HA and the one before that and I was still having the issue. Did some more digging and found this up-to-date doc on Synology's API https://global.download.synology.com/download/Document/DeveloperGuide/Surveillance_Station_Web_API_v2.8.pdf
The change log shows that they removed the Streaming API that we were using. I have opened an issue with the library owner to have them check it out. https://github.com/snjoetw/py-synology/issues/9
Do why is it still working on my end? Maybe because I didn't upgrade the latest SS version? What SS version are you running?
Do why is it still working on my end? Maybe because I didn't upgrade the latest SS version? What SS version are you running?
Good point and now that I think about it I did Synology SS upgrade at about the same time as new hass. I am running 8.2.3-5828.
I am 1 version behind, 8.2.2.5766
I hope that the SS upgrade doesn't break those streams, since I am also using them for my alarm system
Then I am stuck with the SS version I am now on
In worst case scenario, you could enable rtsp stream on your Synology, and access those from HA
In worst case scenario, you could enable rtsp stream on your Synology, and access those from HA
Ahh, good point. I think I am going to try to downgrade the one version down for SS which is where you at. I have never downgraded and know how to do it so let's see how much of my camera stuff is still there :). Standby I will report back soon.
Ok, interested too
Ok, interested too
Bingo! Yes, sir, back and working again. So the change in Synology Surveillance Station to 8.2.3-5828 has that change in API identified by w1ll1am23 which clearly causes this. I did a downgrade to 8.2.2.5766 and all good. The downgrade wasn't that bad, tell it to keep all your config and license files then download from Synology the correction version of SS based on your device type and do a manual install. The only thing it did was had the wrong password for all my cameras, I set those and everything is back and working with HA as expected.
Interesting, ok so we need togo the rtsp way now, if we want to update SS :(
Or alternatives?
Interesting, ok so we need togo the rtsp way now, if we want to update SS :(
Right, not sure how to do that, would have to figure it out. Right now the SS update did have some nice enhancements but I can do without until all this gets resolved. All but one of my cameras in HA are used via SS so the simplicity of this integration is nice.
If you're up for the task, here is a prototype to convert rtsp streams and get them ready for the browser https://github.com/home-assistant/home-assistant/tree/ffmpeg-streams
It needs a bunch more work. There is also an architecture issue about ffmpeg that will solve this.
Please open a PR for the docs to mention the firmware that breaks it.
Hmm, I am not a developer, not sure if I can help
If you're up for the task, here is a prototype to convert rtsp streams and get them ready for the browser https://github.com/home-assistant/home-assistant/tree/ffmpeg-streams
It needs a bunch more work. There is also an architecture issue about ffmpeg that will solve this.
Please open a PR for the docs to mention the firmware that breaks it.
Course now that this is back to normal (synology video) CPU seems much higher than normal, I would need to go back much further in time to see what it was when this broke as I don't recall. I am running HA on Pi-3b+. You can see the uptick since I resolved this.
Ah, there were CPU issues on 8.2.2 ? Never noticed ;)
I am running Synology on an esxi server with Xeon processor ;)
Ah, there were CPU issues on 8.2.2 ? Never noticed ;)
I am running Synology on an esxi server with Xeon processor ;)
I don't recall there being any, I remember CPU usually around the 10-12%.
Ah ok, well, there is indeed something about CPU issues according to release notes, but in older versions
@balloob Added a note to docs https://github.com/home-assistant/home-assistant.io/pull/8358
Also, wondering if this deserves a blog post as you did for Nest and Logitech.
so , whats an alternative now? RTSP to synology seems to suck, no live feed ?
tried this
ffmpeg:
ffmpeg_bin: /usr/bin/ffmpeg
camera:
- platform: ffmpeg
input: -rtsp_transport tcp -i rtsp://syno:[email protected]:554/Sms=1.unicast
extra_arguments: -pred 1 -q:v 2
name: test1
get this in log :
2019-01-31 19:22:54 WARNING (MainThread) [haffmpeg.core] Timeout while waiting of FFmpeg
2019-01-31 19:23:20 WARNING (MainThread) [haffmpeg.tools] Timeout reading image.
@pergolafabio Did you try changing the Streaming information source?
doesnt make any differnce
I reached out to Synology via a support ticket and asked what happened, they said to get live streams the only option is to use RTSP which I replied back with that "RTSP streams are choppy" and the webapi approach available on previous versions was not. They stated that they didn't know why, but the only way to get live streams now is via the RTSP streams.
There will be support soon for RTSP 馃憤
Indeed , rtsp itself is not choppy, I am using them for another monitoring too, it's just indeed choppy on HA
There will be support soon for RTSP 馃憤
87.1 ? :)
There will be support soon for RTSP 馃憤
is this the fix in 87.0 for rtsp ? for slow streaming intervals we have now
i see in rls note
Fix ffmpeg v4 stream issue ...
there is another method in SS system to retrieve the stream
https://url:port/webapi/entry.cgi?api="SYNO.SurveillanceStation.Camera"&method="GetLiveViewPath"&version=9&_sid=[SID]&idList=[CamNo]
it returns a JSON including URLs for mjpeg, rtsp etc
maybe someone can try it? i am still on 8.2.2
(subscribing) I have this same issue
The same here. And I also figured out that it is related to a recent SS package update, not any HA bug. Hoping to see a fix soon
i created a thread on synology forum, verry interesting reply today
seems they indeed removed the documentation, but the API should still work...
they have a new stream path now, so the HA code should be changed, but who can do that??
synology forum :
https://community.synology.com/forum/3/post/123094?reply=397361
reply :
@pergola_fabio0183 These APIs are still alive there in SS8.2.3. They are just removed from the document and are not recommended to use due to many aspects including efficiency consideration. And since they are still work, we didn't mention them in the release note. However, you can still use them for 3rd-party integration, but we will not maintain them since they are only used by really older version of DS cam.
If you get any problem using these APIs, you can check the usage flow or check the error code for more specific reason.
The recommended alternative for live view is first using GetLiveViewPath method, and then play the returned rtsp/http path. (You can use 3rd-party player, such as VLC, to test the path)
Following... Just noticed I could no-longer open the live views.
Yes , it'd being addressed by developer now...
Also more info here about change in Synology platform
https://community.synology.com/forum/3/post/123094?reply=397574
Thought I was going mad. Recently updated my SS too and lost my live stream but though it was a Lovelace issue. Watching with interest for a fix.
N.B The update to SS 8.2.3-5828 fixes the problem with sending webhooks to Home Assistant so I'm reluctant to roll back.
Any idea if someone is working on this already? When (more less) can we expect a fix for this issue in HA?
Lack of this integration really hurts. Now my HA is not anymore a all-in-one-place-solution
dont think its already in progress
but if you also read my thread that i posted on synology forum, it seems a bug after all in 8.2.3 , and will be fixed in 8.2.x
BUT, they also said, that the component that py-synology is using, should be changed anyway, since its less secure
so when 8.2.x is out it should work again , but its better that py-synology is changed
My fingers are crossed that this gets fixed and support for the new stream component in 0.90 gets added.
Came her to say the same thing, this is also not working for me either- I just happened to dig into it this morning after it's been impacting me for a few weeks, glad to see the community is already aware!
Edit: after some additional reserach it appears that this was a bug (or a removed feature that really got the Synology SS community upset, and it should be fixed in SS 8.2.3.5829
If you read the community forum posted by @brent20 you will see that the developer has provided a preview of the latest version that has the fix. It solves the problem for me. I can live stream all of my cameras again. You can download SS 8.2.3.5829 here https://supfiles.synology.com/sharing/oXkk1MptJ using password SYNO0311
As this appears to be an issue with the Synology firmware and not Home Assistant itself, I'm going to close this issue. If I made a poor judgement, just let me know and i'll open it right back up 馃樃
I know this was closed, but has there been any progress on a solution in the last month? I'd prefer not to have to downgrade my synology as it's brand new and I'm not sure how it would like being downgraded to a version below what it was shipped with..
Just upgrade that surveillance with the patch from Synology, scroll 3 posts back
Whoops totally missed that tidbit. Thanks!
No problem ;)
https://www.synology.com/releaseNote/SurveillanceStation
Do anybody here this new version 8.2.4-5847?
I am currently using that version. Camera's are working for me in HA.
Another update, 8.2.5-5850. Still working? I can't get it to work:
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='192.168.178.2', port=5001): Read timed out. (read timeout=5)
If this is my local problem you should update the docs page: https://www.home-assistant.io/components/synology/
Most helpful comment
This isn't an HA issue. I downgraded to the previous version of HA and the one before that and I was still having the issue. Did some more digging and found this up-to-date doc on Synology's API https://global.download.synology.com/download/Document/DeveloperGuide/Surveillance_Station_Web_API_v2.8.pdf
The change log shows that they removed the Streaming API that we were using. I have opened an issue with the library owner to have them check it out. https://github.com/snjoetw/py-synology/issues/9