Skip to content

Commit

Permalink
2.2.0 - Changed Eve stats from 9 min to 10 min.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuhlin committed Nov 10, 2021
1 parent 38db769 commit 2c52753
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 48 deletions.
97 changes: 60 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,90 @@

<p align="center">
<img alt="Home Bridge logotype" src="https://github.com/homebridge/branding/raw/master/logos/homebridge-wordmark-logo-vertical.png" width="150">
</p>

# Homebridge Platform Aqua Temp Plugin

This is a plugin for Aqua Temp pool heater.

# Support for

1.0.0
* Water temperature

1.1.0
* Added support to turn on and off the device
- Water temperature

1.1.0

- Added support to turn on and off the device

1.2.0

- Added support for getting token from username and password

1.3.0

- Added support for refreshing token
- Added support for outdoor temperature

1.4.0

- Changed from switch to Thermostat
- Added support for target temperature
- Added code to remove old devices (should clean up stuff from 1.3.0 and older)

1.4.1

1.2.0
* Added support for getting token from username and password
- Trying to fix start up bug

1.3.0
* Added support for refreshing token
* Added support for outdoor temperature
1.4.2

1.4.0
* Changed from switch to Thermostat
* Added support for target temperature
* Added code to remove old devices (should clean up stuff from 1.3.0 and older)
- Fixing with correct Characteristic

1.4.1
* Trying to fix start up bug
1.4.3, 1.4.4, 1.4.5

1.4.2
* Fixing with correct Characteristic
- Trying to fix token refresh bug

1.4.3, 1.4.4, 1.4.5
* Trying to fix token refresh bug
1.5.0, 1.5.1

1.5.0, 1.5.1
* Change to not heating status when target temp is lower then current temp or if the pump doesnt have water flow.
- Change to not heating status when target temp is lower then current temp or if the pump doesnt have water flow.

1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9
* Beta version of Eve logging for current pool temperate (Requiers Eve app, Apple Home app does not support logging).
1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9

1.7.0
* Eve logging should now work!
- Beta version of Eve logging for current pool temperate (Requiers Eve app, Apple Home app does not support logging).

1.7.1
* Added debug message for testing current power usage
1.7.0

1.8.0
* Added option to view an extra thermometer for water temperature
- Eve logging should now work!

1.9.0, 1.9.1
* Beta version for view electric power usage in Eve app.
1.7.1

1.9.2
* Changed to use electric power usage instead of temperature to show if the heater is on or not.
- Added debug message for testing current power usage

2.0.0
* Added Eve Total Power Consumption
1.8.0

2.1.0
* Added support for silence mode.
- Added option to view an extra thermometer for water temperature

1.9.0, 1.9.1

- Beta version for view electric power usage in Eve app.

1.9.2

- Changed to use electric power usage instead of temperature to show if the heater is on or not.

2.0.0

- Added Eve Total Power Consumption

2.1.0

- Added support for silent mode.

2.2.0

- Changed Eve stats from 9 min to 10 min.

# Default config

```json
"platforms": [
{
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"displayName": "Aqua Temp Plugin",
"name": "homebridge-aqua-temp",
"version": "2.1.0",
"version": "2.2.0",
"description": "This is a plugin for Aqua Temp pool heater.",
"license": "Apache-2.0",
"repository": {
Expand Down
4 changes: 3 additions & 1 deletion src/accessories/ThermostatAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ export class ThermostatAccessory {
this.service.getCharacteristic(this.platform.Characteristic.TargetHeatingCoolingState).onSet(this.setState.bind(this));
this.service.getCharacteristic(this.platform.Characteristic.TargetTemperature).onSet(this.setTemperature.bind(this));

this.serviceSwitch = this.accessory.getService(this.platform.Service.Switch) || this.accessory.addService(this.platform.Service.Switch);
this.serviceSwitch = this.accessory.getService(this.platform.Service.Switch) ||
this.accessory.addService(this.platform.Service.Switch, 'Silent mode');

this.serviceSwitch.setCharacteristic(this.platform.Characteristic.On, false);
this.serviceSwitch.getCharacteristic(this.platform.Characteristic.On).on('set', this.setOn.bind(this));

Expand Down
16 changes: 8 additions & 8 deletions src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export class AquaTempHomebridgePlatform implements DynamicPlatformPlugin {
public LoginTries = 0;

private lastUpdate1min = new Date('2021-01-01');
private lastUpdate9min = new Date('2021-01-01');
private lastUpdate10min = new Date('2021-01-01');
private update1min=false;
private update9min=false;
private update10min=false;
private start = true;

constructor(
Expand Down Expand Up @@ -64,16 +64,16 @@ export class AquaTempHomebridgePlatform implements DynamicPlatformPlugin {

const now = new Date();
const added1Min = new Date(this.lastUpdate1min.getTime()+(1*60000));
const added9Min = new Date(this.lastUpdate9min.getTime()+(9*60000));
const added10Min = new Date(this.lastUpdate10min.getTime()+(10*60000));

if (now>added1Min) {
this.lastUpdate1min = now;
this.update1min = true;
}

if (now>added9Min) {
this.lastUpdate9min = now;
this.update9min = true;
if (now>added10Min) {
this.lastUpdate10min = now;
this.update10min = true;
}

if (results!==undefined) {
Expand Down Expand Up @@ -196,7 +196,7 @@ export class AquaTempHomebridgePlatform implements DynamicPlatformPlugin {

if (this.config['EveLoging'] as boolean) {

if (this.update9min) {
if (this.update10min) {
if (this.start===false){
thermostatObject.accessory.context.fakeGatoService.setExtraPersistedData({
totalenergy:thermostatObject.accessory.context.totalenergy});
Expand Down Expand Up @@ -282,7 +282,7 @@ export class AquaTempHomebridgePlatform implements DynamicPlatformPlugin {
});

this.update1min= false;
this.update9min= false;
this.update10min= false;
}

getToken(start:boolean): string {
Expand Down

0 comments on commit 2c52753

Please sign in to comment.