I actually thought this would be an easy one… but alas, being a newb to openluup, and lua, I’m stuggling…
Here are the details.
I have a FOSCAM FI8602W on my veraplus currently using plugin I_FoscamPTZ.xml.
I’ve attached the I_FoscamPTZ.xml that I’m using.
I’ve installed the plugin in openlook as Plugin id:# 1978, this was what it was used on my vera and I didn’t see any conflict when I went into user_data.json.
{
"AllowMultiple":"1",
"Approved":"1",
"AutoUpdate":"1",
"Files":[{
"Compress":"1",
"DestName":"I_FoscamPTZ.xml",
"DestPath":"",
"Encrypt":"0",
"Role":"I",
"SourceName":"I_FoscamPTZ.xml"
}],
"Hidden":"0",
"Icon":"plugins/icons/1978.png",
"Instructions":"http://code.mios.com/trac/mios_foscam-camera",
"Title":"Foscam IP Camera",
"Version":"11066",
"VersionMajor":"2",
"VersionMinor":"6",
"id":1978,
"timestamp":1376532738
}
And created a device altuiid: 0-18 that has device file: “D_DigitalSecurityCamera2.xml” device_json: “D_DigitalSecurityCamera2.json” device_tyoe: “urn:schemas-upnp-org:device:DigitalSecurityCamera:2” and impl_file: “I_FoscamPTZ.xml”
Although I’ve forced attributes password, and username, and variables Username, and password to the correct values, those same values as used on the vera. What happens is that when, and this is where my understanding is weak, whoever manages the URL calls, fails to handle authentication correctly, such that my wireshark captures show the openLuup box trying to open a session, but getting back “HTTP/1.1 401 Unauthorized”
Where as the same code on the vera works and adds the “Authorization: Basic xxxxxxx\r]n” to the HTTP header.
What am I missing, is this something that is handled internally on the vera and not on openLuup, or is this just a case of not knowing what I need to change to make this work within OpenLuup.
In digging around the forums I saw some posts where others had gotten Foscam’s to work with OpenLuup, so what is it that I’m missing…
Many thanks in advance.
From the logs:
2018-01-07 17:34:16.454 openLuup.scheduler:: [18] test cam device startup
2018-01-07 17:34:16.454 luup_log:18: FosCam-Startup:user:(xxxxxx) pass: (xxxxxxxx) ip: (192.168.100.63) url: (/tmpfs/snap.jpg) .
2018-01-07 17:34:16.454 luup_log:18: (test cam) State=-1
2018-01-07 17:34:16.454 openLuup.scheduler:: [18] test cam device startup completed: status=nil, msg=nil, name=nil
Here is output from Altui device state for camera:
{
"altuiid": "0-18",
"device_type": "urn:schemas-upnp-org:device:DigitalSecurityCamera:2",
"states": [
{
"id": 1,
"service": "urn:micasaverde-com:serviceId:Camera1",
"value": "/tmpfs/snap.jpg",
"variable": "URL"
},
{
"id": 2,
"service": "urn:micasaverde-com:serviceId:Camera1",
"value": "1",
"variable": "StepSize"
},
{
"id": 3,
"service": "urn:micasaverde-com:serviceId:Camera1",
"value": "0",
"variable": "ReversePan"
},
{
"id": 4,
"service": "urn:micasaverde-com:serviceId:Camera1",
"value": "0",
"variable": "ReverseTilt"
},
{
"id": 5,
"service": "urn:micasaverde-com:serviceId:HaDevice1",
"value": "camera_up,camera_down,camera_left,camera_right,camera_full_screen,camera_preset,camera_archive_snapshot",
"variable": "Commands"
},
{
"id": 6,
"service": "urn:micasaverde-com:serviceId:CameraMotionDetection1",
"value": "-1",
"variable": "State"
},
{
"id": 7,
"service": "urn:micasaverde-com:serviceId:Camera1",
"value": "xxxxxx",
"variable": "Username"
},
{
"id": 8,
"service": "urn:micasaverde-com:serviceId:Camera1",
"value": "xxxxxx",
"variable": "Password"
}
]
}