Synology Surveillance Station Binding

Hi!
I just installed this binding and everything worked as intended. I have a DS218+ running surveillance station. I choose to let the motion detection running on the NAS, maybe this leads to my problem.

Can the motion channel trigger this way? However, it does not, when the NAS detects a motion.

TY :wink:

Hi @Beasty
I don’t quite understand your issue. This binding should trigger motion events (only) if Surveillance Station is set to motion detection and detects it. If it’s not the case, please check whether
your events refresh rate is greater than zero and you’re using the latest release from the Marketplace or the project page.
BR Pav

Hi Pav, it seems that after upgrade to OH 3.4.0 the Stream refresh only every 10 seconds.

I also tested with the SnapShot but the refresh every X seconds is also ignored.

Live feed URI (mjpeg over http)

synologysurveillancestation:camera:5f0ed15f9f:5:common#live-uri-mjpeg-http (String)

Ahh, this was ist. Refresh rate… :wink:
TY so much!

Hi,
I have 2 factor Auth enabled on my NAS, is this supported by bindind? I got Error 403 Unhautorized

THanks

Hi @marcolino7
You’ll probably need to create a dedicated Surveillance Station user for this purpose.

1 Like

Just did and work.
but I have Synology NAS exposed and all of my user have 2Factor Auth.

Marco

Well sorry, there is no 2FA support but you can contribute if you wish :slight_smile:
Still, it should be enough to create a Surveillance Station user (not the DSM user!) with spectator rights only and very strong password for this binding to function. It seems to be a rather small exposure to me but I’m not an expert with security issues.

Hi,
i am trying to get the mjpeg streams into my Hab Panel. When i copy the URL from the string item i linked to the “live feed url” channel, it works for some time. However, it seems that this URL changes after some time which results in a blank image in Hab Panel.
Is this a normal behavior of this binding? How can i fix this?

Hi @Beasty,
right click on Camera → share Stream Path → validity: choose “permanent”.

Screenshot is unfortunately in German:

@April_Wexler
Oh my… this might help, haha :wink:

Allow me one other question. So far i am only successfull, when i choose MJPEG in surveillance station, which reduces the image quality a lot.
I dont get the rtsp://… to work in HabPanel. I am using the Camera Clickable widget.
Do you have another good hint?

btw. me german, too :wink:

Hi @Beasty,
same challenge here: I was not able to add rtsp stream to HABpanel.
AFAIK the rtsp needs to be converted with e.g. FFmpeg. I am running OH in a docker container on Synology NAS but FFmpeg is not available within OH docker image.
And if installed in a separate docker container the performance was (for me) not as expected or reliable (stream stopped sometimes).
So I am fine with the reduced quality as long the stream is coming reliable to by wall mounted iPad HabPanel. The good quality is recorded 7x24 on my NAS - the iPad view is reduced quality.
If you find a better solution I will be happy to hear/read this from you.

1 Like

Hi @Pavion, @nibi79
first of all thanks for your work as last year I was getting crazy trying to connect HomeMode with OH3 via HTTP request.

Unfortunately I recently had to reinstall OH and despite last time the binding was working like charm, now when I add the bridge thing it goes online, but as soon as I link a channel I see the bridge going offline.
If I remove the link and re-initialise the bridge, it goes back online.

Checking events.log I see this:

2023-11-11 00:13:32.322 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘synologysurveillancestation:station:2bab67c05d’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Thread HomeMode

And in OpenHAB.log this:

2023-11-11 00:18:14.309 [ERROR] [tation.internal.thread.SynoApiThread] - DeviceId: Bridge; Thread: HomeMode; Attempt to reconnect failed
2023-11-11 00:18:19.313 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {“error”:{“code”:119},“success”:false}
2023-11-11 00:18:19.851 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {“error”:{“code”:407},“success”:false}

Can it be related to some setting in surveillance station?

Thanks in advance for your help!!

Hi @Green93
It looks like you had an issue with your credentials (119) so the Station blacklisted you (407).
Please check your credentials and consider to create a dedicated Surveillance Station user just for this Binding. Also be aware, based on your settings your OH might have been blacklisted by DSM forever so you might need to manually re-enable it.

If it still doesn’t help, some common tips:

  • If you’re using OH4 now, you might try to download a new release from GitHub.
    Releases · nibi79/synologysurveillancestation · GitHub
    (actually no major changes I can remember so I haven’t ever uploaded it to the Marketplace)

  • check whether you have but one (latest) release active (bundle:list | grep Syno)

  • recreate Bridge using non-default Thing name or try using text file configuration

  • enable debug mode log:set DEBUG org.openhab.binding.synologysurveillancestation and PM me a larger excerpt (note, if you just keep getting 407, you have to get rid of it first)

BR
Pav

Hi together,
the binding works great for me. A small annoyance, for which I would appreciate any suggestion: To activate it via a KNX wall switch I have HomeMode connected to my KNX installation as follows

Switch Surveillance_HomeMode "Home Mode" {channel="synologysurveillancestation:station:diskstation:homemode", channel="knx:device:bridge:OG:KNX_HomeMode"}

This works well, however, OpenHab posts the HomeMode status on the KNX bus about every 2-3 seconds. How can I can this to, e.g., 60 seconds?

Thanks for any suggestion.
BR Thomas

I’d assume your KNX updates with the event refresh rate of the Bridge Thing. Increasing this rate should solve this issue. You might also try to create a rule to update your KNX on mode change only.

Hi @Pavion
thanks for your tips :pray: but unfortunately still no luck :face_exhaling:
The bridge goes online when I create the thing so credentials should be ok. (see image below).

I tried to give a custom ID and create a dedicated user on Surveillance Station but still, when I link the Home Mode Channel it goes offline straight away.
As soon as I unlink the channel and I reinitialize the bridge (click on “pause” button then “play”), It goes online again.

I also tried using the last release but nothing changed, any other tips before I get crazy? :laughing:

BR
Green

1 Like

Hi Pavion,

do you maybe have an update to Green93’ Topic?
I have exactly the same issue und tried almost everything so far with no luck.
openhab 4.1.1 → Surveillance Station Binding 3.3.0.202207031140
Everything seemt to work fine and remains “online”.
As soon as I link a camera-channel to an Item the camera turn offline → “COMMUNICATION_ERROR”

Log:
2024-03-07 16:44:40.909 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:aa2109a641' changed from OFFLINE (COMMUNICATION_ERROR): Thread Event to ONLINE
2024-03-07 16:44:40.916 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:aa2109a641' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Thread Event

Hi @markeese

Actually, I couldn’t reproduce his issue, so I couldn’t offer any update.

I’ve just reinstalled a fresh 4.1.0-SNAPSHOT, installed the binding from the marketplace, entered my IP and credentials. The bridge went online. The camera was found automatically and put into inbox. Camera added and linked Snapshot-Channel as well as HomeMode-Channel of the Bridge. Both are functioning without any issue.

Could you perhaps provide (PM me) some debug log (as shown in #54) or some additional information on your case?

BR
Pav

Hi Pavion,

please find the excerpt from the log file for the surveillance station below.
Is it possible that the problem only relates to connected Synology cameras?
The cameras all require their own authentication in Surveillance Station - They have their own password.
My thought is that the path through the bridge and the station to the camera is disrupted by this.
What do you think?

2024-03-08 15:33:24.555 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from OFFLINE (COMMUNICATION_ERROR): Thread Event to UNINITIALIZED
2024-03-08 15:33:32.611 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2024-03-08 15:33:40.534 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-03-08 15:33:40.577 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from INITIALIZING to ONLINE
2024-03-08 15:33:40.580 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Thread Event
2024-03-08 15:33:50.635 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from OFFLINE (COMMUNICATION_ERROR): Thread Event to UNINITIALIZED
2024-03-08 15:33:54.662 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from UNINITIALIZED to UNINITIALIZED (DISABLED)
2024-03-08 15:35:17.956 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from UNINITIALIZED (DISABLED) to INITIALIZING
2024-03-08 15:35:18.003 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from INITIALIZING to ONLINE
2024-03-08 15:35:18.011 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Thread Event
2024-03-08 15:35:23.990 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from OFFLINE (COMMUNICATION_ERROR): Thread Event to ONLINE
2024-03-08 15:35:23.995 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Thread Event
2024-03-08 15:36:32.611 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from OFFLINE (COMMUNICATION_ERROR): Thread Event to REMOVING
2024-03-08 15:36:32.617 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from REMOVING to REMOVED
2024-03-08 15:36:32.633 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from REMOVED to UNINITIALIZED
2024-03-08 15:36:36.661 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:a0984cccb5' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2024-03-08 15:38:56.459 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:c18b5a5fa2' changed from UNINITIALIZED to INITIALIZING
2024-03-08 15:38:56.496 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:c18b5a5fa2' changed from INITIALIZING to ONLINE
2024-03-08 15:40:05.454 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KameraTest' changed from NULL to OFF
2024-03-08 15:40:23.528 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:camera:b78548012d:c18b5a5fa2' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Thread Event

2024-03-08 16:25:20.380 [DEBUG] [ncestation.handler.SynoCameraHandler] - Initialize thing: Kamera der Surveillance Station::synologysurveillancestation:camera:d11c1d2eda
2024-03-08 16:25:21.305 [DEBUG] [ternal.webapi.request.SynoApiRequest] - URI: http://192.168.14.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&version=8&method=List&_sid=&blIncludeDeletedCam=false&blPrivilege=false&privCamType=true&blFromCamList=true&streamInfo=true&basic=true&cameraIds=
2024-03-08 16:25:21.312 [ERROR] [nal.discovery.CameraDiscoveryService] - Possible SSL certificate issue, please consider using http or enabling SSL bypass
2024-03-08 16:25:21.593 [DEBUG] [tation.internal.thread.SynoApiThread] - Thread Event tick
2024-03-08 16:25:21.595 [DEBUG] [ternal.webapi.request.SynoApiRequest] - URI: http://192.168.14.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Event&version=5&method=List&_sid=&reason=2&blIncludeSnapshot=false&limit=1&cameraIds=d11c1d2eda
2024-03-08 16:25:32.987 [DEBUG] [tation.internal.thread.SynoApiThread] - Thread Event tick
2024-03-08 16:25:32.992 [DEBUG] [ternal.webapi.request.SynoApiRequest] - URI: http://192.168.14.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Event&version=5&method=List&_sid=&reason=2&blIncludeSnapshot=false&limit=1&cameraIds=d11c1d2eda
2024-03-08 16:25:43.647 [DEBUG] [tation.internal.thread.SynoApiThread] - Thread Event tick
2024-03-08 16:25:43.650 [DEBUG] [ternal.webapi.request.SynoApiRequest] - URI: http://192.168.14.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Event&version=5&method=List&_sid=&reason=2&blIncludeSnapshot=false&limit=1&cameraIds=d11c1d2eda
2024-03-08 16:25:46.654 [DEBUG] [tation.internal.thread.SynoApiThread] - Thread Event tick