What ONVIF modes did you try and confirm that work in ODM? continuous, relative and absolute as well as using presets, this adds up to 4 different ways and it is common for cameras to not support all 4 ways. I have posted screen shots on how to change between them on this forum if you do not know how.
In OH3 this widget is the easiest to get going IF you use the UI to auto find and add the thing as equipment.
Thanks for your reply. So I made some more tests with ONVIF Device Manager. In fact, only the Continous move mode seems to be supported on this camera (the others generate: nothing for absolute mode, and a SOAP Server error on the Relative mode). So the Continuous mode is OK for pan and tilt (still have some issue with zoom) and presets with ONVIF Device Manager.
So, with the OpenHab UI:
I added a new Thing for this Foscam camera, adding the right parameters (IP, ports, credentials, …)
I switched ON the “Use Continuous PTZ” property
I attached items for IR LEDs, pan, til,t and zoom.
The IR leds are OK (I can switch them on and off, so no credential issues), but I still have the same issue with the PTZ functionalities.
I also confirm that I have the lastest firmware (V-2.x.1.79_p1) for this camera.
Good, just check that in the UI it is showing as turned on it you are using textual to rule to typo/syntax issues.
Can you send me the TRACE level logs of when the camera is connecting? Just do a find and replace on your password first. I am after the ONVIF xml chatter that occurs when the camera first connects. If the handshake is working then I will move onto looking at wireshark logs of what is different when comparing what ODM sends vs the bindings messages.
And moreover, I tried the preset and when I try to at a channel (with link an Item), I’ve got the following error message in the openhab console:
11:07:44.562 [WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: FoscamCamerawithAPI_GoToPreset
11:07:55.344 [ERROR] [core.common.registry.AbstractRegistry] - Cannot inform the listener "org.openhab.core.thing.internal.ChannelLinkNotifier@6d512" about the "ADDED" event: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.checkElementIndex(LinkedList.java:559) ~[?:?]
at java.util.LinkedList.get(LinkedList.java:480) ~[?:?]
at org.openhab.binding.ipcamera.internal.onvif.OnvifConnection.getXml(OnvifConnection.java:288) ~[?:?]
at org.openhab.binding.ipcamera.internal.onvif.OnvifConnection.requestBuilder(OnvifConnection.java:366) ~[?:?]
at org.openhab.binding.ipcamera.internal.onvif.OnvifConnection.sendPTZRequest(OnvifConnection.java:809) ~[?:?]
at org.openhab.binding.ipcamera.internal.handler.IpCameraHandler.handleCommand(IpCameraHandler.java:1178) ~[?:?]
at org.openhab.core.thing.binding.BaseThingHandler.channelLinked(BaseThingHandler.java:177) ~[?:?]
at org.openhab.core.thing.internal.ChannelLinkNotifier.lambda$3(ChannelLinkNotifier.java:72) ~[?:?]
at org.openhab.core.thing.internal.ChannelLinkNotifier.call(ChannelLinkNotifier.java:96) ~[?:?]
at org.openhab.core.thing.internal.ChannelLinkNotifier.added(ChannelLinkNotifier.java:72) ~[?:?]
at org.openhab.core.thing.internal.ChannelLinkNotifier.added(ChannelLinkNotifier.java:1) ~[?:?]
...
Yes I know. I just captured all the traffic and save it into a wireshark log file.
As I can’t modify the log to remove some potential credential information, I would like to send this log to you directly (and not on this forum). Could you tell me how to proceed.
I’ll PM you my email if that is what you prefer.
Some other things are:
Change your password before taking the log and then change it back afterwards.
I only need the REQUEST and not the RESPONSE, with only half of the traffic the digest method can not be reversed from what I understand. I have seen some cameras do a really stupid things so it is best to do 1. if it concerns you.
Thanks, do I need to recreate the thing or something like that? Because removing the bundle and installing that addon plus restarting OH didn’t change the behavior.
Matt
I have fresh installed OH3, installed IP Camera Binding and tried to add ONVIF UDP camera.
When I play the stream:
rtsp://user:pass@192.168.1.16/onvif1
in VLC all works!
When I add ONVIF camera as a thing with parameters:
IP - 192.168.1.15
ONVIF PORT: 5000
PORT: 2015
MJPEG: rtsp://user:pass@192.168.1.16:554/onvif1
Options before -i: -rtsp_transport udp
OH Log Viewer gives error:
2021-01-12 15:40:12.204 [WARN ] [hab.binding.ipcamera.internal.Ffmpeg] - An error occured trying to process the messages from FFmpeg.
any thoughts?
UPDATE: I have managed kinda make it working, but that is DEAD slow!!! DEAD and unstable!!! and on fresh install did not work at all for some reason…And that is the same with TCP stream by the way - very slow (RPI3B+)
So does this mean you are supplying a H264 stream to the config that is meant for a mjpeg format stream? if so that would explain your issues. If your camera does not do mjpeg, then leave that feild blank. It would be more helpful if you posted the CODE that shows how the thing is configured. Also no need to do user:pass@ in the urls the binding will handle the password correctly for you.
Hi,
i have an issue with the events for the motion detection.
my openhab system:
Release = Raspbian GNU/Linux 10 (buster)
Kernel = Linux 5.4.83-v7l+
Platform = Raspberry Pi 4 Model B Rev 1.2 4GB / SSD
Updates = 0 apt updates available.
openHAB 2.5.11-1 (Release Build)
the IP-Camera is an UPCAM Tornado HD S (www.upcam.com)
After the installation of the IPCamera binding via PaperUI i was running discovery for this ONVIF-supported camera and the thing for the camera was created.
I have used the DEBUG level for logging of the ipcamera binding to fix some issues with the binding. I was able to fix most of them. I am still struggling with the motion detection.
There are a lot of entries every 5-20 second in the logging:
Most of these log entries show Data:IsMotion, Value:false.
Why i get all these entries even if there is no motion? My assumption is that these events are only raised when there is a motion detected by the camera. But is some cases i don’t get the event when there is an motion deteced (i compared the entries in the camera and the log file in openhab)
Any idea why this happens as described and how i only get the correct events in case a motion is deteced by the camera.
I have also a logging with TRACE which i can provide if needed to fix this issue.
So far i have seen theses events only in the logging. For test purpose i have linked both, but only the cell motion channel get updates
2021-01-17 14:36:15.477 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to OFF
2021-01-17 14:36:27.643 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to OFF
2021-01-17 14:36:33.732 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to OFF
2021-01-17 14:36:43.918 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to ON
2021-01-17 14:36:49.013 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to ON
2021-01-17 14:37:01.232 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to OFF
2021-01-17 14:37:07.313 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to OFF
2021-01-17 14:37:13.422 [thome.event.ItemStateEvent] - Upcam1CellMotionAlarm updated to OFF
Is there any possibility to get rid of these unneccessary events (motion=false) or at least to reduce the frequency.
I always try to optimize a system and get rid of unneccessary actions.
You can filter the logs to remove them by adding lines to a cfg file. Search the forum for how. I’ll have a look at the code when I have spare time to see if it can be filtered at the binding level, but this will take some cpu and ram to do this, but I do understand it is annoying if the event log gets flooded with noise. Best to raise this as a git hub issue.