Skip to content

Commit 28b56a0

Browse files
authored
Merge pull request #7 from california444/main
Use local UGW instead of Salus platform
2 parents 0792253 + c8c5d8e commit 28b56a0

File tree

13 files changed

+9901
-3778
lines changed

13 files changed

+9901
-3778
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ jobs:
77
runs-on: ubuntu-latest
88

99
strategy:
10+
fail-fast: false
1011
matrix:
11-
# the Node.js versions to build on
12-
node-version: [12.x, 13.x, 14.x, 15.x, 16.x]
12+
node-version: [18.x, 20.x, 22.x]
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616

17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v2
17+
- name: Use Node.js ${{ matrix.node-version }}
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121

@@ -27,5 +27,11 @@ jobs:
2727

2828
- name: Build the project
2929
run: npm run build
30-
env:
31-
CI: true
30+
31+
- name: List, audit, fix outdated dependencies and build again
32+
run: |
33+
npm list --outdated
34+
npm audit || true # ignore failures
35+
npm audit fix || true
36+
npm list --outdated
37+
npm run build

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
33

44
# homebridge-salus-sq610
5-
Salus plugin for [HomeBridge](https://github.com/nfarina/homebridge) using the [Salus *Connect* API](https://eu.salusconnect.io/dashboard) to expose Salus Thermostats to Apple's HomeKit.
5+
Salus plugin for [HomeBridge](https://github.com/nfarina/homebridge) using a the Salus UG600 universal gateway on the local network to expose Salus Thermostats to Apple's HomeKit.
66

77
**Supported devices:**
88
* SQ610
@@ -13,7 +13,6 @@ Salus plugin for [HomeBridge](https://github.com/nfarina/homebridge) using the [
1313
![HomeKit Screenshot](.github/statics/homekit-1.png)
1414

1515
## Things to know
16-
* Supports only one Salus account
1716
* Plugin implements all modes of heating, but let's the thermostate decide if it is in cooling or heating mode. (for example by shorting S1 & S2 pins on the board)
1817

1918
## Getting started
@@ -22,8 +21,8 @@ Salus plugin for [HomeBridge](https://github.com/nfarina/homebridge) using the [
2221
```
2322
{
2423
"platform": "SalusSQ610HomebridgePlugin",
25-
"email": "<YOUR_EMAIL_HERE>",
26-
"password": "<YOUR_PASSWORD_HERE>"
24+
"ip_address": "<UGW ip address like 192.168.0.100>",
25+
"eu_id": "<Either 0000000000000000 or provide real euid from the bottom side of UGW>"
2726
}
2827
```
2928

config.schema.json

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,23 @@
77
"schema": {
88
"type": "object",
99
"properties": {
10-
"email": {
11-
"title": "Email",
10+
"ip_address": {
11+
"title": "IP address",
1212
"type": "string",
1313
"required": true,
14-
"default": ""
14+
"default": "192.168.0.100"
1515
},
16-
"password": {
17-
"title": "Password",
16+
"eu_id": {
17+
"title": "EU-ID",
1818
"type": "string",
1919
"required": true,
20-
"default": ""
21-
},
22-
"salusUrl": {
23-
"title": "Salus URL",
24-
"type": "string",
25-
"required": false,
26-
"default": "eu.salusconnect.io"
20+
"default": "0000000000000000"
2721
},
2822
"refreshTime": {
2923
"title": "Refresh time",
3024
"type": "integer",
3125
"minimum": 15,
32-
"default": 15
26+
"default": 60
3327
}
3428
}
3529
}

eslint.config.mjs

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
import tsParser from "@typescript-eslint/parser";
2+
import path from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
import js from "@eslint/js";
5+
import { FlatCompat } from "@eslint/eslintrc";
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
13+
});
14+
15+
export default [{
16+
ignores: ["**/dist"],
17+
}, ...compat.extends(
18+
"eslint:recommended",
19+
"plugin:@typescript-eslint/eslint-recommended",
20+
"plugin:@typescript-eslint/recommended",
21+
), {
22+
languageOptions: {
23+
parser: tsParser,
24+
ecmaVersion: 2018,
25+
sourceType: "module",
26+
},
27+
28+
rules: {
29+
quotes: ["warn", "single"],
30+
indent: ["warn", 2, {
31+
SwitchCase: 1,
32+
}],
33+
semi: ["off"],
34+
"comma-dangle": ["warn", "always-multiline"],
35+
"dot-notation": "off",
36+
eqeqeq: "warn",
37+
curly: ["warn", "all"],
38+
"brace-style": ["warn"],
39+
"prefer-arrow-callback": ["warn"],
40+
"max-len": ["warn", 140],
41+
"no-console": ["warn"],
42+
"no-non-null-assertion": ["off"],
43+
"comma-spacing": ["error"],
44+
45+
"no-multi-spaces": ["warn", {
46+
ignoreEOLComments: true,
47+
}],
48+
49+
"no-trailing-spaces": ["warn"],
50+
51+
"lines-between-class-members": ["warn", "always", {
52+
exceptAfterSingleLine: true,
53+
}],
54+
55+
"@typescript-eslint/explicit-function-return-type": "off",
56+
"@typescript-eslint/no-non-null-assertion": "off",
57+
"@typescript-eslint/explicit-module-boundary-types": "off",
58+
},
59+
}];

0 commit comments

Comments
 (0)