Synology Surveillance Station Binding

Maybe I’m the only one, using a TC500 via Suveillance Station in openhab :crazy_face:

Strange… could you please recreate your Camera Thing either with ID 1 or 2 instead of f1d250ad6a:
synologysurveillancestation:camera:b3d6866041:2

I did that already after I have read your message. The result remains the same.

Do you know, how Green93 solved his problem. Maybe his would be the needed hint to the solution.

No, I hope he had… :confused:
@Green93 are you around? :slight_smile:

Have you already tried the ssl bypass option as suggested in the log? (OH restart might be needed)
You could also try to paste the first link from your log
http://192.168.14.5:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&version=8&method=List
in any browser, perhaps there is some additional output…

I’ll try and come back to you.
Bit first I go and have a beer now. I have one for you as well.

I’m on it already :stuck_out_tongue:

Hi Pavion,

your hint with checking the link put me on the right path.
The default IP address (5000) was not correct. I couldn’t figure it out because the binding thing always said ‘online’.
I entered a new port for the Surveillance Station in the DSM under applications and now everything works :slight_smile: Just so simple. Thank you for your great help. Maybe the beer helped a little too :wink:

1 Like

Hi Pavion,

Unfortunately, I still have a question. I’ve tried for a long time before, because I don’t want to annoy you too much, but I can’t get anywhere.
How is an intruder alarm triggered by the station in openhab?
Only the following entry is made in the event log every 3 seconds:

RESPONSE: {"data":{"events":[],"offset":0,"timestamp":"1710088518","total":0},"success":true}

Is that even possible?

Greeting
Markeese

Hi there, also unfortunately I can’t give you a direct answer.

I don’t know what is an intruder alarm. There are six event channels in this binding, they should be linked first or you won’t see them in the above API response. If your event is not triggering you might be able to make a workaround by creating a Surv.Station rule, which would then trigger a custom event.

Well… It might also be broken altogether. It’s years since I’ve tested it last time and the used API is deprecated since many years.

If you can’t reach your goal with tips above and are really needing it, with your help and some additional info I might look into it again.

BR
Pav

Just upgraded my Synology DS1815 to the latest version of Survalence Station 9.2.0-11289.

I now see errors in the logs for all cameras I have set up in Openhab3.

2024-04-06 14:18:23.738 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}
2024-04-06 14:18:25.796 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}
2024-04-06 14:18:33.152 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}
2024-04-06 14:18:35.250 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}
2024-04-06 14:18:43.685 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}
2024-04-06 14:18:45.905 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}
2024-04-06 14:18:51.730 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105,"errors":{"param1":"","param2":""}},"success":false}

This error did not occur before the upgrade, so I think it is specific to the NAS’s new version of the Survalence Station software. It has nothing to do with the Openhab setup, as it worked perfectly before the NAS upgrade.

The Openhab version I am running on my RPi4 is 4.1.2

I do note when I look at the Openhab3 admin page for the Binding (http://192.168.1.98:8080/settings/things/synologysurveillancestation:station:1810mhn315000), I see the online status cycle between online and then offline. This cycle matches the errors in the logs. I have tried rebooting the NAS, but no change.

Is this a new issue? I’m keen to see if anyone knows how to resolve this. Any help would be greatly appreciated.

Cheers

Ian

Hi Ian! According to the API, error 105 is: Insufficient user privilege.
You might need to check your credentials or to create a dedicated Surveillance Station user.
Your IP could also have been blacklisted by the DSM, so you might need to clear its blacklist first.

Thanks @Pavion , Much appreciated.

It is interesting because the Binding was showing ‘online’, and I was obtaining the snapshots from the camera ‘thing’. The ‘thing’ was mostly online, but every few seconds, it would go offline and then online again. Each time it goes ‘offline,’ I get the log entry with the param1 and param2 messages.

I now have a different issue, as the Synology account is forcing 2FA, and I cannot see a way to enter this via the Openhab Binding. Any help would be greatly appreciated.

I think I have gone backwards, not forwards, on this issue!! :wink:

Hoping you can help

Cheers Ian

There might besome performance issues regarding Raspberry, if the signal flackers, you should try to increase the timeout.
As for 2FA, it is not supported, but you should be able to create a dedicated viewonly user in Surv.Station.

Thank you @Pavion

That worked.

Oddly enough I needed to enable 2FA (by logging into the NAS from the browser and following the 2FA setup), then log back in as Admin and disable 2FA via the User & Group in Control Panel on the NAS.

Once I did that I disabled then enabled the Binding.

No errors, and so far, all seems good.

Thank you again for all your help.

1 Like

What exactly did you do?
I have the same error and Things going offline:

[ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {“error”:{“code”:105,“errors”:{“param1”:“”,“param2”:“”}},“success”:false}

I already have a separate user and no 2FA activated. I changed the password as well, but the error remains. It’s also updating the snapshot items properly. I believe this is since the Surveillance Station got updated.

Hi @Piffer,

What I ended up doing was the following:

On Openhab, I deactivated each of my Camera ‘Things’. I left the NAS ‘Thing’ active.
I created a new user on the NAS (Control Panel - User & Group)
Under ‘User Groups’, I selected ‘HTTP’ and ‘users’
Under ‘Permissions’ I selected ‘homes’ as ‘Read/Write’ and ‘surveillance’ as ‘Read only’
Under ‘Applications’ only ‘Surveillance Station’ as ‘Allow’

Once that was set, I tried the new user on the Openhab Thing, and I got a bunch of errors relating to 2FA not being set or something like that.

I then logged in to the NAS via a Browser using the new user ID, and the UI forced me to set up 2FA. This I did.

I tried Openhab again, and as expected, the same errors (at least I think they were the same).

On the NAS, I went back to the Control Panel and User & Group and selected the user. Then, there was an option to disable 2FA, which I selected. 2FA is now disabled.

I then went back to Openhab and deactivated and activated the Thing, and it went online and stayed online. I followed this by activating each of my camera ‘Things,’ and they all went online without any errors.

This is not a complete process, as there are many things that should be tested and ruled in or out, but it worked for me. I am on Openahb version 4.1.2, which I only upgraded to while I was diagnosing this issue. I am not sure if that had anything to do with the issue. I doubt it, but I am sharing it with you just in case.

I hope this helps.

Cheers

Ian

1 Like

Thank you very much, @Ian_Aitken !

Troubleshooting

I tried pretty much the same, but without activating 2FA.
I turned the Things offline, created a new user with the permissions (user & http; homes->default & surveilance->readonly; Apps: DSM, Surveillance Station).
I logged in with that user and verified the password, used the same for the Surveillance Station Thing and I still get error 105.
I first tried to restart only the binding, but that didn’t help, hence I restart openhab and that didn’t help as well.
If I put in a wrong password, I get error 400 instead if 105 and then the Snapshots won’t update.

I also noticed that this problem persists only for my Reolink and Annke Cams. There is an AXIS P1355 Cam that I use for my 3D Printer, that works just fine. I even set the refresh rate on that one to 5 seconds (usually 60s) without issues. The only difference I can see that could matter is the resolution being only 1920x1080 instead of 2304x1296 (Reolink) and 2592x194 (Annke). However even if I change the Stream Resolution to 1280x720 the error persists.

I also tried disabling and enabling Cams in the Surveillance Station, but without any effect.

When I login with the User into the Surveillance Station I can see successful logins fromt that user, that come from openhab.

I couldn’t find any timeout parameter so set higher. @Pavion any Idea where to configure that?

Long Story short, I found the solution:
As this is related to the new Version of Surveillance Station, I checked the Changelog:

Added support for a new default privilege profile named “Administrator” that grants users access to all objects and the ability to manage Surveillance Station settings. Certain actions that involve modifying DSM settings are restricted and require the user to be added to the DSM administrators group.See all limitations

And that’s it. You need to configure the user as at least Object-Manager. Default seems to be Object-Spectator and that was not enough.
image

Error Messages are gone immediatly after changing that.

2 Likes

Thanks alot @Piffer , that solves the logs from appearing.
To clarify: You need to set this in the user settings within the Surveillance Station itself.

Thanks @Piffer great job

2 Likes