Closed raccettura closed 5 years ago
Hi @snjoetw When is the new release scheduled?
+1 to @GaryWes can a new release be tagged?
ok, can we already now use the home mode from this project?
sorry for the delay! I'm going to make a new release today
no sorry at all :) btw, did you have a look at the other issue with the new streampath? this py-snology is not working anymore with 8.2.3 or newer, they are going to drop the old method
Just did the release, thank you all!
@pergolafabio yep, let's discuss in that issue i instead
Closing this one
Will this be merged now in home assistent?
And also, how to use it in home assistant? :)
Thnx in advance
Will this be merged now in home assistent?
Im not sure if Home Assistant got a camera service for home mode - maybe an alarm component need to be created for the synology if you want to be able to use arm home / away on the cameras.
I pushed a new release with the on/off changes though so for now the supported functions in HA is on, off and motion enable/disable
ah ok, well, but i think indeed its enought if it will be exposed like a switch or something? so when this merged, we will see 2 switches? or am i wrrng?
but its not merged yet?
ah ok, well, but i think indeed its enought if it will be exposed like a switch or something? so when this merged, we will see 2 switches? or am i wrrng?
but its not merged yet?
Are you thinking about the home switch now? Im unsure about the compliance of HA of putting doing that, but maybe a binary switch could work.
The on / off is not merged yet, but its under review. I can check the binary switch option for home mode. Im not the one that is maintaining the synology component so dont want to step on any toes when it comes to how the component is working.
ah ok :)
np, binary switch offcourse also ok :)
thnx in advance already
ah ok :)
np, binary switch offcourse also ok :)
thnx in advance already
I added enable / disable home mode to the component. Im not sure if the solution is going to be approved as you get two new services in Home Assistant, but you could download the files from the pull request and add them to custom_components. After reboot you should have the services available in your Home Assistant for use in automations etc.
ah cool :, yes; i was following that PR , saw your progress how long does it normally takes to get approved?
also, i only need this one as a custom? right
camera/synology.py
Yeah just copy synology.py to config_folder/custom_components/camera/synology.py then it will override the builtin component.
I have no idea how long it would take to approve, but Im just using the custom component while waiting.
this one right? thats the modified one
are you running 0.88 releasse? because i think now you need to rename the custom components i should be now custom_components/synology/camera.py
ok, tested the custom one, seems to work i can now enable /disable home mode by this service : camera.enable_home_mode .... but is there also now a sensor visible? to see the actual state of home mode? the status?
ok, tested the custom one, seems to work i can now enable /disable home mode by this service : camera.enable_home_mode .... but is there also now a sensor visible? to see the actual state of home mode? the status?
Yes the 0.88 it should work fine with the "old" format, but you could change the path format if you want, should not affect the component.
I pushed a new version that exposes if home mode is enabled or not (on each camera) - in the attributes you will now see a field with "home_mode" that is true or false
yes i see it for each camera now but there is something wrong i see the state as recording now for each camera, while its not the case, something wrong now
also, you see indeed the home mode attribute for each camera, but actually, its just a global setting, not?
yes i see it for each camera now but there is something wrong i see the state as recording now for each camera, while its not the case, something wrong now
Could you check if you get the same issues with the original file? I know synology made some API changes lately, but im not personally using home/away mode and did not change any recording code. If its not the same issue on the old code I will check it tomorrow.
And yes it should be a global setting, this was just a quick fix since cameras could belong to different servers and it could be handy to see if that specific camera is covered by a home mode. I could make a global camera.synology state with global attributes pr server
no, the issue is with your last commit since you added the home_mode true/false if i load the previous one from 1 hour ago, where you just added the home mode service, its fine, then i see the cameras as streaming
ok, did test again, when i load your last version i see state as recording, not with the previous version without the attribute true/false
its only the state for each camera that is in recording state in HA but the cameras are not actually recording
its only the state for each camera that is in recording state in HA but the cameras are not actually recording
Try now with the latest release. Moved the home mode status to its own entity "camera.synology_home_mode" - hopefully it wont interfere with the recording status now
see it as seperate home mode now, but still recording state
see it as seperate home mode now, but still recording state
Could it be that you just updated the surveilance station as they removed the live stream API in the lastest release (https://www.home-assistant.io/components/camera.synology/) - I have tried with my old version and recording is not really coming from my code, but the API.
yes, i am running 8.2.3 , indeed the latest one with the changed api but this was like a week ago i only see now the recording state since you added the state of the home .... when you added only the service to set the home mode to on/off, then it was still fine
Okay will do some investigation. If it’s a problem for you, just delete the custom file and it should downgrade to stock so I guess no harm done
no problem at all for me, its just the state thats wrong :) , they dont record ... strange though, there is no much difference in your code when you added that state attribute , cant figure it out also ...
i think the other issue about the streaming method for live view is more important :) this is a bigger impact on HA community
i did also created a thread on forum synology about new api for videostream, also an employee from synology responded, that the SID is not used anymore, but now uses cookie instead but he also said, thats best to use the new stream api, since the cookie one will also be gone in future releases
@pergolafabio how are you? how do you manage to use this to enable and disable home mode? regards!
Hi, you need to load this for now as a custom component, still be small glitch though, you will see all your camera in recording state, while they are not actually recording
hy @alekslyse @snjoetw , any update on this? i think the "recording" state is the only issues left before it can be merged with HA?
also the videotream issus is still present , needs to be changed to the new API method
@pergolafabio Could you please try the latest version.
Remember to set your synology scheduler correctly as I tested several times now and this version does work with my cameras.
Also remember to wait 10-15 seconds before sending the service as HA would not update right away. It would update the recording status on the next check as is some seconds
Btw created a new pull request as the old one was a mess: https://github.com/home-assistant/home-assistant/pull/21757
yes, tested it, thats indeed better now they are back on streaming state, except one camera, but that was actually recording :)
so its indeed fixed :)
nice job
now just the videostream issue?
BTW, the videostream is only an issue on 8.2.3 , not on earlier versions
Yeah the videostream is another issue, but I dont think thats related to this pull request. I guess the API changed and need to be fixed in this repo, not HA?
Yes , indeed, its not a HA issue.. Synology changed API, and they gonna drop videostream, you need to use the new method....
The cameras from this repo, that we push to HA lack the ability now to open videostream :(
@pergolafabio
Now im not the one who is doing maintainance on this repo, but im thinking two things: 1, Fix the mpeg preprocessed stream for versions higher than when they changed the API
For me who use a Intel NUC to run hass I would prefer to use the rtsp stream and be able to have real streaming video in hass
Ah, yes, rtsp is indeed better, but I thought the rtsp component was not ready yet in HA todo fluent streaming
I also think the mpeg stream should be fixed anyway, don't think it's a huge change in code anyway
I have not tried the ffmpeg component in ha, but since its using the binary of the ffmpeg I would guess its not ha that decide that. Alternative would be to use an iframe with a stream or something if you really want to bypass any ha limitations. But its always possible to try the rtsp stream and see - im sure it would be better than the few frames we get from the mjpeg component.
I tried the rtsp before, I used the stream path from Synology... If I remember correctly it was also limited to frames only... Not 100% sure anymore... But it wasnt fluent, that I remember
Or it was frames or it was nothing at all
Looks like it might be possible to implement a switch for "home mode" in surveillance station. This would facilitate more complex operations to turn on/off the camera system based on home assistants automation. See: https://community.home-assistant.io/t/synology-surveillance-station-ip-camera/3552/98