Binding Request: Synology Surveillance Station

You’d need to download the latest release from the project page, which is 2.3 compatible, and remove the old file. As the binding is not integrated into openHAB distribution, there is no auto-update available.

Thanks

So far things are great, but it seems the “Live feed URI (mjpeg over http)” URL changes and is not being picked up by the binding. Is there some sort of polling for this? the StmKey portion of the URL changes quite frequently.

Hi David! Thanks for reporting this issue, please check the newest release on GitHub for a fix.

@Pavion really useful binding, and saves going to DS Cam for quick every day tasks.

Enabling, recording, static images all work fine. One thing I can’t get working in Basic UI (web and iOS) is the mjpeg and rtsp channels.

Using Firefox (or Chrome) on WIn10, (nothing display in iOS OH app)

The mjpeg one gives me this
image

The rtsp one gives me this
image

my items are:

String KitchenCam_SSmjpegurl { channel="synologysurveillancestation:camera:calxxx:10:common#live-uri-mjpeg-http"}
String KitchenCam_SSrtspurl { channel="synologysurveillancestation:camera:calxxx:10:common#live-uri-rtsp"}

*cal number changed for this post

my sitemap is:

Video item=KitchenCam_SSmjpegurl url="[%s]" encoding="mjpeg"
Video item=KitchenCam_SSrtspurl url="[%s]" encoding="mjpeg"  //not sure what encoding to use here

Any ideas?

Hi Ramz and thank you for your feedback!

Unfortunately I can’t see what your issue could be at the first glance.
Your items and sitemap seem to be OK, perhaps there is an issue with your stream.
Please check whether your stream URIs can be played with a standalone video player (e.g. VLC).
You can also try to omit the encoding="mjpeg" part completely, this way openHAB will attempt to automatically select the correct format.
Also please note, that if you’re not using the latest release, you may run into issue with mjpeg URI: StmKey may need to be escaped with quotes " " to work properly. In this case please update the binding.

/webapi/entry.cgi?api=SYNO.SurveillanceStation.Stream.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=1&StmKey="dc3d46d2deaeaf1472e5d713f4164d6d"

Best regards
Pav

thanks for the reply and sorry about the delay getting back to you: your binding motivated me to check out the SS motion detection settings and having the cameras enabled but not recording (previously they were set to off or continuous recording when I was out). What a palava! The settings to get this working how I wanted were in several places especially if I didn’t want a flood of emails. I finally got my head around it and have them setup how I want and stable so I’m leaving as is for a couple of days to see the results. So I’ll update your binding and try again the video streaming on the weekend and report back. I was getting jetty errors and other critical camera errors while playing around so the period of stability will allow a new baseline. But I’ll be back (here) later :slight_smile:

Hi @Pavion

First of all thanks for all the work on this binding.
I tested this binding a while ago and liked it, but never played around with it too much.

Now, however, I have a bit more time at my hands - and unfortunately, now the binding doesn’t seem to work anymore.

I am on 2.4 snapshot (just upgraded some minutes ago) and downloaded your last version of the binding. Stopped OH, removed the old jar, put in the new jar and started OH again.
On the DS side I am on 8.1.5.-5513

My diskstation is immediately found in the inbox with your binding - however, when I fill in my credentials, I get a communication error, Errorcode 0, regardless what I try: http/https, I even tried using the admin credentials instead of the user I have set up - no changes.
Any idea what might be wrong or how I could find out what is wrong?

Thx
Patrick

Hi Patrick!

Please check your log file for any errors coming from the binding. You can also check the binding state from the Karaf console with:

bundle:list | grep Syno

There should be only one entry with an ID xxx, revision a29 and Active state. If you have more, you might need to uninstall them first with:

bundle:uninstall xxx

As for credentials: you can enter any credentials but the corresponding user must have an access to the Surveillance Station. Any user, who is able to access Web GUI and manipulate configuration, should suffice.

I just made a clean 2.4.0-SNAPSHOT installation and copied the binding into /addon.
As it seems, there is an issue with SNAPSHOT as one of the required modules is not installed by default. This could not be your case though, as you’d see no Thing at all then.

Still, in case someone else encounters the same problem: the binding requires esh.tp-jupnp to work. You can check, whether this library is installed with from Karaf with:

feature:list | grep jupnp

It’s either Started or Uninstalled. In the latest case the library can be installed with:

feature:install esh.tp-jupnp

After installation the binding should run as intended.

If you’re able to solve your issue, please write back your solution.

Best regards
Pav

Hi Pav

thanks - that did it, apparently the “old” version of your binding was still installed and active, even though I replaced it in the addons-folder.

I now uninstalled the old version (which set the new version active) and not only is the diskstation now in state “online”, but all of my cams immediately show up in the inbox.

Thx!
Patrick

Hi

I have tried to install this bindeing on my OpehHAB 2.3 Raspberry Pi system. After installling the Synology binding my Synology installation is discovered but after I add it as a Thing the thing get the status "Status: UNINITIALIZED - BRIDGE_UNINITIALIZED "
In the logfile I find this error:

2018-08-10 14:58:46.892 [WARN ] [eclipse.jetty.servlet.ServletHandler] -
javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: java.lang.IncompatibleClassChangeError: Expected static field org.openhab.binding.synologysurveillancestation.internal.discovery.BridgeDiscoveryService.scheduler

Any idea on who to solve this issue?

Best regards

/Keld

Hi Keld, it seems, as if you’re trying to use an older release. Please check your release version and whether you have just one copy of the binding using commands from post #169 (just above). If not, please consider using the latest release from the project page. Best regards. Pav.

Hi Pavion

Thanks for your very quick reply

I think I do have the latest version. anyway I downloaded the one from 10/7 . v29 and tried again. Same result.

The binding check showed nothing unexpected

openhab> bundle:list | grep Syno
233 │ Active │ 80 │ 2.3.0.a29 │ SynologySurveillanceStation Binding
openhab> feature:list | grep jupnp
esh-tp-jupnp │ 0.10.0.oh230 │ │ Started │ distro-2.3.0 │ UPnP/DLNA library for Java

My installation is the 2.3 stable image that can be downloaded.

Best regards
/Keld

Sadly I’m not able to reproduce your issue. There was no exception with a fresh downloaded 2.3 release. Still I’ve found similar issues with other bindings on Google but no real solution yet. This release was compiled against 2.4.0 and should be future-proof.

As the binding is Active and alive you could try to skip PaperUI and use a .things-file instead: this might bypass the discovery after restart. Example here.

If even this fails, you may try (if not already) a clean install on your device (e.g. another volume), it would be interesting to know. If you have any additional information or more log output, please send it to me or post on Github (issue #28). Otherwise I don’t see a solution and must disappoint you for now. Should it be ever traced back and fixed I’d still be glad to welcome you back :slight_smile:

I am not getting motion events from my camera. I have the channel enabled, and linked to an item. I also have the refresh interval set to 3. I have the synology sending me emails when motion is detected, so I know it is working on the synology side.

Not sure what else I should look for to try and troubleshoot this.

Hi David. Is it a new issue? I guess you’re using the binding for some time now.
Are you perhaps using the new Beta of Surveillance Station?
Please check your event / openhab log at the same time you’ve received your mail from Surveillance Station if there are any suspicious entries.

I just recently tried to enable the motion channel, so new to me. But been running for a few months with no issues.

The weird thing is I see nothing in the log. No error, nothing. I did configure through paper UI, not through an items file if that matters.

is motion working properly in surveillance station?

Yes motion is working correctly in surveillance station. It sends me an email every time.

The Binding is awsome!
I like the motion detection for presence verification.

How about sending pictures (snapshots) per telegram?
I usually send local images by:
sendTelegramPhoto(“OH_Bot”, “http://192.168.178.50:8080/static/motion_d.jpg”, "Bewegung detektiert!\n Zeitpunkt: " + Dome_Motion.state)

How does it work with the snapshot item?

If I check the snapshot image item I get with

Syn_Tele_Snap.state.toString
raw type (image/jpeg): 236095 bytes

So how can I send the image itself?

1 Like