You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
};
The lines added are :
if(res.statusCode == 403){
return [];
}
If anyone have another solution...
The text was updated successfully, but these errors were encountered:
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...
The text was updated successfully, but these errors were encountered: