Skip to content

Commit

Permalink
eve garage gap fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bwp91 committed Oct 20, 2021
1 parent 79e4887 commit 02fabf3
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ All notable changes to homebridge-ewelink will be documented in this file.

- Some small changes to Fakegato debug logging

### Fixed

- An Eve app 'no data' gap for garage and contact sensor devices when restarting the plugin

## 8.4.0 (2021-10-16)

### Added
Expand Down
3 changes: 3 additions & 0 deletions lib/device/sensor-contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ module.exports = class deviceSensorContact {
this.accessory.eveService = new platform.eveService('door', this.accessory, {
log: platform.config.debugFakegato ? this.log : () => {}
})
this.accessory.eveService.addEntry({
status: this.service.getCharacteristic(this.hapChar.ContactSensorState).value
})

// Output the customised options to the log
const opts = JSON.stringify({
Expand Down
3 changes: 3 additions & 0 deletions lib/device/simulation/garage-eachen.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ module.exports = class deviceGarageEachen {
this.accessory.eveService = new platform.eveService('door', this.accessory, {
log: platform.config.debugFakegato ? this.log : () => {}
})
this.accessory.eveService.addEntry({
status: this.service.getCharacteristic(this.hapChar.CurrentDoorState).value === 0 ? 0 : 1
})

// Output the customised options to the log
const opts = JSON.stringify({
Expand Down
3 changes: 3 additions & 0 deletions lib/device/simulation/garage-one.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ module.exports = class deviceGarageOne {
this.accessory.eveService = new platform.eveService('door', this.accessory, {
log: platform.config.debugFakegato ? this.log : () => {}
})
this.accessory.eveService.addEntry({
status: this.service.getCharacteristic(this.hapChar.CurrentDoorState).value === 0 ? 0 : 1
})

// Set up an interval to get eWeLink to send power updates
if (
Expand Down
3 changes: 3 additions & 0 deletions lib/device/simulation/gate-one.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ module.exports = class deviceGateOne {
this.accessory.eveService = new platform.eveService('door', this.accessory, {
log: platform.config.debugFakegato ? this.log : () => {}
})
this.accessory.eveService.addEntry({
status: this.service.getCharacteristic(this.hapChar.CurrentDoorState).value === 0 ? 0 : 1
})

// Set up an interval to get eWeLink to send power updates
if (
Expand Down
3 changes: 3 additions & 0 deletions lib/device/simulation/sensor-visible.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ module.exports = class deviceSensorVisible {
this.accessory.eveService = new platform.eveService('door', this.accessory, {
log: platform.config.debugFakegato ? this.log : () => {}
})
this.accessory.eveService.addEntry({
status: this.service.getCharacteristic(this.hapChar.ContactSensorState).value
})

// Output the customised options to the log
const opts = JSON.stringify({
Expand Down

0 comments on commit 02fabf3

Please sign in to comment.