Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-platform-wemo

Package Overview
Dependencies
Maintainers
1
Versions
357
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-platform-wemo - npm Package Compare versions

Comparing version 3.2.0-beta.6 to 3.2.0-beta.7

10

CHANGELOG.md

@@ -25,5 +25,9 @@ # Change Log

- More interactive Homebridge UI - device configuration will expand once device ID entered
- Small changes to the startup logging
- Recommended node version bump to v14.17.3
- **Homebridge UI**
- More interactive Homebridge UI - device configuration will expand once device ID entered
- **Wemo Crockpot**
- Changed the cooking-time-remaining format in logs to HH:MM
- **Other**
- Small changes to the startup logging
- Recommended node version bump to v14.17.3

@@ -30,0 +34,0 @@ ### Fixed

@@ -127,3 +127,3 @@ /* jshint -W014, -W033, esversion: 9 */

if (this.enableDebugLogging) {
this.log('[%s] %s [mode: %s].', this.lang.recUpd, this.name, data.mode)
this.log('[%s] %s [mode: %s].', this.name, this.lang.recUpd, data.mode)
}

@@ -240,3 +240,3 @@

if (this.enableLogging) {
this.log('[%s] %s [0 %s].', this.name, this.lang.curTimer, this.lang.minutes)
this.log('[%s] %s [0:00].', this.name, this.lang.curTimer)
}

@@ -278,3 +278,3 @@ }

// The cooking minutes = value * 60, value must be less than 24
// The value is cooking hours, I don't think device can be set to cook for 24 hours as max
if (value === 24) {

@@ -305,7 +305,15 @@ value = 23.5

// Send the update
await this.sendDeviceUpdate(modeChange, value * 60)
const minutes = value * 60
await this.sendDeviceUpdate(modeChange, minutes)
// Log the change of cooking minutes if appropriate
const modMinutes = minutes % 60
if (this.enableLogging) {
this.log('[%s] %s [%s %s].', this.name, this.lang.curTimer, value * 60, this.lang.minutes)
this.log(
'[%s] %s [%s:%s].',
this.name,
this.lang.curTimer,
Math.floor(value),
modMinutes >= 10 ? modMinutes : '0' + modMinutes
)
}

@@ -370,21 +378,22 @@ } catch (err) {

try {
// The $value is passed as a value in minutes
let convertedTime = 0
if (value !== 0) {
// Don't continue if the rounded cooking time is the same as before
if (value === this.accessory.context.cacheTime) {
return
}
// The value is passed in minutes (cooking time remaining)
let hkValue = 0
if (value > 0) {
/*
(1) convert to minutes
(2) round to nearest 0.5 hour unit and
(1) convert to half-hour units (e.g. 159 -> 5.3)
(2) round to nearest 0.5 hour unit (e.g. 5.3 -> 5)
(3) if 0 then raise to 0.5 (as technically still cooking even if 1 minute)
*/
convertedTime = Math.max(Math.round(value / 30) / 2, 0.5)
hkValue = Math.max(Math.round(value / 30) / 2, 0.5)
}
// Don't continue if the rounded cooking time is the same as before
if (value === this.accessory.context.cacheTime) {
return
}
const rotSpeed = this.service.getCharacteristic(this.hapChar.RotationSpeed).value
// Change to LOW mode if cooking but cache is OFF
if (convertedTime > 0 && rotSpeed === 0) {
if (hkValue > 0 && rotSpeed === 0) {
this.service.updateCharacteristic(this.hapChar.RotationSpeed, 33)

@@ -395,9 +404,16 @@ this.accessory.context.cacheMode = 50

// Update the cooking time HomeKit characteristics
this.service.updateCharacteristic(this.hapChar.CurrentTemperature, convertedTime)
this.service.updateCharacteristic(this.hapChar.HeatingThresholdTemperature, convertedTime)
this.service.updateCharacteristic(this.hapChar.CurrentTemperature, hkValue)
this.service.updateCharacteristic(this.hapChar.HeatingThresholdTemperature, hkValue)
// Update the cache and log if appropriate
this.accessory.context.cacheTime = value
const modMinutes = value % 60
if (this.enableLogging) {
this.log('[%s] %s [%s %s].', this.name, this.lang.curTimer, value, this.lang.minutes)
this.log(
'[%s] %s [%s:%s].',
this.name,
this.lang.curTimer,
Math.floor(value / 60),
modMinutes >= 10 ? modMinutes : '0' + modMinutes
)
}

@@ -404,0 +420,0 @@ } catch (err) {

@@ -241,3 +241,3 @@ /* jshint -W014, -W033, esversion: 9 */

}
// Update the HomeKit characteristics

@@ -272,3 +272,3 @@ this.service.updateCharacteristic(this.hapChar.On, value)

}
// Update the HomeKit characteristic

@@ -297,3 +297,3 @@ this.service.updateCharacteristic(this.hapChar.OutletInUse, value)

}
// Update the cache value

@@ -349,3 +349,3 @@ this.cachePower = power

}
// Update the cache last value

@@ -377,3 +377,3 @@ this.accessory.context.cacheLastWM = todayWm

// Don't continue with logging if disabled for some reason
if (this.disableDeviceLogging || this.skipTimeDiff) {
if (!this.enableLogging || this.skipTimeDiff) {
return

@@ -380,0 +380,0 @@ }

@@ -434,3 +434,3 @@ /* jshint -W014, -W033, esversion: 9 */

const mToK = Math.round(1000000 / value)
this.log('[%s] current cct [%sK / %sM].', this.name, mToK, value)
this.log('[%s] %s [%sK / %sM].', this.name, this.lang.curCCT, mToK, value)
}

@@ -437,0 +437,0 @@

@@ -96,3 +96,3 @@ /* jshint -W014, -W033, esversion: 9 */

if (this.motionTimer) {
if (!this.disableDeviceLogging) {
if (this.enableLogging) {
this.log('[%s] %s.', this.name, this.lang.timerStopped)

@@ -119,3 +119,3 @@ }

// Log the change if appropriate
if (!this.disableDeviceLogging) {
if (this.enableLogging) {
this.log(

@@ -130,3 +130,3 @@ '[%s] %s [%s].',

// CASE: motion not detected and the user motion timer is more than 0 seconds
if (!this.disableDeviceLogging) {
if (this.enableLogging) {
this.log('[%s] %s [%ss].', this.name, this.lang.timerStarted, this.noMotionTimer)

@@ -147,3 +147,3 @@ }

// Log the change if appropriate
if (!this.disableDeviceLogging) {
if (this.enableLogging) {
this.log(

@@ -150,0 +150,0 @@ '[%s] %s [%s] [%s].',

@@ -264,3 +264,3 @@ /* jshint -W014, -W033, esversion: 9 */

}
// Update the HomeKit characteristics

@@ -379,3 +379,3 @@ this.service.updateCharacteristic(this.hapChar.Active, value)

}
// Update the cache last value

@@ -407,3 +407,3 @@ this.accessory.context.cacheLastWM = todayWm

// Don't continue with logging if disabled for some reason
if (this.disableDeviceLogging || this.skipTimeDiff) {
if (!this.enableLogging || this.skipTimeDiff) {
return

@@ -410,0 +410,0 @@ }

@@ -236,3 +236,3 @@ /* jshint -W014, -W033, esversion: 9 */

}
// Update the HomeKit characteristics

@@ -266,3 +266,3 @@ this.service.updateCharacteristic(this.hapChar.On, value)

}
// Update the cache value

@@ -318,3 +318,3 @@ this.cachePower = power

}
// Update the cache last value

@@ -346,3 +346,3 @@ this.accessory.context.cacheLastWM = todayWm

// Don't continue with logging if disabled for some reason
if (this.disableDeviceLogging || this.skipTimeDiff) {
if (!this.enableLogging || this.skipTimeDiff) {
return

@@ -349,0 +349,0 @@ }

@@ -88,3 +88,2 @@ /* jshint -W014, -W033, esversion: 9 */

makerTrigExt: 'triggered externally',
minutes: 'minutes',
modelLED: 'LED Bulb (Via Link)',

@@ -91,0 +90,0 @@ motionNo: 'clear',

{
"name": "homebridge-platform-wemo",
"alias": "BelkinWeMo",
"version": "3.2.0-beta.6",
"version": "3.2.0-beta.7",
"author": "bwp91",

@@ -6,0 +6,0 @@ "description": "Homebridge plugin to control Wemo devices.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc