Code
function SendData(data) {
data.DeviceName = Name;
data.DeviceType = Device;
data.DeviceModel = Info.model;
let params = {
method: "POST",
url: CONFIG.DataURL,
headers: CONFIG.Auth,
content_type: 'application/json',
body: JSON.stringify(data)
};
Shelly.call("HTTP.Request", params, function (res, error_code, error_msg, ud) {
if (!error_code) {
if (res.code === 200) {
DeleteKVSandQueue(ud.key);
print("SendData: Data Sent", JSON.stringify(ud));
} else { print("SendData: HTTP Status code", res.code); }
} else { print("SendData: Error", JSON.stringify(error_code), JSON.stringify(error_msg)); }
},
data)
}
Alles anzeigen
I have two Shelly 4 Pro PM (fw 0.11.3) in the same local network, both connected with ethernet and set up identically. I can access the WebUI on both of them.
One of them has started to produce the error message: SendData: Error -114 "Resource unavailable: HTTP connect error -1!". It even does this on the first HTTP Request after a reboot.
Have I broken something in the device ?