[SOLVED] Can't get image from ip cam

Continuing the discussion from IpCamera: New IP Camera Binding:

Hello, I’m using a foscam FI9800P, but i can’t seem to get an image in openhab. Camera works fine in foscam app so i know this is not the problem. I get the following warning in the log:

2019-02-25 14:41:47.131 [WARN ] [ing.ipcamera.handler.IpCameraHandler] - SOAP error when trying to connect with ONVIF. This may indicate your camera does not fully support ONVIF, check for an updated firmware for your camera. Will try and connect with HTTP. Camera at IP:, fault was com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed

. How can i find or set the portnumbers for ONVIF and HTTP? i scaned for open ports on fing app and used “accessbuilder”-port(888) for ONVIF and “https”-port(443) for port settings. Or am i missing something else? Cam FW is latest.

Thing file:

Thing ipcamera:FOSCAM:001 [ IPADDRESS="", PASSWORD="xxxx", USERNAME="yyyy", ONVIF_PORT=888, PORT=443, POLL_CAMERA_MS=2000] 

items file:

Image OpritCam { channel="ipcamera:FOSCAM:001:image" }
Switch OpritCamUpdateImage "Get new picture" { channel="ipcamera:FOSCAM:001:updateImageNow" }
Number OpritCamDirection "Camera Direction"
Dimmer OpritCamPan "Pan [%d] left/right" { channel="ipcamera:FOSCAM:001:pan" }
Dimmer OpritCamTilt "Tilt [%d] up/down" { channel="ipcamera:FOSCAM:001:tilt" }
Dimmer OpritCamZoom "Zoom [%d] in/out" { channel="ipcamera:FOSCAM:001:zoom" }
Switch OpritCamEnableMotion "MotionAlarm on/off" { channel="ipcamera:FOSCAM:001:enableMotionAlarm" }
Switch OpritCamMotionAlarm "Motion detected" { channel="ipcamera:FOSCAM:001:motionAlarm" }
Switch OpritCamEnableAudioAlarm "AudioAlarm on/off" { channel="ipcamera:FOSCAM:001:enableAudioAlarm" }
Switch OpritCamAudioAlarm "Audio detected" { channel="ipcamera:FOSCAM:001:audioAlarm" }
Dimmer OpritCamAudioThreshold "Audio Threshold [%d]" { channel="ipcamera:FOSCAM:001:thresholdAudioAlarm" }
Dimmer OpritCamLED "IR LED [%d]" { channel="ipcamera:FOSCAM:001:enableLED" }
Switch OpritCamAutoLED "Auto IR LED" { channel="ipcamera:FOSCAM:001:autoLED" }
String OpritCamTextOverlay "Text to overlay" { channel="ipcamera:FOSCAM:001:textOverlay" }
String OpritCamAPIAccess "Access the API" { channel="ipcamera:FOSCAM:001:apiAccess" }
String OpritCamVideoUrl "url" { channel="ipcamera:FOSCAM:001:videourl"}


Text label="BabyMonitor" icon="camera"{
        Text item=OpritCamVideoUrl label="string=[%s]"
			Image url="http://google.com/leaveLinkAsThis" item=OpritCamImage refresh=2000
			Switch item=OpritCamDirection icon=movecontrol label="Camera Direction" mappings=[0="Room", 1="Cot", 2="Door"]
			Switch item=OpritCamUpdateImage
			Default item=OpritCamMotionAlarm icon=siren
			Default item=OpritCamAudioAlarm icon=siren
			Text label="Advanced Controls" icon="settings"{
				Switch item=OpritCamEnableMotion
				Default item=OpritCamEnableAudioAlarm
				Default item=OpritCamAudioThreshold icon=recorder
				Slider item=OpritCamLED
				Default item=OpritCamAutoLED
				Slider item=OpritCamPan icon=movecontrol
				Slider item=OpritCamTilt icon=movecontrol
				Slider item=OpritCamZoom icon=zoom

note: when i search for cam in fing app, it turns up with different MAC adress then mentioned on camera, this started after last FW update. Can someone give me a nudge in the right direction?

EDIT: OK differnt mac adress is from the wifi module, when i plug in the ethernet cable the original MAC shows again. But before i could get the ipcam thing online but not anymore. I didnt change any settings.

2019-02-25 16:32:57.906 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - About to connect to the IP Camera using the ONVIF PORT at IP:

2019-02-25 16:32:57.911 [DEBUG] [ing.ipcamera.handler.IpCameraHandler] - Can not connect with ONVIF to the camera at, check the ONVIF_PORT is correct. Fault was java.net.ConnectException: Host not available.

can someone tell me how i can check the ONVIF port number? I allready found in the documentation it defaults to 888 and allso set it like this but cant get the thing online anymore

I found in the forum it isnt nessecairy to define onvif port and http port if you have not changed them, the binding knows wich default ports to use. I did notice that when i scaned for open ports before using fing app i had about 5 open ports on the cam (including port 888 => onvif), now when i do a scan i only find http and kerberos port.

If you have a Windows machine on the network you can use the ONVIF Device Manager to scan and report back on your devices.

Also, checking your owners manual would be a good place to start

i tried using onvif divce manager, but it doesnt detect the cam at all. When i scan for open ports on the cam i can only see http port (443) and kerberous port (88). before i could see 5 open ports including accessbuilder port (888). but since last FW update of cam i can no longer see this port. I think thats the reason onvivf devicemanager doesnt detect the cam :worried:.

I allready asked support service of foscam what to do about it, still waiting for their answer.

There was little to no manual in the box, but when i do a http request to the cam to get the portsettings it sais 888 for onvif. Its setup like this in the thing file but i cant see an open port 888 when i search for open ports on the device :slightly_frowning_face:

Seems like the last FW-update disabled the onvif option. Now i logged in via the webinterface and enabled onvif again. Now my ipcam thing comes online again but i still cant get an image in the sitemap (onvif device manager doesn’t detect the camera either).

I’m ashamed to say i had a typo in the sitemap. Everything works now :blush::star_struck: