Ipcamera Binding error messages

My openhab.log is spitting out some error messages. And I cannot seem to get them fixed.

Any help/pointers would be appreciated.

First my openhab.log messages:

2019-03-23 10:13:05.427 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Cameras selected 'ONVIF media profile' is using encoding of H_264 and needs to be MJPEG to work with the new streaming features.
2019-03-23 10:13:07.436 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - Following NPE occured when trying to connect to the camera with ONVIF.java.lang.NullPointerException
2019-03-23 10:13:07.436 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Since an NPE occured when asking the camera about PTZ, the PTZ controls will not work. If the camera does not come online, give the camera the wrong ONVIF port number so it can bypass using ONVIF and still come online.
2019-03-23 10:13:07.442 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler IpCameraHandler of thing ipcamera:FOSCAM:evicam tried updating channel imageUrl although the handler was already disposed.
2019-03-23 10:13:07.443 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler IpCameraHandler of thing ipcamera:FOSCAM:evicam tried updating channel rtspUrl although the handler was already disposed.
2019-03-23 10:13:08.114 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler IpCameraHandler of thing ipcamera:FOSCAM:evicam tried updating channel image although the handler was already disposed.
2019-03-23 10:13:10.490 [ERROR] [ing.saaj.soap.ver1_2.SOAPPart1_2Impl] - SAAJ0415: InputStream does not represent a valid SOAP 1.2 Message
2019-03-23 10:13:10.495 [INFO ] [ing.ipcamera.handler.IpCameraHandler] - IP Camera at 192.168.1.252:88 is now online.
2019-03-23 10:13:10.507 [ERROR] [ing.ipcamera.handler.IpCameraHandler] - Exception occured starting the new streaming server:{}
java.net.SocketException: Toegang geweigerd ###<-- This is DUTCH for ACCESS DENIED

My main concerns are the onvif media profile error and the last error line:
Exception occured starting the new streaming server:{}
java.net.SocketException: Toegang geweigerd ###<-- This is DUTCH for ACCESS DENIED

My config files are:

IPCAMERAS.THINGS

Thing ipcamera:FOSCAM:evicam "Evi Babyfoon" @ "Woonkamer" [
	IPADDRESS="192.168.XXX.XXX",
	PASSWORD="XXX",
	USERNAME="XXX",
	POLL_CAMERA_MS=2000,
	SERVER_PORT=888,
	IP_WHITELIST="(XX)(XX)(XX)(XX)(XX)(XX)",
	IMAGE_UPDATE_EVENTS=0,
	AUDIO_URL_OVERRIDE="http://192.168.X.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=setAudioAlarmConfig&isEnable=1&sensitivity=0&linkage=14&triggerInterval=5&schedule0=281474976710655&schedule1=281474976710655&schedule2=281474976710655&schedule3=281474976710655&schedule4=281474976710655&schedule5=281474976710655&schedule6=281474976710655&usr=XXX&pwd=XXXX",
	]

And my IPCAMERAS.ITEMS

Switch 		EviCamUpdateImage 		"Nieuwe Afbeelding" { channel="ipcamera:FOSCAM:evicam:updateImageNow" }
Number 		EviCamDirection 		"Camera Richting"
Dimmer 	EviCamPan 				"Horizontaal [%d] Links/Rechts" { channel="ipcamera:FOSCAM:evicam:pan" }
Dimmer 	EviCamTilt 				"Verticaal [%d] Boven/Onder" { channel="ipcamera:FOSCAM:evicam:tilt" }
Dimmer 	EviCamZoom 				"Vergroten [%d] +/-" { channel="ipcamera:FOSCAM:evicam:zoom" }
Switch 	EviCamEnableMotion 		"Bewegingsalarm Aan/Uit" { channel="ipcamera:FOSCAM:evicam:enableMotionAlarm" }
Switch 	EviCamMotionAlarm 		"Beweging gevonden" { channel="ipcamera:FOSCAM:evicam:motionAlarm" }
Switch 		EviCamEnableAudioAlarm 	"Geluidsalarm Aan/Uit" { channel="ipcamera:FOSCAM:evicam:enableAudioAlarm" }
Switch 		EviCamAudioAlarm 		"Geluid gevonden" { channel="ipcamera:FOSCAM:evicam:audioAlarm" }
Dimmer 	EviCamAudioThreshold 	"Geluidsdrempel [%d]" { channel="ipcamera:FOSCAM:evicam:thresholdAudioAlarm" }
Dimmer 	EviCamLED 				"Nachtvisie [%d]" { channel="ipcamera:FOSCAM:evicam:enableLED" }
Switch 	EviCamAutoLED 			"Auto Nachtvisie" { channel="ipcamera:FOSCAM:evicam:autoLED" }
String 	EviCamTextOverlay 		"Tekst overlay" { channel="ipcamera:FOSCAM:evicam:textOverlay" }
String 	EviCamAPIAccess 		"Toegang tot API" { channel="ipcamera:FOSCAM:evicam:apiAccess" }

IPCAMERAS.SITEMAP

  	Frame label="Evi Babyfoon" icon="camera" {
  		Webview url="http://192.168.XXX.XXX:XX/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=XXX&pwd=XXX" height=15
 		Switch item=EviCamDirection icon=movecontrol label="Positie Babyfoon" mappings=[0="NORMAAL", 1="BOVEN", 2="ONDER", 3="RECHTS"]
	//	Switch item=EviCamUpdateImage
	//	Default item=EviCamMotionAlarm icon=siren
		Default item=EviCamAudioAlarm icon=siren
	//	Text label="Advanced Controls" icon="settings"{
	//	Switch item=EviCamEnableMotion
		Default item=EviCamEnableAudioAlarm
	//	Default item=EviCamAudioThreshold icon=recorder
	//	Slider item=EviCamLED
	//	Default item=EviCamAutoLED
	//	Slider item=EviCamPan icon=movecontrol
	//	Slider item=EviCamTilt icon=movecontrol
	//	Slider item=EviCamZoom icon=zoom

	} // end of Frame 

Just for clarity sake, everything does work! I can view, control and get sound alarm of the camera. But I was wondering what these error messages mean…

Thanks for the help!

How often do you get the error messages?

Well, Like 8 times a day, it differs. On different times and no ‘routine’. Sometimes it takes a couple of hours to generate the error and sometimes you get a few errors in a frame of 10 minutes… Erratic…

Any ideas?

The first line is just a warning but have you tried using MJPEG?

Cameras selected 'ONVIF media profile' is using encoding of H_264 and needs to be MJPEG to work with the new streaming features.

The last error mentions starting a new streaming server. Looking at the Things file you have server port 888 and and error is complaiing about port 88?:hushed: If that’s not the issue, I would set the Ipcamera log to DEBUG and see if that gives a better hint at the problem.

Thanks for creating a new thread as it looks like you have multiple issues.

  • As mentioned setup the camera to be able to use MJPEG streams.
    http://foscam.us/forum/how-to-fetch-snapshots-and-mjpeg-stream-on-hd-cameras-t4328.html
    Your camera should be able to do streaming direct but is most likely limited to doing only 4 streams at a time.

  • I used google to look up java.net.SocketException: Permission denied and a number of things to try are listed but first what are you running Openhab on and which Java? Do you have virus protection or a firewall running on it that could be blocking java applications?

  • The log is telling you how to fix the NPE error, change the onvif port to the wrong port to test, the only thing onvif is used for is PTZ. So if your camera does not have it then do this and the camera will connect faster. This occurs if a ONVIF method is not implemented in the cameras firmware or a compatiblity issue exists, try updating cameras firmware.

ONVIF_PORT
  • Some of the above errors could be caused by the NPE or some other error as the framework is reporting the handler for the camera has been shutdown/disposed. It may also get fixed by a tmp and cache clean, search this forum for more info. The lines stating the handler is not running concern me the most as not all the binding is running.

Going into DEBUG log output should give more clues but try the above first.

Thank you for your reply.

The system that openhab runs on is:

  • Ubuntu 18.04
  • OpenHAB 2.4.0 - Release build
  • $ java -version
    Java version "1.8.0_201
    Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
  • $ /usr/lib/jvm/zulu-8-amd64/bin/java -version (Java Zulu)
    openjdk version "1.8.0_202"`
    OpenJDK Runtime Environment (Zulu 8.36.0.1-CA-linux64) (build 1.8.0_202-b05)
    OpenJDK 64-Bit Server VM (Zulu 8.36.0.1-CA-linux64) (build 25.202-b05, mixed mode)
  • MJPEG Streams
    I have a MJPEG stream configured, it’s accessible via http URL.

  • JAVA Error
    See system config above… no anti-virus or firewall present on the machine.

  • NPE Error
    Camera supports ONVIF, has the latest firmware and PTZ works in OpenHAB. (PTZ means pan/tilt/zoom I suppose, movement of camera?)

I’ll look into the temp/cache stuff soon.

Thanks for your help/answers.

  1. Shutdown openhab.
  2. rm %openhabDir%/cache/*
  3. rm %openhabDir%/tmp/*
  4. Start openhab.
  • Same error messages appear…

Can you post some debug log output when the camera connects with onvif please?
Also try giving the wrong onvif port to see if it resolves some of the issues.

From your items file remove the text overlay and api access lines as Foscam does not have these channels. The rest looks fine.

I have rebooted the complet openhab system (Just in case) and started a log:tail.
The output I will post below. I have not changed the text overlay/api access/onvif port yet. If still needed I will.

I have removed all non-related stuff to ipcamera out of the log for clarity sake.

I hope it helps you.


                          __  _____    ____      
  ____  ____  ___  ____  / / / /   |  / __ )     
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  | 
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /      
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/     
    /_/                        2.4.0
                               Release Build   

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> log:tail                                                                                                                                             
22:34:39.557 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamZoom-ipcamera:FOSCAM:evicam:zoom' has been added.
22:34:39.558 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamTextOverlay-ipcamera:FOSCAM:evicam:textOverlay' has been added.
22:34:39.558 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamAutoLED-ipcamera:FOSCAM:evicam:autoLED' has been added.
22:34:39.560 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamEnableAudioAlarm-ipcamera:FOSCAM:evicam:enableAudioAlarm' has been added.
22:34:39.560 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamMotionAlarm-ipcamera:FOSCAM:evicam:motionAlarm' has been added.
22:34:39.562 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamTilt-ipcamera:FOSCAM:evicam:tilt' has been added.
22:34:39.563 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamLED-ipcamera:FOSCAM:evicam:enableLED' has been added.
22:34:39.563 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamImage-ipcamera:FOSCAM:evicam:image' has been added.
22:34:39.563 [INFO ] [thome.event.ItemChannelLinkAddedEvent] - Link 'EviCamPan-ipcamera:FOSCAM:evicam:pan' has been added.
22:34:39.862 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'ipcamera:FOSCAM:evicam' changed from UNINITIALIZED to INITIALIZING
22:34:39.864 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - initialize() called.
22:34:39.865 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Getting configuration to initialize a new IP Camera at IP XXX.XXX.XXX.XXX
22:34:40.866 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:XXX.XXX.XXX.XXX:XXX
22:34:41.900 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Fetching the number of Media Profiles this camera supports.
22:34:43.079 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Checking the selected Media Profile is a valid number.
22:34:43.082 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Fetching a Token for the selected Media Profile.
22:34:43.083 [WARN ] [ding.ipcamera.handler.IpCameraHandler] - Cameras selected 'ONVIF media profile' is using encoding of H_264 and needs to be MJPEG to work with the new streaming features.
22:34:43.084 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - About to fetch some information about the Media Profiles from the camera
22:34:43.085 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - *********** Media Profile 0 details reported by camera at IP:XXX.XXX.XXX.XXX ***********
22:34:43.086 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 0 is named:videoencoder_name0
22:34:43.087 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video encoder	:H_264
22:34:43.088 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video quality	:3.0
22:34:43.089 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video resoltion	:1280 x 720
22:34:43.090 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 0 uses video bitrate	:1024
22:34:43.091 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - *********** Media Profile 1 details reported by camera at IP:XXX.XXX.XXX.XXX ***********
22:34:43.092 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Camera will use this Media Profile unless you change it in the bindings settings.
22:34:43.093 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 1 is named:videoencoder_name1
22:34:43.094 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video encoder	:H_264
22:34:43.095 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video quality	:3.0
22:34:43.096 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video resoltion	:640 x 360
22:34:43.097 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Media Profile 1 uses video bitrate	:256
22:34:43.098 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - About to interrogate the camera to see if it supports PTZ.
22:34:44.799 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Camera is reporting that it supports PTZ control with Absolute movement via ONVIF
22:34:44.800 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Checking Pan now.
22:34:45.882 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Checking Tilt now.
22:34:46.890 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Checking Zoom now.
22:34:48.502 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Camera has reported the range of movements it supports via PTZ.
22:34:48.503 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - The camera can Pan  from -1.0 to 1.0
22:34:48.503 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - The camera can Tilt from -1.0 to 1.0
22:34:48.504 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - The camera can Zoom from -1.0 to 1.0
22:34:48.504 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Fetching the cameras current position.
22:34:48.757 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Finished with PTZ with no errors, now fetching the Video URL for RTSP from the camera.
22:34:49.237 [ERROR] [ging.saaj.soap.ver1_2.SOAPPart1_2Impl] - SAAJ0415: InputStream does not represent a valid SOAP 1.2 Message
22:34:49.280 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:49.331 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 0 channels tracked (some of these may be closed).
22:34:49.339 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:0 	GET:/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:49.345 [INFO ] [ding.ipcamera.handler.IpCameraHandler] - IP Camera at XXX.XXX.XXX.XXX:XX is now online.
22:34:49.345 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'ipcamera:FOSCAM:evicam' changed from INITIALIZING to ONLINE
22:34:49.346 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Pan is updating to:50 and the cam value is 0.0
22:34:49.346 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Tilt is updating to:50 and the cam value is 0.0
22:34:49.346 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig&usr=XXXX&pwd=XXXX
22:34:49.346 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:49.346 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig&usr=XXXX&pwd=XXXX
22:34:49.349 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Zoom is updating to:50 and the cam value is 0.0
22:34:49.353 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 1 channels tracked (some of these may be closed).
22:34:49.358 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamPan changed from NULL to 50
22:34:49.361 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamTilt changed from NULL to 50
22:34:49.364 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:1 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig&usr=XXXX&pwd=XXXX
22:34:49.363 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 1 channels tracked (some of these may be closed).
22:34:49.367 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamZoom changed from NULL to 50
22:34:49.376 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 2 channels tracked (some of these may be closed).
22:34:49.383 [ERROR] [ding.ipcamera.handler.IpCameraHandler] - Exception occured starting the new streaming server:{}
java.net.SocketException: Toegang geweigerd
	at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
	at sun.nio.ch.Net.bind(Net.java:433) ~[?:?]
	at sun.nio.ch.Net.bind(Net.java:425) ~[?:?]
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[?:?]
	at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:130) ~[?:?]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[?:?]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1332) ~[?:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:501) ~[?:?]
	at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:486) ~[?:?]
	at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:984) ~[?:?]
	at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:258) ~[?:?]
	at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:366) ~[?:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[?:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:495) ~[?:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905) ~[?:?]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
22:34:49.384 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:3 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig&usr=XXXX&pwd=XXXX
22:34:49.384 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have  opened  a  brand NEW channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:49.492 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:49.493 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamAudioThreshold changed from NULL to 0
22:34:49.494 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:1 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig&usr=XXXX&pwd=XXXX
22:34:50.486 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Snapshot recieved: Binding will now close the channel.
22:34:50.487 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 	URL:/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:50.488 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:50.489 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:3 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig&usr=XXXX&pwd=XXXX
22:34:50.496 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamImage changed from NULL to raw type (image/jpeg): 35765 bytes
22:34:50.661 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:50.662 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:50.663 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamEnableMotion changed from NULL to OFF
22:34:50.664 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamAudioAlarm changed from NULL to OFF
22:34:50.665 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamEnableAudioAlarm changed from NULL to ON
22:34:50.667 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamLED changed from NULL to 100
22:34:51.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:51.349 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:51.353 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:0 	GET:/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:51.355 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:51.360 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:51.366 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:51.568 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Snapshot recieved: Binding will now close the channel.
22:34:51.570 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 	URL:/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:51.585 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamImage changed from raw type (image/jpeg): 35765 bytes to raw type (image/jpeg): 35761 bytes
22:34:51.679 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:51.681 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:53.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:53.351 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:53.358 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:0 	GET:/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:53.361 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:53.363 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:53.367 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:53.698 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Snapshot recieved: Binding will now close the channel.
22:34:53.700 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:0 	URL:/cgi-bin/CGIProxy.fcgi?usr=XXXX&pwd=XXXX&cmd=snapPicture2
22:34:53.704 [INFO ] [smarthome.event.ItemStateChangedEvent] - EviCamImage changed from raw type (image/jpeg): 35761 bytes to raw type (image/jpeg): 35711 bytes
22:34:53.844 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:53.847 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:55.344 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:55.350 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:55.353 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:55.509 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:55.510 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:57.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:57.353 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:57.362 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:57.559 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:57.562 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:59.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:59.350 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:34:59.354 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:34:59.529 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:34:59.530 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:01.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:01.350 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:35:01.359 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:01.521 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:35:01.522 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:03.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:03.351 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:35:03.358 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:03.540 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:35:03.541 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:05.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:05.350 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).

The log keeps on generating the same lines over and over again after that:

CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:03.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:03.351 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - CommonCameraHandler created.... 4 channels tracked (some of these may be closed).
22:35:03.358 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Have re-opened  the closed channel:2 	GET:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:03.540 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - End of FOSCAM handler reached, so closing the channel to the camera now
22:35:03.541 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - commonCameraHandler closed channel:2 	URL:/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX
22:35:05.345 [DEBUG] [ding.ipcamera.handler.IpCameraHandler] - Sending camera GET http://XXX.XXX.XXX.XXX:XX/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXX&pwd=XXXX

Hope it helps…

One thing that does not add up, in the DEBUG log it says there’s no MJPEG stream available.
But when putting

http://ipaddress:port/cgi-bin/CGIProxy.fcgi?cmd=setSubStreamFormat&format=1&usr=XXX&pwd=XXX

into a browser I get the following returned:

<CGI_Result>
    <result>0</result>
</CGI_Result>

And when opening a browser with the following URL

http://ipaddress:port/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=XXX&pwd=XXX

I get a streaming video of the camera.

So that doesn’t add up…

I agree with your reasoning but I don’t have an answer, you would need to ask Foscam not me. The binding asks the camera via ONVIF and then reports in the log what the camera responds, you can try the opensource ONVIF device manager program to see how the camera responds in that program.

The logs showed that PTZ is working fine and it is the ONVIF question asking for the RTSP url that causes an issue, why I do not know but it is good news as it does not matter and you still get PTZ control…

The binding uses that exact URL you posted saying it works so I think I may have found the issue…

Try these and I’m guessing number 1 will fix it:

  1. Linux needs root permissions for using ports below 1024. Try another server port number in the higher range.
  2. Add the following JVM option if 1 does not fix it: -Djava.net.preferIPv4Stack=true
  3. Is Openhab running as root on your machine? Create a user that is not actually root.

Ill try to see what I can do about a ONVIF manager. Thank you for all your help so far.
PTZ is indeed working like it should be.
I just made Java Zulu the standard java to see if that fixes the java error. But no luck.

With server port number I gues you mean the server port of the IPCAMERA? (88 and 888)?
Both need to be above 1024?

Openhab is running as it’s own user. Not root.

Thanks again! Ill try the three options you provided and report back.

In your things file you had this line
SERVER_PORT=888

Change it to something like

SERVER_PORT=5308

Or to turn off the streaming features make it
SERVER_PORT=-1

  • Java error
    Changing the server_port above 1024 made the java error go away.

  • MJPEG stream
    I checked in the browser webpage of the foscam camera for any settings regarding the substream and it indeed is configured on 640x480 . But I cannot find MJPEG/H.264 stream options in the browser. Any thoughts on that?

You can ignore the log about no mjpeg streams it is only a warning. The binding will use the URL you said works for you so just trying using it now, the binding should now stream since the server now can use a port.

Yeah, it is working fine. I was just wondering. Thanks again for all your help! Great work! Thank you!

Sorry to bounce back to this thread, but is it possible to ‘mute’ the generated messages? It is clogging my log folders. Thanks for your help

I changed the IPCAMERA log to INFO via the Karaf console. Now the log keeps calm. ‘Problem’ solved