Skip to content

Commit

Permalink
4.4.18 release (#723)
Browse files Browse the repository at this point in the history
    Removed use of Characteristic.getValue() in preparation for homebridge 2.0 (4384f7b)
    Added ping state change logging for troubleshooting (c5a49c2)
  • Loading branch information
kiwi-cam authored Aug 7, 2024
1 parent 281480f commit 846d43c
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 19 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.4.18 - 2024-08-08]
### Added
- Added ping state change logging for troubleshooting
### Changed
- Removed use of Characteristic.getValue() in preparation of homebridge 2.0 (#722)
- The removal of getValue() has stopped the regular getCurrentTemperature and getCurrentHumidity calls. Changed the regualar updates to make these calls instead of just using refreshCharacteristic. (#722)

## [4.4.17 - 2024-07-17]
### Added
- Adds support for RM3 Mini 0x27d0 (#691)
Expand Down
2 changes: 1 addition & 1 deletion accessories/aircon.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class AirConAccessory extends BroadlinkRMAccessory {
device.checkTemperature();

this.updateTemperatureUI();
if (!config.isUnitTest) {setInterval(this.updateTemperatureUI.bind(this), config.temperatureUpdateFrequency * 1000)}
if (!config.isUnitTest) {setInterval(()=>{this.getCurrentTemperature(this.updateTemperatureUI.bind(this))}, config.temperatureUpdateFrequency * 1000)}
}

onTemperature (temperature,humidity) {
Expand Down
2 changes: 1 addition & 1 deletion accessories/humidifier-dehumidifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class HumidifierDehumidifierAccessory extends FanAccessory {
device.checkHumidity();

this.updateHumidityUI();
if (!config.isUnitTest && !config.noHumidity) {setInterval(this.updateHumidityUI.bind(this), config.humidityUpdateFrequency * 1000)}
if (!config.isUnitTest && !config.noHumidity) {setInterval(()=>{this.getCurrentHumidity(this.updateHumidityUI.bind(this))}, config.humidityUpdateFrequency * 1000)}
}

onHumidity (temperature,humidity) {
Expand Down
6 changes: 4 additions & 2 deletions accessories/switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ class SwitchAccessory extends BroadlinkRMAccessory {
}

pingCallback (active) {
const { config, state, serviceManager } = this;
const { config, state, serviceManager, name, log, logLevel } = this;

if (this.stateChangeInProgress){
return;
}


if (state.switchState !== active && logLevel <=2){log(`\x1b[35m[INFO]\x1b[0m ${name} ping detected state change, now ${active}`);}

if (config.pingIPAddressStateOnly) {
state.switchState = active ? true : false;
serviceManager.refreshCharacteristicUI(Characteristic.On);
Expand Down
4 changes: 2 additions & 2 deletions helpers/serviceManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ServiceManager {
}

refreshCharacteristicUI (characteristic) {
this.getCharacteristic(characteristic).getValue();
this.getCharacteristic(characteristic).value;
}

// Convenience
Expand Down Expand Up @@ -76,4 +76,4 @@ class ServiceManager {
}
}

module.exports = ServiceManager
module.exports = ServiceManager
22 changes: 12 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "homebridge-broadlink-rm-pro",
"displayName": "Homebridge Broadlink RM Pro",
"version": "4.4.17",
"version": "4.4.18",
"description": "Broadlink RM plugin (including the mini and pro) for homebridge with AC Pro and TV features",
"license": "ISC",
"scripts": {
Expand Down Expand Up @@ -32,10 +32,10 @@
"await-semaphore": "^0.1.3",
"kiwicam-broadlinkjs-rm": "^0.9.22",
"chai": "^4.3.7",
"fakegato-history": "^0.6.4",
"fakegato-history": "^0.6.5",
"find-key": "^2.1.3",
"github-version-checker": "^2.3.0",
"mqtt": "^5.8.0",
"mqtt": "^5.8.1",
"node-persist": ">=2.1.0 <3.0.0",
"semver": "^7.5.4",
"node-arp": "^1.0.6",
Expand Down

0 comments on commit 846d43c

Please sign in to comment.