iobroker.easee 1.0.7 → 1.0.8
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/LICENSE +21 -21
- package/README.md +85 -78
- package/admin/admin.d.ts +93 -93
- package/admin/index_m.html +143 -143
- package/admin/style.css +32 -32
- package/admin/words.js +101 -101
- package/io-package.json +293 -293
- package/lib/adapter-config.d.ts +18 -18
- package/lib/enum.js +385 -386
- package/lib/tools.js +99 -99
- package/main.js +1399 -1398
- package/main.test.js +30 -30
- package/package.json +60 -57
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021 Newan <info@newan.de>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Newan <info@newan.de>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,79 +1,86 @@
|
|
|
1
|
-

|
|
2
|
-
# ioBroker.easee
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/iobroker.easee)
|
|
5
|
-
[](https://www.npmjs.com/package/iobroker.easee)
|
|
6
|
-

|
|
7
|
-

|
|
8
|
-
[](https://david-dm.org/Newan/iobroker.easee)
|
|
9
|
-
[](https://snyk.io/test/github/Newan/ioBroker.easee)
|
|
10
|
-
|
|
11
|
-
[](https://nodei.co/npm/iobroker.easee/)
|
|
12
|
-
|
|
13
|
-
**Tests:** 
|
|
14
|
-
|
|
15
|
-
## easee adapter for ioBroker
|
|
16
|
-
|
|
17
|
-
Adapter to connect Easee Wallbox
|
|
18
|
-
|
|
19
|
-
## Help
|
|
20
|
-
|
|
21
|
-
chargerOpMode =
|
|
22
|
-
Offline: 0,
|
|
23
|
-
Disconnected: 1,
|
|
24
|
-
AwaitingStart: 2,
|
|
25
|
-
Charging: 3,
|
|
26
|
-
Completed: 4,
|
|
27
|
-
Error: 5,
|
|
28
|
-
ReadyToCharge: 6
|
|
29
|
-
|
|
30
|
-
dynamicCircuitCurrentPX -> All phases must be set within 500ms (script) otherwise the phase will be set to 0.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+

|
|
2
|
+
# ioBroker.easee
|
|
3
|
+
|
|
4
|
+
[](https://www.npmjs.com/package/iobroker.easee)
|
|
5
|
+
[](https://www.npmjs.com/package/iobroker.easee)
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+
[](https://david-dm.org/Newan/iobroker.easee)
|
|
9
|
+
[](https://snyk.io/test/github/Newan/ioBroker.easee)
|
|
10
|
+
|
|
11
|
+
[](https://nodei.co/npm/iobroker.easee/)
|
|
12
|
+
|
|
13
|
+
**Tests:** 
|
|
14
|
+
|
|
15
|
+
## easee adapter for ioBroker
|
|
16
|
+
|
|
17
|
+
Adapter to connect Easee Wallbox
|
|
18
|
+
|
|
19
|
+
## Help
|
|
20
|
+
|
|
21
|
+
chargerOpMode =
|
|
22
|
+
Offline: 0,
|
|
23
|
+
Disconnected: 1,
|
|
24
|
+
AwaitingStart: 2,
|
|
25
|
+
Charging: 3,
|
|
26
|
+
Completed: 4,
|
|
27
|
+
Error: 5,
|
|
28
|
+
ReadyToCharge: 6
|
|
29
|
+
|
|
30
|
+
dynamicCircuitCurrentPX -> All phases must be set within 500ms (script) otherwise the phase will be set to 0.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Changelog
|
|
34
|
+
<!--
|
|
35
|
+
Placeholder for the next version (at the beginning of the line):
|
|
36
|
+
### **WORK IN PROGRESS**
|
|
37
|
+
-->
|
|
38
|
+
### 1.0.8 (2023-07-02)
|
|
39
|
+
* (Newan) small fixes
|
|
40
|
+
|
|
41
|
+
### 1.0.7
|
|
42
|
+
* (Newan) Changed login URL
|
|
43
|
+
|
|
44
|
+
### 1.0.6
|
|
45
|
+
* (Newan) Changed that smart charging is editable
|
|
46
|
+
|
|
47
|
+
### 1.0.5
|
|
48
|
+
* (marwin79) More Features supported and convert values to expected datatypes
|
|
49
|
+
|
|
50
|
+
### 1.0.4
|
|
51
|
+
* (Newan) dynamicCircuitCurrentPX writeable (set all Phases in 500ms) to limit ampere
|
|
52
|
+
|
|
53
|
+
### 1.0.3
|
|
54
|
+
* (Newan) Adapter crash fixed an other bugfixes
|
|
55
|
+
|
|
56
|
+
### 1.0.1
|
|
57
|
+
* (Newan) Add circuitMaxCurrentPX to limit current ampere
|
|
58
|
+
|
|
59
|
+
### 1.0.0
|
|
60
|
+
* (Newan) Stable Version with SignalR
|
|
61
|
+
|
|
62
|
+
## Donation
|
|
63
|
+
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=L55UBQJKJEUJL)
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
MIT License
|
|
67
|
+
|
|
68
|
+
Copyright (c) 2021 Newan <iobroker@newan.de>
|
|
69
|
+
|
|
70
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
71
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
72
|
+
in the Software without restriction, including without limitation the rights
|
|
73
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
74
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
75
|
+
furnished to do so, subject to the following conditions:
|
|
76
|
+
|
|
77
|
+
The above copyright notice and this permission notice shall be included in all
|
|
78
|
+
copies or substantial portions of the Software.
|
|
79
|
+
|
|
80
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
81
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
82
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
83
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
84
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
85
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
79
86
|
SOFTWARE.
|
package/admin/admin.d.ts
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
declare let systemDictionary: Record<string, Record<string, string>>;
|
|
2
|
-
|
|
3
|
-
declare let load: (settings: Record<string, unknown>, onChange: (hasChanges: boolean) => void) => void;
|
|
4
|
-
declare let save: (callback: (settings: Record<string, unknown>) => void) => void;
|
|
5
|
-
|
|
6
|
-
// make load and save exist on the window object
|
|
7
|
-
interface Window {
|
|
8
|
-
load: typeof load;
|
|
9
|
-
save: typeof save;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare const instance: number;
|
|
13
|
-
declare const adapter: string;
|
|
14
|
-
/** Translates text */
|
|
15
|
-
declare function _(text: string): string;
|
|
16
|
-
declare const socket: ioBrokerSocket;
|
|
17
|
-
declare function sendTo(
|
|
18
|
-
instance: any | null,
|
|
19
|
-
command: string,
|
|
20
|
-
message: any,
|
|
21
|
-
callback: (result: SendToResult) => void | Promise<void>,
|
|
22
|
-
): void;
|
|
23
|
-
|
|
24
|
-
interface SendToResult {
|
|
25
|
-
error?: string | Error;
|
|
26
|
-
result?: any;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// tslint:disable-next-line:class-name
|
|
30
|
-
interface ioBrokerSocket {
|
|
31
|
-
emit(
|
|
32
|
-
command: 'subscribeObjects',
|
|
33
|
-
pattern: string,
|
|
34
|
-
callback?: (err?: string) => void | Promise<void>,
|
|
35
|
-
): void;
|
|
36
|
-
emit(
|
|
37
|
-
command: 'subscribeStates',
|
|
38
|
-
pattern: string,
|
|
39
|
-
callback?: (err?: string) => void | Promise<void>,
|
|
40
|
-
): void;
|
|
41
|
-
emit(
|
|
42
|
-
command: 'unsubscribeObjects',
|
|
43
|
-
pattern: string,
|
|
44
|
-
callback?: (err?: string) => void | Promise<void>,
|
|
45
|
-
): void;
|
|
46
|
-
emit(
|
|
47
|
-
command: 'unsubscribeStates',
|
|
48
|
-
pattern: string,
|
|
49
|
-
callback?: (err?: string) => void | Promise<void>,
|
|
50
|
-
): void;
|
|
51
|
-
|
|
52
|
-
emit(
|
|
53
|
-
event: 'getObjectView',
|
|
54
|
-
view: 'system',
|
|
55
|
-
type: 'device',
|
|
56
|
-
options: ioBroker.GetObjectViewParams,
|
|
57
|
-
callback: (
|
|
58
|
-
err: string | undefined,
|
|
59
|
-
result?: any,
|
|
60
|
-
) => void | Promise<void>,
|
|
61
|
-
): void;
|
|
62
|
-
emit(
|
|
63
|
-
event: 'getStates',
|
|
64
|
-
callback: (
|
|
65
|
-
err: string | undefined,
|
|
66
|
-
result?: Record<string, any>,
|
|
67
|
-
) => void,
|
|
68
|
-
): void;
|
|
69
|
-
emit(
|
|
70
|
-
event: 'getState',
|
|
71
|
-
id: string,
|
|
72
|
-
callback: (err: string | undefined, result?: ioBroker.State) => void,
|
|
73
|
-
): void;
|
|
74
|
-
emit(
|
|
75
|
-
event: 'setState',
|
|
76
|
-
id: string,
|
|
77
|
-
state: unknown,
|
|
78
|
-
callback: (err: string | undefined, result?: any) => void,
|
|
79
|
-
): void;
|
|
80
|
-
|
|
81
|
-
on(event: 'objectChange', handler: ioBroker.ObjectChangeHandler): void;
|
|
82
|
-
on(event: 'stateChange', handler: ioBroker.StateChangeHandler): void;
|
|
83
|
-
removeEventHandler(
|
|
84
|
-
event: 'objectChange',
|
|
85
|
-
handler: ioBroker.ObjectChangeHandler,
|
|
86
|
-
): void;
|
|
87
|
-
removeEventHandler(
|
|
88
|
-
event: 'stateChange',
|
|
89
|
-
handler: ioBroker.StateChangeHandler,
|
|
90
|
-
): void;
|
|
91
|
-
|
|
92
|
-
// TODO: other events
|
|
93
|
-
}
|
|
1
|
+
declare let systemDictionary: Record<string, Record<string, string>>;
|
|
2
|
+
|
|
3
|
+
declare let load: (settings: Record<string, unknown>, onChange: (hasChanges: boolean) => void) => void;
|
|
4
|
+
declare let save: (callback: (settings: Record<string, unknown>) => void) => void;
|
|
5
|
+
|
|
6
|
+
// make load and save exist on the window object
|
|
7
|
+
interface Window {
|
|
8
|
+
load: typeof load;
|
|
9
|
+
save: typeof save;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const instance: number;
|
|
13
|
+
declare const adapter: string;
|
|
14
|
+
/** Translates text */
|
|
15
|
+
declare function _(text: string): string;
|
|
16
|
+
declare const socket: ioBrokerSocket;
|
|
17
|
+
declare function sendTo(
|
|
18
|
+
instance: any | null,
|
|
19
|
+
command: string,
|
|
20
|
+
message: any,
|
|
21
|
+
callback: (result: SendToResult) => void | Promise<void>,
|
|
22
|
+
): void;
|
|
23
|
+
|
|
24
|
+
interface SendToResult {
|
|
25
|
+
error?: string | Error;
|
|
26
|
+
result?: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// tslint:disable-next-line:class-name
|
|
30
|
+
interface ioBrokerSocket {
|
|
31
|
+
emit(
|
|
32
|
+
command: 'subscribeObjects',
|
|
33
|
+
pattern: string,
|
|
34
|
+
callback?: (err?: string) => void | Promise<void>,
|
|
35
|
+
): void;
|
|
36
|
+
emit(
|
|
37
|
+
command: 'subscribeStates',
|
|
38
|
+
pattern: string,
|
|
39
|
+
callback?: (err?: string) => void | Promise<void>,
|
|
40
|
+
): void;
|
|
41
|
+
emit(
|
|
42
|
+
command: 'unsubscribeObjects',
|
|
43
|
+
pattern: string,
|
|
44
|
+
callback?: (err?: string) => void | Promise<void>,
|
|
45
|
+
): void;
|
|
46
|
+
emit(
|
|
47
|
+
command: 'unsubscribeStates',
|
|
48
|
+
pattern: string,
|
|
49
|
+
callback?: (err?: string) => void | Promise<void>,
|
|
50
|
+
): void;
|
|
51
|
+
|
|
52
|
+
emit(
|
|
53
|
+
event: 'getObjectView',
|
|
54
|
+
view: 'system',
|
|
55
|
+
type: 'device',
|
|
56
|
+
options: ioBroker.GetObjectViewParams,
|
|
57
|
+
callback: (
|
|
58
|
+
err: string | undefined,
|
|
59
|
+
result?: any,
|
|
60
|
+
) => void | Promise<void>,
|
|
61
|
+
): void;
|
|
62
|
+
emit(
|
|
63
|
+
event: 'getStates',
|
|
64
|
+
callback: (
|
|
65
|
+
err: string | undefined,
|
|
66
|
+
result?: Record<string, any>,
|
|
67
|
+
) => void,
|
|
68
|
+
): void;
|
|
69
|
+
emit(
|
|
70
|
+
event: 'getState',
|
|
71
|
+
id: string,
|
|
72
|
+
callback: (err: string | undefined, result?: ioBroker.State) => void,
|
|
73
|
+
): void;
|
|
74
|
+
emit(
|
|
75
|
+
event: 'setState',
|
|
76
|
+
id: string,
|
|
77
|
+
state: unknown,
|
|
78
|
+
callback: (err: string | undefined, result?: any) => void,
|
|
79
|
+
): void;
|
|
80
|
+
|
|
81
|
+
on(event: 'objectChange', handler: ioBroker.ObjectChangeHandler): void;
|
|
82
|
+
on(event: 'stateChange', handler: ioBroker.StateChangeHandler): void;
|
|
83
|
+
removeEventHandler(
|
|
84
|
+
event: 'objectChange',
|
|
85
|
+
handler: ioBroker.ObjectChangeHandler,
|
|
86
|
+
): void;
|
|
87
|
+
removeEventHandler(
|
|
88
|
+
event: 'stateChange',
|
|
89
|
+
handler: ioBroker.StateChangeHandler,
|
|
90
|
+
): void;
|
|
91
|
+
|
|
92
|
+
// TODO: other events
|
|
93
|
+
}
|