As I’ve assumed, autodiscovery was overwriting existing Thing with empty credentials. This should be fixed in the newest release (check my site). Confirmation is welcome.
Wanted to test it, first just by just replacing the binding in openHABian 3.0, then reconfigure in UI as next step to test, but this happens consistently:
2021-01-10 23:35:43.513 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:station:diskstation' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2021-01-10 23:35:43.543 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SynoCameraHandler of thing synologysurveillancestation:camera:diskstation:1 tried accessing its bridge although the handler was already disposed.
2021-01-10 23:35:43.546 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'synologysurveillancestation:station:diskstation' changed from INITIALIZING to ONLINE
2021-01-10 23:35:43.550 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while calling thing handler factory 'org.openhab.binding.synologysurveillancestation.internal.SynoHandlerFactory@64f98a': null
java.lang.NullPointerException: null
at org.openhab.binding.synologysurveillancestation.handler.SynoCameraHandler.<init>(SynoCameraHandler.java:91) ~[?:?]
at org.openhab.binding.synologysurveillancestation.internal.SynoHandlerFactory.createHandler(SynoHandlerFactory.java:144) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:129) ~[bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.doRegisterHandler(ThingManagerImpl.java:664) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.registerHandler(ThingManagerImpl.java:645) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:1110) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl$4.run(ThingManagerImpl.java:689) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
2021-01-10 23:35:43.561 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler SynoCameraHandler of thing synologysurveillancestation:camera:diskstation:1 tried accessing its bridge although the handler was already disposed.
2021-01-10 23:35:43.564 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while calling thing handler factory 'org.openhab.binding.synologysurveillancestation.internal.SynoHandlerFactory@64f98a': null
java.lang.NullPointerException: null
at org.openhab.binding.synologysurveillancestation.handler.SynoCameraHandler.<init>(SynoCameraHandler.java:91) ~[?:?]
at org.openhab.binding.synologysurveillancestation.internal.SynoHandlerFactory.createHandler(SynoHandlerFactory.java:144) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:129) ~[bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.doRegisterHandler(ThingManagerImpl.java:664) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.registerHandler(ThingManagerImpl.java:645) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:1110) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.lambda$10(ThingManagerImpl.java:1092) [bundleFile:?]
at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807) [?:?]
at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:425) [?:?]
at org.openhab.core.thing.internal.ThingManagerImpl.lambda$9(ThingManagerImpl.java:1089) [bundleFile:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) [?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) [?:?]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) [?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) [?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) [?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) [?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) [?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) [?:?]
at org.openhab.core.thing.internal.ThingManagerImpl.handleThingHandlerFactoryAddition(ThingManagerImpl.java:1088) [bundleFile:?]
at org.openhab.core.thing.internal.ThingManagerImpl.onReadyMarkerAdded(ThingManagerImpl.java:1076) [bundleFile:?]
at org.openhab.core.internal.service.ReadyServiceImpl.lambda$0(ReadyServiceImpl.java:52) [bundleFile:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) [?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) [?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) [?:?]
at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1746) [?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) [?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) [?:?]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) [?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) [?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497) [?:?]
at org.openhab.core.internal.service.ReadyServiceImpl.notifyTrackers(ReadyServiceImpl.java:79) [bundleFile:?]
at org.openhab.core.internal.service.ReadyServiceImpl.markReady(ReadyServiceImpl.java:52) [bundleFile:?]
at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.registerReadyMarker(XmlDocumentBundleTracker.java:419) [bundleFile:?]
at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.finishBundle(XmlDocumentBundleTracker.java:362) [bundleFile:?]
at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:385) [bundleFile:?]
at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:347) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Restarted binding a few times:
ssh openhab@localhost -p8101 ‘bundle:restart org.openhab.binding.synologysurveillancestation’
Also:
sudo systemctl restart openhab
In all cases it keeps happening.
My current configuration:
things:
Bridge synologysurveillancestation:station:diskstation "Surveillance Station" [ acceptSsl="false", protocol="http", host="192.168.0.244", port="5000", username="...", password="...", refresh-rate-events=3 ] {
Thing camera 1 "Hikvision" @ "Postkasse" [ refresh-rate-events=5, refresh-rate-snapshot=10, refresh-rate-md-param=0, snapshot-stream-id=1 ]
}
items:
Group Hikvision "Hikvision" <camera> (Mailbox) ["Camera"]
Switch SurveillanceStation_HomeMode "Home Mode" {channel="synologysurveillancestation:station:diskstation:homemode"}
String SurveillanceStation_CurrentSID "Current SID" {channel="synologysurveillancestation:station:diskstation:sid"}
Image Hikvision_Snapshot "Snapshot" (Hikvision) ["Point"] {channel="synologysurveillancestation:camera:diskstation:1:common#snapshot"}
/Jacob
Sorry, my bad. Will fix it later this day.
if nothing else it’s nice to use the UI so you don’t have ignored items sitting in the Inbox. it shouldn’t (and mostly) doesn’t bug me but it’s also nice to have everything in its place
I hope I’ve found all errors this time - and made no new errors.
“And this time I mean it”
Please check the newest release and sorry for the inconvenience.
Cool @Pavion - tried again, and it works correctly now. After that disabled my file configuration and reconfigured through UI. Then restarted openHAB and observed that login/password no longer disappears.
Thanks for reporting back, now I can sleep peacefully
did you already test it with DSM 7.0? It doesn’t work for me
Hi @woodie, welcome to this forum and thank you for reporting this issue.
API version has been raised with no other apparent changes
I’ve compiled a new release (see project’s page on GitHub), please check if you can find any other issues.
BR Pav
Thanks for the fast fixing
I saw in their api document that the last change was the login, I already thought that because of that it was no longer possible.
If the cams are working, I can first check next week.
It’s working for me with DSM 7, thanks
Thanks for this wonderful Binding! It works perfectly.
But within Openhab3 I want to use
action: photos
actionPhotos:
To have the ability to watch a full screen “snapshot-stream” because stream2 from my trendnet-camera / diskstion only provide 640x320 as resolution.
Do you have any idea how the Snapshot can be updated by “action: photos” based on the snapshot url / items? When I use the dynamic snapshot item with the updated url, the photo within the action popup will not be refreshed.
Thanks in advance!
Hi @coeffee,
I don’t quite understand what you’re trying to do.
With some advanced magic you could use dynamic URL to get different snapshot resolutions using Profiles of your Surveillance Station:
http://xx.xx.xx.xx:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&version=9&method=GetSnapshot&_sid=blah&id=1&profileType=0
See GitHub - nibi79/synologysurveillancestation at oh3 for more information or PM me if this is your case.
BR Pav
@Pavion
I am on OH 3.0.1
Unfortunatly, I screwed the configuration for the synology surveillance setup and had to start all over again.
I was able to regenerate the Bridge in Main UI, entered the credentials and it came online.
But then, the discovery did not find my cameras.
I made an attempt to add a camera manually in Main UI, and it came online.
But when I created the the item in text file, I got errors in the log and the camera went offline.
2021-05-15 18:30:09.044 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'Surveillance.items'
2021-05-15 18:30:52.021 [ERROR] [ncestation.handler.SynoCameraHandler] - Camera Handler initialize
2021-05-15 18:30:52.186 [ERROR] [ternal.webapi.request.SynoApiRequest] - RESPONSE: {"error":{"code":105},"success":false}
2021-05-15 18:30:52.189 [ERROR] [ncestation.handler.SynoCameraHandler] - initialize camera: id 1 - Syn002: GF_Cam1::synologysurveillancestation:camera:1910pdn711201:1
thanks for your help on this. Please indicate if you need additional info to help me out.
Please check your user/access/credentials. Your user should have access to the Surveillance Station. If you’ve upgraded to DSM7 lately, please download the latest release.
BR Pav
I just logged in with the user, and it has access to surveillance station. I also granted access to HTTP to that user.
I am on Version synology 6.4.
I run the binding Version 3.1 Snapshot.
What is strange to me is that the bridge came online but the Discovery did not find the cameras.
When I run the Discovery for the camera I get:
2021-05-15 20:02:18.530 [ERROR] [nal.discovery.CameraDiscoveryService] - Discovery Thread; Attempt to reconnect failed
Ps: i just saw that the IP of the Openhab Server got onto the blocklist on the synology. I removed the blocking and tried again, but still got the same error.
I checked the user id and password a number of times and it looks ok
Pps: tried again and now it finds the cameras …
So… is it working now?
Yep. Multiple failed attempts to get it working must have put the OH IP on the Syno blocked list. After I cleared the list, it started working again.
Thanks for pointing me to the user access area.
I read docu and forum and more - but I cannot solve an issue with different resolutions.
Maybe someone can help? @Pavion?
There is an INSTAR 9020 HD camera and it’s working fine with 1920x1080 resolution.
I configured in Synology SurveillanceStation just one stream - the best one (1920x1080).
I would like to use the stream from Synology (instead directly from the Camera, due to perfomance reasons).
1) Static snapshot URI:
http://<IP>/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&version=8&method=GetSnapshot&_sid=bla123&camStm=1&cameraId=10
2) Live feed URI (rtsp):
rtsp://syno:bla123@<IP>:554/Sms=10.unicast
3) Live feed URI (mjpeg over http):
http://<IP>/webapi/entry.cgi?api=SYNO.SurveillanceStation.Stream.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=10&StmKey="bla123"
The resolution shown are:
1 ) 1920x1080
2 ) 1920x1080
3 ) 640x360
How to get 3) also in 1920x1080?
nobody knows how to get 1920x1080 for option 3 ?