node-red-contrib-power-saver 3.0.6 → 3.0.10
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/docs/.vuepress/config.js +5 -1
- package/docs/.vuepress/dist/404.html +3 -3
- package/docs/.vuepress/dist/assets/img/best-save-config.93fa3c21.png +0 -0
- package/docs/.vuepress/dist/assets/img/lowest-price-config.6d66a8c2.png +0 -0
- package/docs/.vuepress/dist/assets/js/app.3cfedce6.js +1 -0
- package/docs/.vuepress/dist/assets/js/{runtime~app.0d53f24f.js → runtime~app.f1d7fab8.js} +1 -1
- package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.163b80fb.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-4637f9e4.60300b77.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-510ed0d4.b76b84de.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-5954bcb2.9e6d2df1.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-61f728ca.64fa763c.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-677dfaed.b84f09f5.js +1 -0
- package/docs/.vuepress/dist/assets/js/{v-7c87f26e.457a1a60.js → v-7c87f26e.91c245da.js} +1 -1
- package/docs/.vuepress/dist/assets/js/v-8daa1a0e.66c9dbce.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-b4a42144.d1856a24.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-fffb8e28.9e0579a1.js +1 -0
- package/docs/.vuepress/dist/changelog/index.html +4 -4
- package/docs/.vuepress/dist/contribute/index.html +4 -4
- package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +176 -156
- package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +3 -3
- package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +3 -3
- package/docs/.vuepress/dist/examples/index.html +3 -3
- package/docs/.vuepress/dist/guide/index.html +5 -5
- package/docs/.vuepress/dist/index.html +4 -4
- package/docs/.vuepress/dist/logo.png +0 -0
- package/docs/.vuepress/dist/nodes/index.html +3 -3
- package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +6 -6
- package/docs/.vuepress/dist/nodes/power-saver.html +3 -3
- package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +3 -3
- package/docs/.vuepress/dist/nodes/ps-receive-price.html +6 -6
- package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +5 -5
- package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +5 -5
- package/docs/.vuepress/dist/nodes/strategy-input.html +5 -5
- package/docs/.vuepress/public/logo.png +0 -0
- package/docs/README.md +5 -3
- package/docs/changelog/README.md +22 -5
- package/docs/contribute/README.md +1 -1
- package/docs/examples/example-nordpool-current-state.md +172 -152
- package/docs/guide/README.md +12 -10
- package/docs/images/logo copy.png +0 -0
- package/docs/images/logo.png +0 -0
- package/docs/images/logo.psd +0 -0
- package/docs/images/node-red-icon-2.svg +30 -0
- package/docs/nodes/old-power-saver-doc.md +6 -6
- package/docs/nodes/ps-receive-price.md +9 -5
- package/docs/nodes/ps-strategy-best-save.md +5 -1
- package/docs/nodes/ps-strategy-lowest-price.md +3 -3
- package/docs/nodes/strategy-input.md +1 -1
- package/package.json +1 -1
- package/src/elvia/elvia-add-tariff.js +7 -6
- package/src/handle-input.js +1 -7
- package/src/power-saver.js +1 -5
- package/src/receive-price-functions.js +9 -17
- package/src/strategy-lowest-price.js +2 -1
- package/src/utils.js +6 -0
- package/test/data/lowest-price-input-missing-end.json +197 -0
- package/test/data/lowest-price-result-missing-end.json +319 -0
- package/test/data/nordpool-events-state-2.json +288 -0
- package/test/data/nordpool-prices-in-payload.json +287 -0
- package/test/elvia.test.js +16 -2
- package/test/receive-price.test.js +27 -4
- package/test/strategy-lowest-price.test.js +33 -0
- package/docs/.vuepress/dist/assets/js/app.342dc054.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.d008d8bc.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-4637f9e4.22ab9413.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-510ed0d4.129ef915.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-5954bcb2.be07962c.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-61f728ca.802ab15e.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-677dfaed.9bbbd037.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-8daa1a0e.db8b59c6.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-b4a42144.6e0c5aa0.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-fffb8e28.e815e852.js +0 -1
package/docs/README.md
CHANGED
|
@@ -3,7 +3,7 @@ home: true
|
|
|
3
3
|
heroImage: /logo.png
|
|
4
4
|
heroAlt: Power Saver
|
|
5
5
|
heroText: node-red-contrib-power-saver
|
|
6
|
-
tagline:
|
|
6
|
+
tagline: A collection of nodes to Node-RED that automates saving money on variable electricity prices
|
|
7
7
|
actions:
|
|
8
8
|
- text: Guide
|
|
9
9
|
link: /guide
|
|
@@ -18,9 +18,9 @@ features:
|
|
|
18
18
|
- title: Automatic scheduling
|
|
19
19
|
details: Automatically calculate best plan and send signal to turn on and off.
|
|
20
20
|
- title: Best Save Strategy
|
|
21
|
-
details: Postpone power consumption when there is most to save.
|
|
21
|
+
details: Postpone power consumption when there is most to save, perfect for the water heater.
|
|
22
22
|
- title: Lowest Price Strategy
|
|
23
|
-
details: Turn on power when the prices are the lowest
|
|
23
|
+
details: Turn on power when the prices are the lowest, perfect for smart charging or heating.
|
|
24
24
|
- title: Integrate with grid tariff APIs
|
|
25
25
|
details: Elvia grid tariff API already supported. Others are easy to add.
|
|
26
26
|
- title: Perfect with Home Assistant
|
|
@@ -30,3 +30,5 @@ features:
|
|
|
30
30
|
footer: Created by Otto Paulsen<br/><br/><a href="https://www.patreon.com/bePatron?u=65948417" data-patreon-widget-type="become-patron-button">Become a Patron!</a>
|
|
31
31
|
footerHtml: true
|
|
32
32
|
---
|
|
33
|
+
|
|
34
|
+
This is a collection of nodes for the popular [Node-RED](https://nodered.org/) that you can use to save money on variable electricity prices. Node-RED is a widely used low-code programming tool that can be used together with many smart home solutions to create automations.
|
package/docs/changelog/README.md
CHANGED
|
@@ -6,9 +6,26 @@ sidebar: "auto"
|
|
|
6
6
|
|
|
7
7
|
List the most significant changes, starting in version 1.0.9.
|
|
8
8
|
|
|
9
|
+
## 3.0.10
|
|
10
|
+
|
|
11
|
+
- Fix bug in ps-elvia-add-tariff so it connects to API.
|
|
12
|
+
|
|
13
|
+
## 3.0.9
|
|
14
|
+
|
|
15
|
+
- Fix Nord Pool input for current state node, to read data when payload is set to entity.
|
|
16
|
+
|
|
17
|
+
## 3.0.8
|
|
18
|
+
|
|
19
|
+
- Fix bug in Lowest Price node when period goes over midnight.
|
|
20
|
+
- Fix documentation - lots of pages were failing.
|
|
21
|
+
|
|
22
|
+
## 3.0.7
|
|
23
|
+
|
|
24
|
+
- Fix Nord Pool current state node input.
|
|
25
|
+
|
|
9
26
|
## 3.0.6
|
|
10
27
|
|
|
11
|
-
Remove non-
|
|
28
|
+
- Remove non-existent node from package.json.
|
|
12
29
|
|
|
13
30
|
## 3.0.5
|
|
14
31
|
|
|
@@ -16,7 +33,7 @@ Remove non-existant node from package.json.
|
|
|
16
33
|
|
|
17
34
|
## 3.0.4
|
|
18
35
|
|
|
19
|
-
- Remove `null`-values from
|
|
36
|
+
- Remove `null`-values from Nord Pool data for `tomorrow`.
|
|
20
37
|
|
|
21
38
|
## 3.0.3
|
|
22
39
|
|
|
@@ -30,7 +47,7 @@ Remove non-existant node from package.json.
|
|
|
30
47
|
|
|
31
48
|
## 3.0.1
|
|
32
49
|
|
|
33
|
-
- Fix so elvia
|
|
50
|
+
- Fix so elvia subscription key is stored as credential
|
|
34
51
|
- Fix bug on config for strategy nodes. Config was not saved properly.
|
|
35
52
|
- Remove double output bug, and better handling when hoursOn > period
|
|
36
53
|
|
|
@@ -40,7 +57,7 @@ Remove non-existant node from package.json.
|
|
|
40
57
|
- New node `ps-strategy-best-save` is replacing old node `Power Saver` together with the new `ps-receive-price` node.
|
|
41
58
|
- Add new strategy node: `ps-strategy-lowest-price`.
|
|
42
59
|
- Add new node: `ps-receive-price`.
|
|
43
|
-
- Add
|
|
60
|
+
- Add grid tariff for Elvia customers, using the `ps-elvia-add-tariff` node.
|
|
44
61
|
- New documentation.
|
|
45
62
|
- Change node category to Power Saver.
|
|
46
63
|
|
|
@@ -64,7 +81,7 @@ Remove non-existant node from package.json.
|
|
|
64
81
|
|
|
65
82
|
## 2.0.2
|
|
66
83
|
|
|
67
|
-
- Fix so
|
|
84
|
+
- Fix so Nord Pool data can be read directly from the current state node
|
|
68
85
|
|
|
69
86
|
## 2.0.1
|
|
70
87
|
|
|
@@ -32,7 +32,7 @@ It would be very nice to get more examples into the documentation. If you have m
|
|
|
32
32
|
|
|
33
33
|
## Bug reports
|
|
34
34
|
|
|
35
|
-
If you find a bug, please describe it
|
|
35
|
+
If you find a bug, please describe it thoroughly and make a [GitHub issue](https://github.com/ottopaulsen/node-red-contrib-power-saver/issues). If the bug is related to the scheduling, **please provide the full output from output 3** on the strategy node.
|
|
36
36
|
|
|
37
37
|
## Ideas
|
|
38
38
|
|
|
@@ -10,157 +10,177 @@ In this example, data is read from the Nord Pool sensor in HA via the `current s
|
|
|
10
10
|
|
|
11
11
|
```json:no-line-numbers
|
|
12
12
|
[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
13
|
+
{
|
|
14
|
+
"id": "e2578f6a.210a8",
|
|
15
|
+
"type": "debug",
|
|
16
|
+
"z": "d938c47f.3398f8",
|
|
17
|
+
"name": "Nord Pool result",
|
|
18
|
+
"active": false,
|
|
19
|
+
"tosidebar": true,
|
|
20
|
+
"console": false,
|
|
21
|
+
"tostatus": false,
|
|
22
|
+
"complete": "true",
|
|
23
|
+
"targetType": "full",
|
|
24
|
+
"statusVal": "",
|
|
25
|
+
"statusType": "auto",
|
|
26
|
+
"x": 820,
|
|
27
|
+
"y": 440,
|
|
28
|
+
"wires": []
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"id": "48bcdcca.fe42a4",
|
|
32
|
+
"type": "api-current-state",
|
|
33
|
+
"z": "d938c47f.3398f8",
|
|
34
|
+
"name": "Read Nord Pool",
|
|
35
|
+
"server": "ec4a12a1.b2be9",
|
|
36
|
+
"version": 2,
|
|
37
|
+
"outputs": 1,
|
|
38
|
+
"halt_if": "",
|
|
39
|
+
"halt_if_type": "str",
|
|
40
|
+
"halt_if_compare": "is",
|
|
41
|
+
"entity_id": "sensor.nordpool_kwh_trheim_nok_3_095_025",
|
|
42
|
+
"state_type": "str",
|
|
43
|
+
"blockInputOverrides": false,
|
|
44
|
+
"outputProperties": [
|
|
45
|
+
{
|
|
46
|
+
"property": "payload",
|
|
47
|
+
"propertyType": "msg",
|
|
48
|
+
"value": "",
|
|
49
|
+
"valueType": "entity"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"x": 280,
|
|
53
|
+
"y": 380,
|
|
54
|
+
"wires": [
|
|
55
|
+
[
|
|
56
|
+
"428d7c7ca88db95f"
|
|
57
|
+
]
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "97cc8e58.4247a",
|
|
62
|
+
"type": "inject",
|
|
63
|
+
"z": "d938c47f.3398f8",
|
|
64
|
+
"name": "",
|
|
65
|
+
"props": [
|
|
66
|
+
{
|
|
67
|
+
"p": "payload"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"p": "topic",
|
|
71
|
+
"vt": "str"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"repeat": "3600",
|
|
75
|
+
"crontab": "",
|
|
76
|
+
"once": true,
|
|
77
|
+
"onceDelay": 0.1,
|
|
78
|
+
"topic": "",
|
|
79
|
+
"payloadType": "date",
|
|
80
|
+
"x": 110,
|
|
81
|
+
"y": 380,
|
|
82
|
+
"wires": [
|
|
83
|
+
[
|
|
84
|
+
"48bcdcca.fe42a4"
|
|
85
|
+
]
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"id": "a6f2769b.1a62a8",
|
|
90
|
+
"type": "api-call-service",
|
|
91
|
+
"z": "d938c47f.3398f8",
|
|
92
|
+
"name": "Turn on VVB",
|
|
93
|
+
"server": "ec4a12a1.b2be9",
|
|
94
|
+
"version": 3,
|
|
95
|
+
"debugenabled": false,
|
|
96
|
+
"service_domain": "switch",
|
|
97
|
+
"service": "turn_on",
|
|
98
|
+
"entityId": "switch.varmtvannsbereder_switch",
|
|
99
|
+
"data": "",
|
|
100
|
+
"dataType": "jsonata",
|
|
101
|
+
"mergecontext": "",
|
|
102
|
+
"mustacheAltTags": false,
|
|
103
|
+
"outputProperties": [],
|
|
104
|
+
"queue": "none",
|
|
105
|
+
"x": 810,
|
|
106
|
+
"y": 340,
|
|
107
|
+
"wires": [
|
|
108
|
+
[]
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "9fc75126.65dd3",
|
|
113
|
+
"type": "api-call-service",
|
|
114
|
+
"z": "d938c47f.3398f8",
|
|
115
|
+
"name": "Turn off VVB",
|
|
116
|
+
"server": "ec4a12a1.b2be9",
|
|
117
|
+
"version": 3,
|
|
118
|
+
"debugenabled": true,
|
|
119
|
+
"service_domain": "switch",
|
|
120
|
+
"service": "turn_off",
|
|
121
|
+
"entityId": "switch.varmtvannsbereder_switch",
|
|
122
|
+
"data": "",
|
|
123
|
+
"dataType": "json",
|
|
124
|
+
"mergecontext": "",
|
|
125
|
+
"mustacheAltTags": false,
|
|
126
|
+
"outputProperties": [],
|
|
127
|
+
"queue": "none",
|
|
128
|
+
"x": 810,
|
|
129
|
+
"y": 380,
|
|
130
|
+
"wires": [
|
|
131
|
+
[]
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "428d7c7ca88db95f",
|
|
136
|
+
"type": "ps-receive-price",
|
|
137
|
+
"z": "d938c47f.3398f8",
|
|
138
|
+
"name": "Price Receiver",
|
|
139
|
+
"x": 460,
|
|
140
|
+
"y": 380,
|
|
141
|
+
"wires": [
|
|
142
|
+
[
|
|
143
|
+
"4147bf0b99fe626f"
|
|
144
|
+
]
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "4147bf0b99fe626f",
|
|
149
|
+
"type": "ps-strategy-best-save",
|
|
150
|
+
"z": "d938c47f.3398f8",
|
|
151
|
+
"name": "Best Save",
|
|
152
|
+
"maxHoursToSaveInSequence": "4",
|
|
153
|
+
"minHoursOnAfterMaxSequenceSaved": "1",
|
|
154
|
+
"minSaving": "0.03",
|
|
155
|
+
"sendCurrentValueWhenRescheduling": true,
|
|
156
|
+
"outputIfNoSchedule": "true",
|
|
157
|
+
"scheduleOnlyFromCurrentTime": "false",
|
|
158
|
+
"x": 630,
|
|
159
|
+
"y": 380,
|
|
160
|
+
"wires": [
|
|
161
|
+
[
|
|
162
|
+
"a6f2769b.1a62a8"
|
|
163
|
+
],
|
|
164
|
+
[
|
|
165
|
+
"9fc75126.65dd3"
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
"e2578f6a.210a8"
|
|
169
|
+
]
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"id": "ec4a12a1.b2be9",
|
|
174
|
+
"type": "server",
|
|
175
|
+
"name": "Home Assistant",
|
|
176
|
+
"version": 2,
|
|
177
|
+
"addon": true,
|
|
178
|
+
"rejectUnauthorizedCerts": true,
|
|
179
|
+
"ha_boolean": "y|yes|true|on|home|open",
|
|
180
|
+
"connectionDelay": true,
|
|
181
|
+
"cacheJson": true,
|
|
182
|
+
"heartbeat": false,
|
|
183
|
+
"heartbeatInterval": 30
|
|
184
|
+
}
|
|
165
185
|
]
|
|
166
186
|
```
|
package/docs/guide/README.md
CHANGED
|
@@ -6,8 +6,10 @@ sidebar: "auto"
|
|
|
6
6
|
|
|
7
7
|
## Introduction
|
|
8
8
|
|
|
9
|
-
This is a collection of nodes you can use to save money on variable
|
|
10
|
-
|
|
9
|
+
This is a collection of nodes for the popular [Node-RED](https://nodered.org/) that you can use to save money on variable electricity prices. Node-RED is a widely used low-code programming tool that can be used together with many smart home solutions to create automations.
|
|
10
|
+
|
|
11
|
+
The solution can be used to control switches or other entities in a smart home system, and for example turn on when the price is low, and turn off when the price is high.
|
|
12
|
+
There are different ways to calculate what hours to turn on and off, and these are implemented as **strategies nodes**. Each strategy node can be configured to fit different purposes.
|
|
11
13
|
|
|
12
14
|
The strategies need price data to work. These can be received from different sources, for example Tibber, Nord Pool or custom sources.
|
|
13
15
|
|
|
@@ -23,7 +25,7 @@ Example:
|
|
|
23
25
|
|
|
24
26
|

|
|
25
27
|
|
|
26
|
-
Here prices are received from Tibber, converted in the `ps-receive-price` node, then
|
|
28
|
+
Here prices are received from Tibber, converted in the `ps-receive-price` node, then grid tariff for Elvia is added before sent to the `ps-strategy-best-save` node. Output is sent to Home Assistant via two `call-service` nodes, and the schedule is sent to a debug node.
|
|
27
29
|
|
|
28
30
|
::: tip Home Assistant
|
|
29
31
|
The node collection fits very well with Home Assistant (HA), as Node-RED is frequently used for automations, and there also is an integration with Nord Pool, but there is no direct dependency to HA, so all nodes can be used also without HA.
|
|
@@ -48,7 +50,7 @@ This solution is useless without price data. In the nordics, there are at least
|
|
|
48
50
|
- Tibber
|
|
49
51
|
- Nord Pool
|
|
50
52
|
|
|
51
|
-
The `ps-receive-price` node is designed to handle price input
|
|
53
|
+
The `ps-receive-price` node is designed to handle price input from both these, and convert it to the format required by the strategy nodes.
|
|
52
54
|
|
|
53
55
|
If you are a Tibber customer, use the `tibber-query` node from the [Tibber API](https://flows.nodered.org/node/node-red-contrib-tibber-api) to receive price, with one of the following queries:
|
|
54
56
|
|
|
@@ -75,7 +77,7 @@ If you are a Tibber customer, use the `tibber-query` node from the [Tibber API](
|
|
|
75
77
|
|
|
76
78
|
</CodeGroupItem>
|
|
77
79
|
|
|
78
|
-
<CodeGroupItem title="
|
|
80
|
+
<CodeGroupItem title="Single home" active>
|
|
79
81
|
|
|
80
82
|
```gql{3}
|
|
81
83
|
{
|
|
@@ -120,15 +122,15 @@ If you use Home Assistant (HA), you can install the
|
|
|
120
122
|
that provides a _sensor_ that gives price per hour for today and tomorrow.
|
|
121
123
|
Data can be sent from both the `current state` node or the `events: state` node.
|
|
122
124
|
|
|
123
|
-
[See example with
|
|
125
|
+
[See example with Nord Pool and `current state` node](../examples/example-nordpool-current-state.md)
|
|
124
126
|
|
|
125
|
-
[See example with
|
|
127
|
+
[See example with Nord Pool and `events: state` node](../examples/example-nordpool-events-state.md)
|
|
126
128
|
|
|
127
129
|
### Add grid tariff
|
|
128
130
|
|
|
129
131
|
When also the grid tariff changes per hour, it must be added to the electricity price in order to get the calculations right.
|
|
130
132
|
|
|
131
|
-
After the the `ps-receive-price` node, add a `ps-xxx-add-tariff` node to add grid tariff. What node to choose depends on what grid you get electricity through. The
|
|
133
|
+
After the the `ps-receive-price` node, add a `ps-xxx-add-tariff` node to add grid tariff. What node to choose depends on what grid you get electricity through. The following grids are supported:
|
|
132
134
|
|
|
133
135
|
| Grid supplier | Node |
|
|
134
136
|
| ------------- | --------------------- |
|
|
@@ -178,14 +180,14 @@ Example using Home Assistant:
|
|
|
178
180
|
There are many ways you can use the output:
|
|
179
181
|
|
|
180
182
|
- Turn on/off a switch
|
|
181
|
-
- Set a
|
|
183
|
+
- Set a thermostat up, down or to specific values
|
|
182
184
|
- Change setting of a dimmer
|
|
183
185
|
- Send a notification
|
|
184
186
|
:::
|
|
185
187
|
|
|
186
188
|
### Display schedule
|
|
187
189
|
|
|
188
|
-
**Output 3** can be used to print or
|
|
190
|
+
**Output 3** can be used to print or display the calculated schedule. If you just want to see it, send it to a debug node. You can also use it to display the result as graphs in HA.
|
|
189
191
|
|
|
190
192
|
For users of Magic Mirror and Tibber, the `ps-best-save` node can send its schedule to the MMM-Tibber module. See more details in the `ps-best-save` node documentation.
|
|
191
193
|
|
|
Binary file
|
package/docs/images/logo.png
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="512" width="512" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 511.99999 511.99999">
|
|
4
|
+
<metadata>
|
|
5
|
+
<rdf:RDF>
|
|
6
|
+
<cc:Work rdf:about="">
|
|
7
|
+
<dc:format>image/svg+xml</dc:format>
|
|
8
|
+
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
|
9
|
+
<dc:title/>
|
|
10
|
+
</cc:Work>
|
|
11
|
+
</rdf:RDF>
|
|
12
|
+
</metadata>
|
|
13
|
+
<g transform="translate(0 -540.36)">
|
|
14
|
+
<rect style="color:#000000" height="392" width="512" y="540.36" x=".000013828" fill="#8f0000"/>
|
|
15
|
+
<rect ry="0" height="108.23" width="500.23" stroke="#fff" y="938.25" x="5.886" stroke-width="11.772" fill="#fff"/>
|
|
16
|
+
<g transform="matrix(4 0 0 4 -162 -450.91)">
|
|
17
|
+
<path style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none;text-decoration-style:solid" d="m122.88 305.82c-2.3846 0-4.3789 2.0376-4.3789 4.4222v0.77344c-2.2304 0.10995-4.0388 0.5467-5.3281 1.4316-1.5951 1.0948-2.4675 2.582-3.1816 3.877-0.71415 1.295-1.2996 2.4093-2.1504 3.1894-0.72545 0.66525-1.7997 1.1216-3.4512 1.3301-0.21359-2.192-2.0615-3.9512-4.3052-3.9512h-17.167c-2.3846 0-4.4165 1.965-4.4165 4.3496v4.2422c0 2.3846 2.0319 4.3516 4.4165 4.3516h17.167c2.3846 0 4.3872-1.9669 4.3872-4.3516v-1.6133c9.7257 0.15307 12.467 2.6032 15.594 5.3379 3.0006 2.6241 6.6658 5.3789 15.436 5.4948v0.73633c0 2.3846 2.0695 4.3799 4.4541 4.3799h17.092c2.3846 0 4.4541-1.9952 4.4541-4.3799v-4.2422c0-2.3846-2.0695-4.3779-4.4541-4.3779h-17.092c-2.3846 0-4.4541 1.9933-4.4541 4.3779v0.58594c-8.0984-0.0599-10.486-2.1557-13.498-4.7897-2.5035-2.1893-5.6398-4.5852-11.947-5.5859 1.176-1.1795 1.8834-2.5192 2.5137-3.6621 0.67724-1.228 1.2899-2.2006 2.2695-2.873 0.76303-0.52371 1.9757-0.83922 3.6621-0.93945v0.55078c0 2.3846 1.9943 4.3356 4.3789 4.3356h17.242c2.3846 0 4.3789-1.951 4.3789-4.3356v-4.2422c0-2.3846-1.9943-4.4222-4.3789-4.4222zm0 3h17.242c0.80513 0 1.3789 0.6171 1.3789 1.4222v4.2422c0 0.80514-0.57378 1.3356-1.3789 1.3356h-17.242c-0.80513 0-1.3789-0.53045-1.3789-1.3356v-4.2422c0-0.80513 0.57378-1.4222 1.3789-1.4222zm-39.962 11.016h17.167c0.80513 0 1.4165 0.60112 1.4165 1.4062v4.2422c0 0.80513-0.61138 1.4082-1.4165 1.4082h-17.167c-0.80513 0-1.4165-0.60307-1.4165-1.4082v-4.2422c0-0.80513 0.61137-1.4062 1.4165-1.4062zm57.038 9.984h17.092c0.80513 0 1.4541 0.5728 1.4541 1.3779v4.168c0 0.80513-0.64898 1.4541-1.4541 1.4541h-17.092c-0.80513 0-1.4541-0.64897-1.4541-1.4541v-4.168c0-0.80513 0.64897-1.3779 1.4541-1.3779z" fill="#fff"/>
|
|
18
|
+
</g>
|
|
19
|
+
<g transform="matrix(1.0024 0 0 1.0024 .26914 -2.6855)" fill="#8f0000">
|
|
20
|
+
<path d="m90.51 954.73v8.4388l-7.9801 1.4384v59.934h-13.931l-28.465-46.989-0.49878 0.048v37.111l7.9805 1.4384v8.3908h-28.929v-8.3908l7.4319-1.4384v-50.105l-7.4319-1.4384v-8.4388h7.4319 14.001l28.302 46.989 0.14384-0.048v-37.063l-6.983-1.4384v-8.4388h20.971 7.9586z"/>
|
|
21
|
+
<path d="m94.501 998.12q0-11.603 6.4729-18.987 6.5209-7.4319 17.98-7.4319 11.507 0 17.98 7.3839 6.5209 7.3839 6.5209 19.035v1.0069q0 11.699-6.5209 19.083-6.4729 7.3359-17.884 7.3359-11.555 0-18.076-7.3359-6.4729-7.384-6.4729-19.083v-1.0069zm14.001 1.0069q0 7.0963 2.4933 11.411 2.4933 4.2674 8.0552 4.2674 5.4181 0 7.9114-4.3153 2.5412-4.3153 2.5412-11.364v-1.0069q0-6.9044-2.5412-11.268-2.5412-4.3632-8.0072-4.3632t-7.9593 4.3632-2.4933 11.268v1.0069z"/>
|
|
22
|
+
<path d="m183.77 1018.2c-1.6302 2.3973-3.5641 4.2193-5.8017 5.466-2.2056 1.2466-4.7308 1.8797-7.5757 1.8797-6.393 0-11.364-2.3432-14.912-7.0101-3.5161-4.6669-5.1162-10.836-5.1162-18.508v-1.0069c0-8.1833 1.6161-14.784 5.1642-19.802 3.5481-5.0185 8.5348-7.5278 14.96-7.5278 2.5892 0 4.9226 0.57537 7.0003 1.7261 2.0777 1.1188 4.2289 2.7171 5.7952 4.7948v-18.604l-7.9806-1.4384v-8.4388h7.6513 14.295v64.969l5.9854 1.4384v8.4102h-18.41l-1.0548-6.3484zm-19.44-18.172c0 4.5391 0.62786 8.1191 2.1302 10.74 1.5343 2.5891 4.0276 3.8837 7.4798 3.8837 2.0457 0 3.8198-0.4155 5.3222-1.2466 1.5023-0.8311 3.0626-2.0298 4.0216-3.5961v-22.008c-0.95893-1.6622-2.5192-2.9408-4.0216-3.8358-1.4704-0.927-3.2125-1.3905-5.2263-1.3905-3.4203 0-5.9135 1.5183-7.4798 4.555s-2.2261 7.0003-2.2261 11.891v1.0069z"/>
|
|
23
|
+
<path d="m232.87 1025.5c-7.48 0-13.457-2.3974-17.932-7.1921-4.4751-4.7947-6.7127-10.884-6.7127-18.268v-1.9179c0-7.7033 2.1097-14.048 6.3291-19.035 4.2513-4.9865 9.941-7.4419 17.069-7.41 7.0007 0 12.435 2.0878 16.302 6.3072 3.8678 4.2194 6.4539 9.93 6.188 17.117v7.5004h-31.36l-0.0959 0.4109c0.25573 3.4203 1.3905 6.2332 3.4043 8.4388 2.0457 2.2056 4.8107 3.3084 8.2949 3.3084 3.1006 0 5.6738-0.3037 7.7196-0.911 2.0457-0.6393 4.2833-1.6303 6.7127-2.9728l3.7879 8.6306c-2.1417 1.6941-4.9226 3.1166-8.3429 4.2673-3.3883 1.1507-7.1763 1.7261-11.364 1.7261zm-1.2466-43.057c-2.5892 0-4.635 0.99093-6.1373 2.9728s-2.4293 4.587-2.781 7.8154l0.14385 0.39233h17.299v-1.3992c0-2.9727-0.83677-5.3381-2.2432-7.0962-1.3745-1.7901-3.4682-2.6851-6.2811-2.6851z"/>
|
|
24
|
+
<path d="m291.02 1000.6h-26.934v-10.973h26.934z"/>
|
|
25
|
+
<path d="m330.82 954.73c7.9273 0 14.145 1.822 18.652 5.466 4.5071 3.6121 6.3914 8.6152 6.3914 15.008 0 3.5161-0.57382 6.5684-2.4598 9.1576-1.8859 2.5892-4.6509 4.6829-8.2949 6.2811 4.1235 1.2147 7.0802 3.2445 8.8703 6.0894 1.822 2.8129 2.8819 6.3133 2.8819 10.501v3.5481c0 1.5343 0.15475 2.733 0.76208 3.5961 0.60734 0.8311 1.6142 1.3265 3.0207 1.4863l1.2051 0.2398v8.4387h-6.7191c-4.571 0-7.7835-1.2306-9.6375-3.6919s-2.5972-5.6419-2.5972-9.5416v-3.9796c0-3.3883-1.0948-6.0414-2.9168-7.9593-1.7901-1.9499-4.3313-2.9727-7.6237-3.0686h-11.406v18.412l6.9825 1.4384v8.3908h-28.929v-8.3908l7.9805-1.4384v-50.105l-7.9805-1.4384v-8.4388h7.8932 23.926zm-9.9252 30.782h9.6854c3.8997 0 6.8245-0.8311 8.7744-2.4933s2.9248-4.0596 2.9248-7.1921c0-3.1326-0.97493-5.6259-2.9248-7.4798-1.9179-1.8859-4.7628-2.8289-8.5347-2.8289h-9.8718v19.994z"/>
|
|
26
|
+
<path d="m411.73 993.62h-22.944v19.951h22.163l0.62332-7.9805h10.181v18.942h-54.914v-8.3908l7.9806-1.4384v-50.105l-7.9806-1.4384v-8.4451h7.5735 47.245v18.954h-10.277l-0.62332-7.9806h-21.972v16.959h22.944v10.973z"/>
|
|
27
|
+
<path d="m461.1 954.75c8.5347 0 15.567 2.7087 21.097 8.1747 5.5299 5.4341 8.3382 12.392 8.3382 20.927v11.555c0 8.5667-2.8082 15.593-8.3382 21.027-5.5299 5.4021-12.562 8.1031-21.097 8.1031h-31.416v-8.3908l6.983-1.5117v-50.105l-6.983-1.3652v-8.4145l7.4424-0.0733 23.974 0.0754zm-10.468 10.737v48.283l9.7484 0.026c5.0185 0.013 8.9502-1.6942 11.795-5.0825 2.8449-3.3883 4.3934-7.7938 4.3934-13.26v-11.651c0-5.4021-1.5486-9.8189-4.3934-13.207-2.8449-3.3883-6.7765-5.0824-11.795-5.0824l-9.7484-0.0262z"/>
|
|
28
|
+
</g>
|
|
29
|
+
</g>
|
|
30
|
+
</svg>
|
|
@@ -10,7 +10,7 @@ You can use it to control for example a heater, a water heater or any other powe
|
|
|
10
10
|
|
|
11
11
|
The node takes power prices per hour as input, and sends output to turn a switch on or off based on the power price. It also outputs the schedule that is planned, as well as how much you save per kWh for each of the hours that are turned off, assuming that the same power is used as soon as the power is turned on.
|
|
12
12
|
|
|
13
|
-
Power prices may be received from Tibber,
|
|
13
|
+
Power prices may be received from Tibber, Nord Pool or any other source that gives price per hour for today and optionally tomorrow. It is primarily made to be used together with Home Assistant (HA), but there is no dependency to HA, so it can just as well be used by itself.
|
|
14
14
|
|
|
15
15
|
The node can also be used in combination with MagicMirror with the MMM-MQTT and MMM-Tibber modules, in order to get the savings displayed on the MM screen in the MMM-Tibber module.
|
|
16
16
|
|
|
@@ -38,7 +38,7 @@ Make sure that you upgrade now and then to get the latest version. See [changelo
|
|
|
38
38
|
- Nordpool
|
|
39
39
|
- Other sources in a specific JSON format
|
|
40
40
|
|
|
41
|
-
Choose the one that fits you best. Of course, all inputs are JSON, but the Tibber and
|
|
41
|
+
Choose the one that fits you best. Of course, all inputs are JSON, but the Tibber and Nord Pool alternatives are designed to connect directly to those sources with a minimum effort.
|
|
42
42
|
|
|
43
43
|
From version 2.1.0, you can also send a config object as input for dynamically changing the node config.
|
|
44
44
|
|
|
@@ -73,17 +73,17 @@ Send the result from the `tibber-query` node with the query above directly to th
|
|
|
73
73
|
|
|
74
74
|
### Nordpool input
|
|
75
75
|
|
|
76
|
-
This is especially designed to work for Home Assistant (HA), and the [
|
|
76
|
+
This is especially designed to work for Home Assistant (HA), and the [Nord Pool custom component](https://github.com/custom-components/nordpool). The Nord Pool component provides a _sensor_ that gives price per hour for today and tomorrow (after 13:00). Send the output from this sensor directly to the `power-saver` node. Make sure this is done whenever the node is updated, as well as when the system starts up.
|
|
77
77
|
|
|
78
78
|
Data can be sent from both the `current state` node or the `events: state` node.
|
|
79
79
|
|
|
80
|
-
[See example with
|
|
80
|
+
[See example with Nord Pool and `current state` node](doc/example-nordpool-current-state.md)
|
|
81
81
|
|
|
82
|
-
[See example with
|
|
82
|
+
[See example with Nord Pool and `events: state` node](doc/example-nordpool-events-state.md)
|
|
83
83
|
|
|
84
84
|
### Other input
|
|
85
85
|
|
|
86
|
-
If you cannot use any of the two above (Tibber or
|
|
86
|
+
If you cannot use any of the two above (Tibber or Nord Pool), create the input to the node with the payload containing JSON like this:
|
|
87
87
|
|
|
88
88
|
```json
|
|
89
89
|
{
|
|
@@ -55,11 +55,11 @@ If you are a Tibber customer, you can use the `tibber-query` node from the [`nod
|
|
|
55
55
|
|
|
56
56
|
Send the result from the `tibber-query` node with the query above directly to the `ps-receive-price` node. Make sure it is refreshed when new prices are ready. Prices for the next day are normally ready at 13:00, but refreshing every hour can be a good idea.
|
|
57
57
|
|
|
58
|
-
[See example with Tibber, a switch and MQTT](
|
|
58
|
+
[See example with Tibber, a switch and MQTT](../examples/example-tibber-mqtt.md)
|
|
59
59
|
|
|
60
60
|
::: danger Warning
|
|
61
61
|
The query above returns an array with all houses you have in your Tibber account.
|
|
62
|
-
It
|
|
62
|
+
It will work only if the house you want is the first house in the array, for example if you have only one house.
|
|
63
63
|
If that is not the case, you must use the query below.
|
|
64
64
|
:::
|
|
65
65
|
|
|
@@ -67,7 +67,7 @@ If that is not the case, you must use the query below.
|
|
|
67
67
|
|
|
68
68
|
If the above query does not give you the house you want as the first in the result array, you can use the following method. In this method you need run one query in order to find the id of the house you want the prices for first, and then use the id in the real query.
|
|
69
69
|
|
|
70
|
-
Go to the [Tibber
|
|
70
|
+
Go to the [Tibber Developer pages](https://developer.tibber.com/), sign in, and go to the [API Explorer](https://developer.tibber.com/explorer). Load your personal token, then run the following query:
|
|
71
71
|
|
|
72
72
|
```gql
|
|
73
73
|
{
|
|
@@ -125,9 +125,13 @@ This is especially designed to work for Home Assistant (HA), and the [Nord Pool
|
|
|
125
125
|
|
|
126
126
|
Data can be sent from both the `current state` node or the `events: state` node.
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
::: tip Output properties
|
|
129
|
+
When using the `current state` node, configure the output properties to set `msg.payload` to `entity`.
|
|
130
|
+
:::
|
|
131
|
+
|
|
132
|
+
[See example with Nord Pool and `current state` node](../examples/example-nordpool-current-state.md)
|
|
129
133
|
|
|
130
|
-
[See example with Nord Pool and `events: state` node](
|
|
134
|
+
[See example with Nord Pool and `events: state` node](../examples/example-nordpool-events-state.md)
|
|
131
135
|
|
|
132
136
|
### Other input
|
|
133
137
|
|