iobroker.shelly
Advanced tools
Comparing version 2.0.4 to 2.0.5
{ | ||
"common": { | ||
"name": "shelly", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"news": { | ||
"2.0.5": { | ||
"en": "Fixing an error if Shelly device is not reachable (offline)", | ||
"de": "Fehlebehebung wenn Shelly ist offline" | ||
}, | ||
"2.0.4": { | ||
@@ -7,0 +11,0 @@ "en": "Support of js-controller compact mode and performance optimizing ", |
{ | ||
"name": "iobroker.shelly", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "Shelly", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -41,2 +41,5 @@ ![Logo](admin/shelly.png) | ||
### 2.0.5 (07.01.2018) | ||
* Fixing an error if Shelly device is not reachable (offline) | ||
### 2.0.4 (04.01.2018) | ||
@@ -43,0 +46,0 @@ * Support of js-controller compact mode and performance optimizing. Relay status changes will be shown much faster in ioBroker for Shelly 1, 2 and 4Pro |
@@ -245,4 +245,4 @@ /* jshint -W097 */ | ||
if (deviceId) { | ||
adapter.log.debug('Create Shelly States for ' + deviceId); | ||
if (deviceId && typeof deviceId === 'string') { | ||
createDevice(deviceId, description, ip); | ||
@@ -277,3 +277,4 @@ if (deviceId.startsWith('SHSW-1')) { | ||
if (deviceId) { | ||
adapter.log.debug('Update Shelly States for ' + deviceId); | ||
if (deviceId && typeof deviceId === 'string') { | ||
if (deviceId.startsWith('SHSW-1')) { | ||
@@ -1609,19 +1610,22 @@ updateShelly1States(deviceId, status, callback); | ||
adapter.log.debug('Status update received for ' + deviceId + ': ' + JSON.stringify(status)); | ||
if (!knownDevices[deviceId]) { // device unknown so far, new one in network, create it | ||
shelly.getDeviceDescription(deviceId, (err, deviceId, description, ip) => { | ||
createShellyStates(deviceId, description, ip, status); | ||
updateShellyStates(deviceId, status); | ||
if (!deviceId.startsWith('SHHT')) { | ||
pollStates(deviceId); | ||
} | ||
objectHelper.processObjectQueue(() => { | ||
adapter.log.debug('Initialize device ' + deviceId + ' (' + Object.keys(knownDevices).length + ' now known)'); | ||
}); // if device is added later, create all objects | ||
knownDevices[deviceId] = true; | ||
}); | ||
return; | ||
if (deviceId && typeof deviceId === 'string') { | ||
if (!knownDevices[deviceId]) { // device unknown so far, new one in network, create it | ||
shelly.getDeviceDescription(deviceId, (err, deviceId, description, ip) => { | ||
createShellyStates(deviceId, description, ip, status); | ||
updateShellyStates(deviceId, status); | ||
if (!deviceId.startsWith('SHHT')) { | ||
pollStates(deviceId); | ||
} | ||
objectHelper.processObjectQueue(() => { | ||
adapter.log.debug('Initialize device ' + deviceId + ' (' + Object.keys(knownDevices).length + ' now known)'); | ||
}); // if device is added later, create all objects | ||
knownDevices[deviceId] = true; | ||
}); | ||
return; | ||
} | ||
updateShellyStates(deviceId, status); | ||
objectHelper.processObjectQueue(() => { }); | ||
} else { | ||
adapter.log.debug('Device Id is missing ' + deviceId); | ||
} | ||
updateShellyStates(deviceId, status); | ||
objectHelper.processObjectQueue(() => { }); | ||
}); | ||
@@ -1668,3 +1672,3 @@ | ||
// If started as allInOne mode => return function to create instance | ||
if (typeof module !== undefined && module.parent) { | ||
if (typeof module !== "undefined" && module.parent) { | ||
module.exports = startAdapter; | ||
@@ -1671,0 +1675,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
265803
2464
115