homebridge-evohome-modern 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +31 -0
- package/.github/dependabot.yml +15 -0
- package/.github/workflows/codeql.yml +72 -0
- package/.github/workflows/npm-publish.yml +17 -0
- package/.vscode/settings.json +3 -0
- package/README.md +103 -0
- package/assets/TCC_EMEA.png +0 -0
- package/assets/honeywell_evohome.png +0 -0
- package/assets/honeywell_round.png +0 -0
- package/config.schema.json +123 -0
- package/index.js +1375 -0
- package/lib/evohome.js +431 -0
- package/package.json +26 -0
package/.eslintrc
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"parser": "@typescript-eslint/parser",
|
|
3
|
+
"extends": [
|
|
4
|
+
"eslint:recommended",
|
|
5
|
+
"plugin:@typescript-eslint/eslint-recommended",
|
|
6
|
+
"plugin:@typescript-eslint/recommended", // uses the recommended rules from the @typescript-eslint/eslint-plugin
|
|
7
|
+
"plugin:jest/recommended" // enables eslint-plugin-jest
|
|
8
|
+
],
|
|
9
|
+
"parserOptions": {
|
|
10
|
+
"ecmaVersion": 2018,
|
|
11
|
+
"sourceType": "module"
|
|
12
|
+
},
|
|
13
|
+
"ignorePatterns": ["bin/"],
|
|
14
|
+
"rules": {
|
|
15
|
+
"quotes": ["error", "double"],
|
|
16
|
+
"indent": ["error", 2, { "SwitchCase": 1 }],
|
|
17
|
+
"linebreak-style": ["error", "unix"],
|
|
18
|
+
"semi": ["error", "always"],
|
|
19
|
+
|
|
20
|
+
"comma-dangle": ["error", "always-multiline"],
|
|
21
|
+
"dot-notation": "error",
|
|
22
|
+
"eqeqeq": "error",
|
|
23
|
+
"curly": ["error", "all"],
|
|
24
|
+
"brace-style": ["error"],
|
|
25
|
+
|
|
26
|
+
"no-var": ["error"],
|
|
27
|
+
"no-extra-bind": ["error"],
|
|
28
|
+
|
|
29
|
+
"@typescript-eslint/no-non-null-assertion": "off" // currently disabled, hap-nodejs has some bad typing (like getCharacteristic) for this to be enabled
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
|
3
|
+
# Please see the documentation for all configuration options:
|
|
4
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
+
|
|
6
|
+
version: 2
|
|
7
|
+
updates:
|
|
8
|
+
- package-ecosystem: "github-actions" # See documentation for possible values
|
|
9
|
+
directory: "/" # Location of package manifests
|
|
10
|
+
schedule:
|
|
11
|
+
interval: "daily"
|
|
12
|
+
- package-ecosystem: "npm" # See documentation for possible values
|
|
13
|
+
directory: "/" # Location of package manifests
|
|
14
|
+
schedule:
|
|
15
|
+
interval: "daily"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ "master" ]
|
|
17
|
+
pull_request:
|
|
18
|
+
# The branches below must be a subset of the branches above
|
|
19
|
+
branches: [ "master" ]
|
|
20
|
+
schedule:
|
|
21
|
+
- cron: '31 15 * * 1'
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
analyze:
|
|
25
|
+
name: Analyze
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
permissions:
|
|
28
|
+
actions: read
|
|
29
|
+
contents: read
|
|
30
|
+
security-events: write
|
|
31
|
+
|
|
32
|
+
strategy:
|
|
33
|
+
fail-fast: false
|
|
34
|
+
matrix:
|
|
35
|
+
language: [ 'javascript' ]
|
|
36
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
|
37
|
+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
|
38
|
+
|
|
39
|
+
steps:
|
|
40
|
+
- name: Checkout repository
|
|
41
|
+
uses: actions/checkout@v5
|
|
42
|
+
|
|
43
|
+
# Initializes the CodeQL tools for scanning.
|
|
44
|
+
- name: Initialize CodeQL
|
|
45
|
+
uses: github/codeql-action/init@v3
|
|
46
|
+
with:
|
|
47
|
+
languages: ${{ matrix.language }}
|
|
48
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
49
|
+
# By default, queries listed here will override any specified in a config file.
|
|
50
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
51
|
+
|
|
52
|
+
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
53
|
+
# queries: security-extended,security-and-quality
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
57
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
58
|
+
- name: Autobuild
|
|
59
|
+
uses: github/codeql-action/autobuild@v3
|
|
60
|
+
|
|
61
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
62
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
63
|
+
|
|
64
|
+
# If the Autobuild fails above, remove it and uncomment the following three lines.
|
|
65
|
+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
|
|
66
|
+
|
|
67
|
+
# - run: |
|
|
68
|
+
# echo "Run, Build Application using script"
|
|
69
|
+
# ./location_of_script_within_repo/buildscript.sh
|
|
70
|
+
|
|
71
|
+
- name: Perform CodeQL Analysis
|
|
72
|
+
uses: github/codeql-action/analyze@v3
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
on:
|
|
2
|
+
release:
|
|
3
|
+
types: [published]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
publish:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v5
|
|
10
|
+
- uses: actions/setup-node@v5
|
|
11
|
+
with:
|
|
12
|
+
node-version: 12
|
|
13
|
+
- run: npm install
|
|
14
|
+
- run: npm test
|
|
15
|
+
- uses: JS-DevTools/npm-publish@v3
|
|
16
|
+
with:
|
|
17
|
+
token: ${{ secrets.NPM_TOKEN }}
|
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<span align="center">
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
# Honeywell Evohome support for Homebridge
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
</span>
|
|
15
|
+
|
|
16
|
+
This ia a plugin to integrate [Honeywell Evohome](https://getconnected.honeywellhome.com/de/thermostate/evohome) into Apple HomeKit. It is work in progress. Help is greatly appreciated!
|
|
17
|
+
|
|
18
|
+
Up until now this plugin will only add your Thermostats and central functions (for example "ECO") to Homebridge. Other devices such as domestic hot water will probably follow in the future once we can wrap our heads arround it (and have someone to test it out).
|
|
19
|
+
|
|
20
|
+
## 🚀 Getting Started
|
|
21
|
+
|
|
22
|
+
**Homebridge with [Config UI X](https://github.com/oznu/homebridge-config-ui-x):**
|
|
23
|
+
1. Go to the "Plugins" tab and search for `homebridge-evohome`
|
|
24
|
+
2. Install the plugin and fill out the setup form
|
|
25
|
+
|
|
26
|
+
**Terminal / NPM:**
|
|
27
|
+
1. Install this plugin using `npm install -g homebridge-evohome@latest`
|
|
28
|
+
2. Update your configuration file ([sample-config below](https://github.com/luc-ass/homebridge-evohome#%EF%B8%8F-configuration))
|
|
29
|
+
|
|
30
|
+
## ⚙️ Configuration
|
|
31
|
+
|
|
32
|
+
Configuration sample:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
"platforms": [
|
|
36
|
+
{
|
|
37
|
+
"platform": "Evohome",
|
|
38
|
+
"name" : "Evohome",
|
|
39
|
+
"username" : "username/email",
|
|
40
|
+
"password" : "password",
|
|
41
|
+
"temperatureUnit" : "Celsius",
|
|
42
|
+
"locationIndex" : "0"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
| Parameter | optional | accepted values | info |
|
|
48
|
+
| :-- | :-- | :-- | :-- |
|
|
49
|
+
| `platform` | no | `Evohome` | |
|
|
50
|
+
| `name` | no | *any Name you want* | |
|
|
51
|
+
| `username` | no | *your Honeywell email adress* | |
|
|
52
|
+
| `password` | no | *your Honeywell password* | |
|
|
53
|
+
| `temperatureUnit` | yes | `Celsius`, `Fahrenheit` | defaults to `Celsius` |
|
|
54
|
+
| `locationIndex` | yes | `0`, `1`, `2`, etc. | only needed if you have multiple locations |
|
|
55
|
+
| `switchAway` | yes | `true`, `false` | creates a switch for away mode |
|
|
56
|
+
| `switchDayOff` | yes | `true`, `false` | creates a switch for day off mode |
|
|
57
|
+
| `switchEco` | yes | `true`, `false` | creates a switch for eco settings |
|
|
58
|
+
| `switchHeatingOff` | yes | `true`, `false` | creates a switch to tur off the heating |
|
|
59
|
+
| `switchCustom` | yes | `true`, `false` | creates a switch for your custom mode |
|
|
60
|
+
| `childBridge` | yes | `true`, `false` | allows you to have persistent accessories, if plugin is run inside a child bridge |
|
|
61
|
+
| `temperatureAboveAsOff` | yes | `true`, `false` | allows you to displays thermostats as off, if room temperature is above target temperature |
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## 📝 Roadmap
|
|
65
|
+
|
|
66
|
+
- [x] Get device names
|
|
67
|
+
- [x] Read temperature
|
|
68
|
+
- [x] Update temperature
|
|
69
|
+
- [x] Set target temperature (credits to @zizzex)
|
|
70
|
+
- [x] Change temperature until next scheduled event (credits to @fredericvl). This feature sets the temperature until the next scheduled event on the same day. If there is no event on the same day it will be scheduled until 00:00:00. As this is a new feature it contains advanced logging. Please post your log if you encounter any problems.
|
|
71
|
+
- [x] Make use of Elgato Eve graphs (using fakegato-history) including automatic updating (credits to @rooi)
|
|
72
|
+
- [x] Add "global device" to add Away/Energy saving etc. (credits to @fredericvl)
|
|
73
|
+
- [x] Add support for multiple locations. (credits to @ebarnard)
|
|
74
|
+
- [x] Add support for Honeywell Round Connected
|
|
75
|
+
- [ ] Add "DOMESTIC_HOT_WATER" with matching characteristics. This device will now be ignored to prevent errors (credits to @sOckhamSter).
|
|
76
|
+
|
|
77
|
+
## ⚠️ Known Issues & Notes
|
|
78
|
+
|
|
79
|
+
- System time/time zone must be the same as the time on your evohome controller or else schedules will work in unexpected ways.
|
|
80
|
+
- Your password may not contain `&` or else the login will fail.
|
|
81
|
+
- Updating from `<0.5.1` to `>0.6.0` will create new devices and put them into the standard room of your home. They just need to be moved back to their rooms. This is expected behaviour as the UUID has changed. Historic data will be retained. This can also happen without a clear cause. It is under investigation here: [#61](../../issues/61).
|
|
82
|
+
|
|
83
|
+
## 🧪 Beta Testing
|
|
84
|
+
|
|
85
|
+
This part talks about testing pre-release version of the plugin. I strongly recommend, that you don't do this in your production environment. It will frequently reset accessories and break automations. If you still want to or have been asked to, this is my preferred way of installing from github:
|
|
86
|
+
|
|
87
|
+
In Homebridge Config UI X Terminal:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
# go to node module directory
|
|
91
|
+
cd node_modules
|
|
92
|
+
# remove homebridge-evohome and contents
|
|
93
|
+
rm -r homebridge-evohome
|
|
94
|
+
# recreate the folder
|
|
95
|
+
mkdir homebridge-evohome
|
|
96
|
+
# clone repo to folder
|
|
97
|
+
git clone --single-branch --branch main https://github.com/luc-ass/homebridge-evohome.git ./homebridge-evohome
|
|
98
|
+
# cd into folder
|
|
99
|
+
cd homebridge-evohome
|
|
100
|
+
# install plugin
|
|
101
|
+
npm install
|
|
102
|
+
```
|
|
103
|
+
Now restart Homebridge
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "Evohome",
|
|
3
|
+
"pluginType": "platform",
|
|
4
|
+
"singular": false,
|
|
5
|
+
"headerDisplay": "This Plugin integrates your Honeywell Evohome into Homebridge. Please use your credentials from https://getconnected.honeywellhome.com. You should consider running this plugin as a child bridge, as it allows for persistent accessories, thus prevent breaking your automations!",
|
|
6
|
+
"footerDisplay": "It is important, that your Homebridge time zone is set correct. Please double check this! If you encounter any problems don't hesitate to have a look at https://github.com/luc-ass/homebridge-evohome.",
|
|
7
|
+
"schema": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": {
|
|
11
|
+
"title": "Name",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"default": "Evohome",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"required": true,
|
|
16
|
+
"description": "Plugin name as displayed in the Homebridge log"
|
|
17
|
+
},
|
|
18
|
+
"username": {
|
|
19
|
+
"title": "Username/Email adress",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "email",
|
|
22
|
+
"required": true
|
|
23
|
+
},
|
|
24
|
+
"password": {
|
|
25
|
+
"title": "Password",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"required": true
|
|
28
|
+
},
|
|
29
|
+
"temperatureUnit": {
|
|
30
|
+
"title": "Temperature Unit",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"default": "Celsius",
|
|
33
|
+
"oneOf": [
|
|
34
|
+
{ "title": "Celsius", "enum": ["Celsius"] },
|
|
35
|
+
{ "title": "Fahrenheit", "enum": ["Fahrenheit"] }
|
|
36
|
+
],
|
|
37
|
+
"required": true
|
|
38
|
+
},
|
|
39
|
+
"locationIndex": {
|
|
40
|
+
"title": "Location Index",
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"default": 0,
|
|
44
|
+
"required": false,
|
|
45
|
+
"description": "This should only be changed if you have more than one location. The index starts with \"0\" and counts up for each added home."
|
|
46
|
+
},
|
|
47
|
+
"switchAway": {
|
|
48
|
+
"title": "Display \"Away Switch\"",
|
|
49
|
+
"type": "boolean",
|
|
50
|
+
"default": true,
|
|
51
|
+
"required": false
|
|
52
|
+
},
|
|
53
|
+
"switchDayOff": {
|
|
54
|
+
"title": "Display \"Day Off Switch\"",
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"default": true,
|
|
57
|
+
"required": false
|
|
58
|
+
},
|
|
59
|
+
"switchEco": {
|
|
60
|
+
"title": "Display \"Eco Mode Switch\"",
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"default": true,
|
|
63
|
+
"required": false
|
|
64
|
+
},
|
|
65
|
+
"switchHeatingOff": {
|
|
66
|
+
"title": "Display \"Heating Off Switch\"",
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"default": true,
|
|
69
|
+
"required": false
|
|
70
|
+
},
|
|
71
|
+
"switchCustom": {
|
|
72
|
+
"title": "Display \"Custom Mode Switch\"",
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"default": true,
|
|
75
|
+
"required": false
|
|
76
|
+
},
|
|
77
|
+
"childBridge": {
|
|
78
|
+
"title": "This accessory runs in a child bridge (recommended)",
|
|
79
|
+
"description": "This switch should be turned on, if the platform is run as a child bridge. This ensures, that accessories are not lost on error.",
|
|
80
|
+
"type": "boolean",
|
|
81
|
+
"default": false,
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
"temperatureAboveAsOff": {
|
|
85
|
+
"title": "Represent room temperature above set temperature as off",
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": false,
|
|
88
|
+
"required": true
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"layout": [
|
|
93
|
+
"name",
|
|
94
|
+
{
|
|
95
|
+
"type": "flex",
|
|
96
|
+
"flex-flow": "row wrap",
|
|
97
|
+
"items": [
|
|
98
|
+
"username",
|
|
99
|
+
{
|
|
100
|
+
"key": "password",
|
|
101
|
+
"type": "password"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"type": "fieldset",
|
|
107
|
+
"title": "Optional Settings",
|
|
108
|
+
"expandable": true,
|
|
109
|
+
"expanded": false,
|
|
110
|
+
"items": [
|
|
111
|
+
"temperatureUnit",
|
|
112
|
+
"locationIndex",
|
|
113
|
+
"switchAway",
|
|
114
|
+
"switchDayOff",
|
|
115
|
+
"switchEco",
|
|
116
|
+
"switchHeatingOff",
|
|
117
|
+
"switchCustom",
|
|
118
|
+
"childBridge",
|
|
119
|
+
"temperatureAboveAsOff"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|