I tried to add another instance of MDAH with a Domoticz user with only some devices.
It seems that this user can't access to json.html?type=cameras with a 403 http error so I have update his own instance file mdah.js with this :
function DevCamera() {
var url = getURL() + "?type=cameras&rid=";
var res = requester('GET', url);
if(res.statusCode == 403){
return [];
}
var data = JSON.parse(res.body.toString('utf-8'));
var combo = [];
if (typeof data.result !== 'undefined' && data.result !== null) {
for (var i = 0; i < data.result.length; i++) {
var myfeed = {"id": "C"+i, "name": data.result[i].Name, "type": "DevCamera", "room": "Switches"};
var params = [];
params.push({"key": "localjpegurl", "value": data.result[i].ImageURL});
myfeed.params = params;
combo.push(myfeed);
}
}
return (combo);
};
Hi everyone,
I tried to add another instance of MDAH with a Domoticz user with only some devices. It seems that this user can't access to json.html?type=cameras with a 403 http error so I have update his own instance file mdah.js with this :
The lines added are :
If anyone have another solution...