node-red-contrib-power-saver 4.1.4 → 4.2.0
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/components/DonateButtons.vue +0 -9
- package/docs/.vuepress/config.js +2 -1
- package/docs/.vuepress/public/ps-logo.png +0 -0
- package/docs/changelog/README.md +9 -0
- package/docs/contribute/README.md +11 -5
- package/docs/examples/README.md +2 -0
- package/docs/examples/example-stromstotte.md +31 -0
- package/docs/images/stromstotte.png +0 -0
- package/package.json +2 -2
- package/src/handle-output.js +1 -1
- package/src/schedule-merger-functions.js +1 -1
- package/src/strategy-lowest-price.js +4 -2
- package/test/data/lowest-price-bug184-input.json +197 -0
- package/test/data/lowest-price-bug184.json +341 -0
- package/test/data/lowest-price-bug187-input.json +197 -0
- package/test/data/lowest-price-bug187.json +331 -0
- package/test/strategy-lowest-price-bug184.test.js +60 -0
- package/test/strategy-lowest-price-bug187.test.js +61 -0
|
@@ -16,15 +16,6 @@
|
|
|
16
16
|
/>
|
|
17
17
|
</form>
|
|
18
18
|
</div>
|
|
19
|
-
<div v-if="patreon" class="center">
|
|
20
|
-
<a
|
|
21
|
-
class="patreonButton"
|
|
22
|
-
href="https://www.patreon.com/bePatron?u=65948417"
|
|
23
|
-
data-patreon-widget-type="become-patron-button"
|
|
24
|
-
target="_blank"
|
|
25
|
-
>Become a Patron!
|
|
26
|
-
</a>
|
|
27
|
-
</div>
|
|
28
19
|
<div v-if="vipps" class="right vipps-box">
|
|
29
20
|
<span>
|
|
30
21
|
<img src="../../images/vipps-smiling-rgb-orange-pos.png" height="30" />
|
package/docs/.vuepress/config.js
CHANGED
|
@@ -30,7 +30,7 @@ export default defineUserConfig({
|
|
|
30
30
|
],
|
|
31
31
|
theme: defaultTheme({
|
|
32
32
|
contributors: false,
|
|
33
|
-
logo: "/
|
|
33
|
+
logo: "/ps-logo.png",
|
|
34
34
|
navbar,
|
|
35
35
|
sidebar: {
|
|
36
36
|
"/guide/": [{ text: "Guide", children: ["/guide/README.md"] }],
|
|
@@ -70,6 +70,7 @@ export default defineUserConfig({
|
|
|
70
70
|
"/examples/example-cascade-temperature-control.md",
|
|
71
71
|
"/examples/example-visualize-on-off/example-visualize-on-off.md",
|
|
72
72
|
"/examples/example-grid-tariff-capacity-part.md",
|
|
73
|
+
"/examples/example-stromstotte.md",
|
|
73
74
|
],
|
|
74
75
|
},
|
|
75
76
|
],
|
|
Binary file
|
package/docs/changelog/README.md
CHANGED
|
@@ -7,6 +7,15 @@ sidebarDepth: 1
|
|
|
7
7
|
|
|
8
8
|
List the most significant changes.
|
|
9
9
|
|
|
10
|
+
## 4.2.0
|
|
11
|
+
|
|
12
|
+
- Format time on node status with HH:MM format. No AM/PM any more.
|
|
13
|
+
- Remove warning for `No schedule` in debug output.
|
|
14
|
+
|
|
15
|
+
## 4.1.5
|
|
16
|
+
|
|
17
|
+
- Fixed bug based on [this issue](https://github.com/ottopaulsen/node-red-contrib-power-saver/issues/184). Now correctly uses the value for `outputOutsidePeriod` when the planning period spans midnight, and there is no data available before midnight. In this case, the period from midnight to end time cannot be planned, so `outputIfNoSchedule` will be used until end time, and `outputOutsidePeriod` will be used from then. See the issue for more details.
|
|
18
|
+
|
|
10
19
|
## 4.1.4
|
|
11
20
|
|
|
12
21
|
- Update dependencies.
|
|
@@ -6,11 +6,9 @@ sidebar: "auto"
|
|
|
6
6
|
|
|
7
7
|
## Donate
|
|
8
8
|
|
|
9
|
-
Developing software is time consuming. This solution
|
|
9
|
+
Developing software is time consuming. This solution took the better part of my free time for a couple of years, and still takes a lot of time. Getting something back would make it easier to also spend future time on this.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
The software is open source, and you can use it for free, but if you feel it has value, you can support the development by donating or becoming a patron, paying a fee of your choice.
|
|
11
|
+
The software is open source, and you can use it for free, but if you feel it has value, you can support the development by donating, paying a fee of your choice.
|
|
14
12
|
|
|
15
13
|
<br/>
|
|
16
14
|
<br/>
|
|
@@ -37,7 +35,15 @@ It would be very nice to get more examples into the documentation. If you have m
|
|
|
37
35
|
|
|
38
36
|
## Bug reports
|
|
39
37
|
|
|
40
|
-
If you find a bug, please describe it thoroughly and make a [GitHub issue](https://github.com/ottopaulsen/node-red-contrib-power-saver/issues).
|
|
38
|
+
If you find a bug, please describe it thoroughly and make a [GitHub issue](https://github.com/ottopaulsen/node-red-contrib-power-saver/issues).
|
|
39
|
+
|
|
40
|
+
::: tip Bug reports for strategy nodes
|
|
41
|
+
If the bug is related to a strategy node, please provide:
|
|
42
|
+
* The full input
|
|
43
|
+
* The full output from output 3
|
|
44
|
+
:::
|
|
45
|
+
|
|
46
|
+
If you have problems with the Best Save node, you can try the [Best Save Viewer](../faq/best-save-viewer.md) to see if it makes more sense.
|
|
41
47
|
|
|
42
48
|
## Ideas
|
|
43
49
|
|
package/docs/examples/README.md
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
[Capacity part of grid tariff](./example-grid-tariff-capacity-part)
|
|
18
18
|
|
|
19
|
+
[Strømstøtte (governmentall support)](./example-stromstotte)
|
|
20
|
+
|
|
19
21
|
## User provided examples
|
|
20
22
|
|
|
21
23
|
[Output schedule to a sensor entity](./example-next-schedule-entity.md) (by Stefan)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Strømstøtte
|
|
2
|
+
|
|
3
|
+
::: tip Strømstøtte = Norwegian governental support
|
|
4
|
+
:::
|
|
5
|
+
|
|
6
|
+
In Norway there is currently economical support from the government when the power prices are high.
|
|
7
|
+
The support per December 2023 is supposed to continue until end of 2024, and is calculated as follows:
|
|
8
|
+
|
|
9
|
+
::: tip Calculation
|
|
10
|
+
The government will cover 90% of the cost that is over 0.875 NOK per kWh.
|
|
11
|
+
:::
|
|
12
|
+
|
|
13
|
+
This will have great effect on how the PowerSaver nodes calculates the saving, especially the Best Save node.
|
|
14
|
+
|
|
15
|
+
To take the governmental support into the calculation, insert a Function node after the Price Receiver node:
|
|
16
|
+
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
And use the following code in the function node:
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
const LIMIT = 0.875
|
|
23
|
+
const OVER_LIMIT_SHARE = 0.1
|
|
24
|
+
|
|
25
|
+
msg.payload.priceData.forEach((hour) => {
|
|
26
|
+
if (hour.value > LIMIT) {
|
|
27
|
+
hour.value = LIMIT + (hour.value - LIMIT) * OVER_LIMIT_SHARE
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
return msg;
|
|
31
|
+
```
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-power-saver",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "A module for Node-RED that you can use to turn on and off a switch based on power prices",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"eslint": "8.52.0",
|
|
56
56
|
"expect": "29.7.0",
|
|
57
57
|
"mocha": "^10.2.0",
|
|
58
|
-
"node-red": "^3.1.
|
|
58
|
+
"node-red": "^3.1.1",
|
|
59
59
|
"node-red-node-test-helper": "0.3.2",
|
|
60
60
|
"sass-loader": "^13.3.2",
|
|
61
61
|
"vuepress": "2.0.0-beta.67"
|
package/src/handle-output.js
CHANGED
|
@@ -77,7 +77,7 @@ function runSchedule(node, schedule, time, currentSent = false) {
|
|
|
77
77
|
node.log("Switching " + onOff + " in " + wait + " milliseconds");
|
|
78
78
|
const statusMessage = `${remainingSchedule.length} changes - ${
|
|
79
79
|
remainingSchedule[0].value ? "on" : "off"
|
|
80
|
-
} at ${nextTime.
|
|
80
|
+
} at ${nextTime.toFormat("HH:mm")}`;
|
|
81
81
|
node.status({ fill: "green", shape: "dot", text: statusMessage });
|
|
82
82
|
return setTimeout(() => {
|
|
83
83
|
sendSwitch(node, entry.value);
|
|
@@ -39,7 +39,7 @@ function mergeSchedules(node, logicFunction) {
|
|
|
39
39
|
const savedSchedules = node.context().get("savedSchedules", node.contextStorage);
|
|
40
40
|
if (!savedSchedules) {
|
|
41
41
|
const msg = "No schedules";
|
|
42
|
-
node.warn(msg);
|
|
42
|
+
// node.warn(msg);
|
|
43
43
|
node.status({ fill: "red", shape: "dot", text: msg });
|
|
44
44
|
return [];
|
|
45
45
|
}
|
|
@@ -56,9 +56,11 @@ function doPlanning(node, priceData) {
|
|
|
56
56
|
if (hour === to && to === from && currentStatus === "Inside") {
|
|
57
57
|
endIndexes.push(i - 1);
|
|
58
58
|
}
|
|
59
|
-
if (hour === to && to !== from && i > 0
|
|
59
|
+
if (hour === to && to !== from && i > 0 ) {
|
|
60
|
+
if(currentStatus !== "StartMissing") {
|
|
61
|
+
endIndexes.push(i - 1);
|
|
62
|
+
}
|
|
60
63
|
currentStatus = "Outside";
|
|
61
|
-
endIndexes.push(i - 1);
|
|
62
64
|
}
|
|
63
65
|
if (hour === from) {
|
|
64
66
|
currentStatus = "Inside";
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"priceData": [
|
|
3
|
+
{
|
|
4
|
+
"value": 0.485,
|
|
5
|
+
"start": "2023-11-09T00:00:00+01:00"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"value": 0.429,
|
|
9
|
+
"start": "2023-11-09T01:00:00+01:00"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"value": 0.397,
|
|
13
|
+
"start": "2023-11-09T02:00:00+01:00"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"value": 0.373,
|
|
17
|
+
"start": "2023-11-09T03:00:00+01:00"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"value": 0.374,
|
|
21
|
+
"start": "2023-11-09T04:00:00+01:00"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"value": 0.389,
|
|
25
|
+
"start": "2023-11-09T05:00:00+01:00"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"value": 0.461,
|
|
29
|
+
"start": "2023-11-09T06:00:00+01:00"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"value": 0.528,
|
|
33
|
+
"start": "2023-11-09T07:00:00+01:00"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"value": 0.538,
|
|
37
|
+
"start": "2023-11-09T08:00:00+01:00"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"value": 0.558,
|
|
41
|
+
"start": "2023-11-09T09:00:00+01:00"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"value": 0.558,
|
|
45
|
+
"start": "2023-11-09T10:00:00+01:00"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"value": 0.598,
|
|
49
|
+
"start": "2023-11-09T11:00:00+01:00"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"value": 0.61,
|
|
53
|
+
"start": "2023-11-09T12:00:00+01:00"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": 0.688,
|
|
57
|
+
"start": "2023-11-09T13:00:00+01:00"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": 0.743,
|
|
61
|
+
"start": "2023-11-09T14:00:00+01:00"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"value": 0.763,
|
|
65
|
+
"start": "2023-11-09T15:00:00+01:00"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"value": 1.342,
|
|
69
|
+
"start": "2023-11-09T16:00:00+01:00"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"value": 1.377,
|
|
73
|
+
"start": "2023-11-09T17:00:00+01:00"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"value": 1.363,
|
|
77
|
+
"start": "2023-11-09T18:00:00+01:00"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": 1.237,
|
|
81
|
+
"start": "2023-11-09T19:00:00+01:00"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"value": 0.568,
|
|
85
|
+
"start": "2023-11-09T20:00:00+01:00"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"value": 0.542,
|
|
89
|
+
"start": "2023-11-09T21:00:00+01:00"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": 0.484,
|
|
93
|
+
"start": "2023-11-09T22:00:00+01:00"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"value": 0.415,
|
|
97
|
+
"start": "2023-11-09T23:00:00+01:00"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"value": 0.404,
|
|
101
|
+
"start": "2023-11-10T00:00:00+01:00"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"value": 0.363,
|
|
105
|
+
"start": "2023-11-10T01:00:00+01:00"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"value": 0.344,
|
|
109
|
+
"start": "2023-11-10T02:00:00+01:00"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"value": 0.331,
|
|
113
|
+
"start": "2023-11-10T03:00:00+01:00"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": 0.327,
|
|
117
|
+
"start": "2023-11-10T04:00:00+01:00"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"value": 0.363,
|
|
121
|
+
"start": "2023-11-10T05:00:00+01:00"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": 0.436,
|
|
125
|
+
"start": "2023-11-10T06:00:00+01:00"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"value": 0.912,
|
|
129
|
+
"start": "2023-11-10T07:00:00+01:00"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"value": 1.186,
|
|
133
|
+
"start": "2023-11-10T08:00:00+01:00"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"value": 1.165,
|
|
137
|
+
"start": "2023-11-10T09:00:00+01:00"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"value": 1.149,
|
|
141
|
+
"start": "2023-11-10T10:00:00+01:00"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"value": 1.133,
|
|
145
|
+
"start": "2023-11-10T11:00:00+01:00"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"value": 1.017,
|
|
149
|
+
"start": "2023-11-10T12:00:00+01:00"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"value": 0.757,
|
|
153
|
+
"start": "2023-11-10T13:00:00+01:00"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"value": 0.654,
|
|
157
|
+
"start": "2023-11-10T14:00:00+01:00"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"value": 1.279,
|
|
161
|
+
"start": "2023-11-10T15:00:00+01:00"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"value": 0.688,
|
|
165
|
+
"start": "2023-11-10T16:00:00+01:00"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"value": 1.597,
|
|
169
|
+
"start": "2023-11-10T17:00:00+01:00"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"value": 0.487,
|
|
173
|
+
"start": "2023-11-10T18:00:00+01:00"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"value": 0.405,
|
|
177
|
+
"start": "2023-11-10T19:00:00+01:00"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"value": 0.36,
|
|
181
|
+
"start": "2023-11-10T20:00:00+01:00"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"value": 0.33,
|
|
185
|
+
"start": "2023-11-10T21:00:00+01:00"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"value": 0.32,
|
|
189
|
+
"start": "2023-11-10T22:00:00+01:00"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"value": 0.283,
|
|
193
|
+
"start": "2023-11-10T23:00:00+01:00"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"source": "Nordpool"
|
|
197
|
+
}
|
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schedule": [
|
|
3
|
+
{
|
|
4
|
+
"time": "2023-11-09T00:00:00+01:00",
|
|
5
|
+
"value": true,
|
|
6
|
+
"countHours": 5
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"time": "2023-11-09T05:00:00+01:00",
|
|
10
|
+
"value": false,
|
|
11
|
+
"countHours": 20
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"time": "2023-11-10T01:00:00+01:00",
|
|
15
|
+
"value": true,
|
|
16
|
+
"countHours": 4
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"time": "2023-11-10T05:00:00+01:00",
|
|
20
|
+
"value": false,
|
|
21
|
+
"countHours": 15
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"time": "2023-11-10T20:00:00+01:00",
|
|
25
|
+
"value": true,
|
|
26
|
+
"countHours": 4
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"hours": [
|
|
30
|
+
{
|
|
31
|
+
"start": "2023-11-09T00:00:00+01:00",
|
|
32
|
+
"price": 0.485,
|
|
33
|
+
"onOff": true,
|
|
34
|
+
"saving": null
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"start": "2023-11-09T01:00:00+01:00",
|
|
38
|
+
"price": 0.429,
|
|
39
|
+
"onOff": true,
|
|
40
|
+
"saving": null
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"start": "2023-11-09T02:00:00+01:00",
|
|
44
|
+
"price": 0.397,
|
|
45
|
+
"onOff": true,
|
|
46
|
+
"saving": null
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"start": "2023-11-09T03:00:00+01:00",
|
|
50
|
+
"price": 0.373,
|
|
51
|
+
"onOff": true,
|
|
52
|
+
"saving": null
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"start": "2023-11-09T04:00:00+01:00",
|
|
56
|
+
"price": 0.374,
|
|
57
|
+
"onOff": true,
|
|
58
|
+
"saving": null
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"start": "2023-11-09T05:00:00+01:00",
|
|
62
|
+
"price": 0.389,
|
|
63
|
+
"onOff": false,
|
|
64
|
+
"saving": null
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"start": "2023-11-09T06:00:00+01:00",
|
|
68
|
+
"price": 0.461,
|
|
69
|
+
"onOff": false,
|
|
70
|
+
"saving": null
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"start": "2023-11-09T07:00:00+01:00",
|
|
74
|
+
"price": 0.528,
|
|
75
|
+
"onOff": false,
|
|
76
|
+
"saving": null
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"start": "2023-11-09T08:00:00+01:00",
|
|
80
|
+
"price": 0.538,
|
|
81
|
+
"onOff": false,
|
|
82
|
+
"saving": null
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"start": "2023-11-09T09:00:00+01:00",
|
|
86
|
+
"price": 0.558,
|
|
87
|
+
"onOff": false,
|
|
88
|
+
"saving": null
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"start": "2023-11-09T10:00:00+01:00",
|
|
92
|
+
"price": 0.558,
|
|
93
|
+
"onOff": false,
|
|
94
|
+
"saving": null
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"start": "2023-11-09T11:00:00+01:00",
|
|
98
|
+
"price": 0.598,
|
|
99
|
+
"onOff": false,
|
|
100
|
+
"saving": null
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"start": "2023-11-09T12:00:00+01:00",
|
|
104
|
+
"price": 0.61,
|
|
105
|
+
"onOff": false,
|
|
106
|
+
"saving": null
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"start": "2023-11-09T13:00:00+01:00",
|
|
110
|
+
"price": 0.688,
|
|
111
|
+
"onOff": false,
|
|
112
|
+
"saving": null
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"start": "2023-11-09T14:00:00+01:00",
|
|
116
|
+
"price": 0.743,
|
|
117
|
+
"onOff": false,
|
|
118
|
+
"saving": null
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"start": "2023-11-09T15:00:00+01:00",
|
|
122
|
+
"price": 0.763,
|
|
123
|
+
"onOff": false,
|
|
124
|
+
"saving": null
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"start": "2023-11-09T16:00:00+01:00",
|
|
128
|
+
"price": 1.342,
|
|
129
|
+
"onOff": false,
|
|
130
|
+
"saving": null
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"start": "2023-11-09T17:00:00+01:00",
|
|
134
|
+
"price": 1.377,
|
|
135
|
+
"onOff": false,
|
|
136
|
+
"saving": null
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"start": "2023-11-09T18:00:00+01:00",
|
|
140
|
+
"price": 1.363,
|
|
141
|
+
"onOff": false,
|
|
142
|
+
"saving": null
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"start": "2023-11-09T19:00:00+01:00",
|
|
146
|
+
"price": 1.237,
|
|
147
|
+
"onOff": false,
|
|
148
|
+
"saving": null
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"start": "2023-11-09T20:00:00+01:00",
|
|
152
|
+
"price": 0.568,
|
|
153
|
+
"onOff": false,
|
|
154
|
+
"saving": null
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"start": "2023-11-09T21:00:00+01:00",
|
|
158
|
+
"price": 0.542,
|
|
159
|
+
"onOff": false,
|
|
160
|
+
"saving": null
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"start": "2023-11-09T22:00:00+01:00",
|
|
164
|
+
"price": 0.484,
|
|
165
|
+
"onOff": false,
|
|
166
|
+
"saving": null
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"start": "2023-11-09T23:00:00+01:00",
|
|
170
|
+
"price": 0.415,
|
|
171
|
+
"onOff": false,
|
|
172
|
+
"saving": null
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"start": "2023-11-10T00:00:00+01:00",
|
|
176
|
+
"price": 0.404,
|
|
177
|
+
"onOff": false,
|
|
178
|
+
"saving": null
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"start": "2023-11-10T01:00:00+01:00",
|
|
182
|
+
"price": 0.363,
|
|
183
|
+
"onOff": true,
|
|
184
|
+
"saving": null
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"start": "2023-11-10T02:00:00+01:00",
|
|
188
|
+
"price": 0.344,
|
|
189
|
+
"onOff": true,
|
|
190
|
+
"saving": null
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"start": "2023-11-10T03:00:00+01:00",
|
|
194
|
+
"price": 0.331,
|
|
195
|
+
"onOff": true,
|
|
196
|
+
"saving": null
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"start": "2023-11-10T04:00:00+01:00",
|
|
200
|
+
"price": 0.327,
|
|
201
|
+
"onOff": true,
|
|
202
|
+
"saving": null
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"start": "2023-11-10T05:00:00+01:00",
|
|
206
|
+
"price": 0.363,
|
|
207
|
+
"onOff": false,
|
|
208
|
+
"saving": null
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"start": "2023-11-10T06:00:00+01:00",
|
|
212
|
+
"price": 0.436,
|
|
213
|
+
"onOff": false,
|
|
214
|
+
"saving": null
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"start": "2023-11-10T07:00:00+01:00",
|
|
218
|
+
"price": 0.912,
|
|
219
|
+
"onOff": false,
|
|
220
|
+
"saving": null
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"start": "2023-11-10T08:00:00+01:00",
|
|
224
|
+
"price": 1.186,
|
|
225
|
+
"onOff": false,
|
|
226
|
+
"saving": null
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"start": "2023-11-10T09:00:00+01:00",
|
|
230
|
+
"price": 1.165,
|
|
231
|
+
"onOff": false,
|
|
232
|
+
"saving": null
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"start": "2023-11-10T10:00:00+01:00",
|
|
236
|
+
"price": 1.149,
|
|
237
|
+
"onOff": false,
|
|
238
|
+
"saving": null
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"start": "2023-11-10T11:00:00+01:00",
|
|
242
|
+
"price": 1.133,
|
|
243
|
+
"onOff": false,
|
|
244
|
+
"saving": null
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"start": "2023-11-10T12:00:00+01:00",
|
|
248
|
+
"price": 1.017,
|
|
249
|
+
"onOff": false,
|
|
250
|
+
"saving": null
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"start": "2023-11-10T13:00:00+01:00",
|
|
254
|
+
"price": 0.757,
|
|
255
|
+
"onOff": false,
|
|
256
|
+
"saving": null
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"start": "2023-11-10T14:00:00+01:00",
|
|
260
|
+
"price": 0.654,
|
|
261
|
+
"onOff": false,
|
|
262
|
+
"saving": null
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"start": "2023-11-10T15:00:00+01:00",
|
|
266
|
+
"price": 1.279,
|
|
267
|
+
"onOff": false,
|
|
268
|
+
"saving": null
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"start": "2023-11-10T16:00:00+01:00",
|
|
272
|
+
"price": 0.688,
|
|
273
|
+
"onOff": false,
|
|
274
|
+
"saving": null
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"start": "2023-11-10T17:00:00+01:00",
|
|
278
|
+
"price": 1.597,
|
|
279
|
+
"onOff": false,
|
|
280
|
+
"saving": null
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"start": "2023-11-10T18:00:00+01:00",
|
|
284
|
+
"price": 0.487,
|
|
285
|
+
"onOff": false,
|
|
286
|
+
"saving": null
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"start": "2023-11-10T19:00:00+01:00",
|
|
290
|
+
"price": 0.405,
|
|
291
|
+
"onOff": false,
|
|
292
|
+
"saving": null
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"start": "2023-11-10T20:00:00+01:00",
|
|
296
|
+
"price": 0.36,
|
|
297
|
+
"onOff": true,
|
|
298
|
+
"saving": null
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"start": "2023-11-10T21:00:00+01:00",
|
|
302
|
+
"price": 0.33,
|
|
303
|
+
"onOff": true,
|
|
304
|
+
"saving": null
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"start": "2023-11-10T22:00:00+01:00",
|
|
308
|
+
"price": 0.32,
|
|
309
|
+
"onOff": true,
|
|
310
|
+
"saving": null
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"start": "2023-11-10T23:00:00+01:00",
|
|
314
|
+
"price": 0.283,
|
|
315
|
+
"onOff": true,
|
|
316
|
+
"saving": null
|
|
317
|
+
}
|
|
318
|
+
],
|
|
319
|
+
"source": "Nordpool",
|
|
320
|
+
"config": {
|
|
321
|
+
"fromTime": "20",
|
|
322
|
+
"toTime": "05",
|
|
323
|
+
"hoursOn": 4,
|
|
324
|
+
"maxPrice": null,
|
|
325
|
+
"doNotSplit": false,
|
|
326
|
+
"sendCurrentValueWhenRescheduling": true,
|
|
327
|
+
"outputIfNoSchedule": true,
|
|
328
|
+
"outputOutsidePeriod": false,
|
|
329
|
+
"outputValueForOn": true,
|
|
330
|
+
"outputValueForOff": false,
|
|
331
|
+
"outputValueForOntype": "bool",
|
|
332
|
+
"outputValueForOfftype": "bool",
|
|
333
|
+
"override": "auto",
|
|
334
|
+
"contextStorage": "default",
|
|
335
|
+
"hasChanged": false
|
|
336
|
+
},
|
|
337
|
+
"time": "2023-11-09T16:08:07.158+01:00",
|
|
338
|
+
"version": "4.1.4",
|
|
339
|
+
"strategyNodeId": "n1",
|
|
340
|
+
"current": true
|
|
341
|
+
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"priceData": [
|
|
3
|
+
{
|
|
4
|
+
"value": 0.3417,
|
|
5
|
+
"start": "2023-11-30T00:00:00.000+01:00"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"value": 0.3414,
|
|
9
|
+
"start": "2023-11-30T01:00:00.000+01:00"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"value": 0.3387,
|
|
13
|
+
"start": "2023-11-30T02:00:00.000+01:00"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"value": 0.336,
|
|
17
|
+
"start": "2023-11-30T03:00:00.000+01:00"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"value": 0.338,
|
|
21
|
+
"start": "2023-11-30T04:00:00.000+01:00"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"value": 0.3435,
|
|
25
|
+
"start": "2023-11-30T05:00:00.000+01:00"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"value": 0.371,
|
|
29
|
+
"start": "2023-11-30T06:00:00.000+01:00"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"value": 0.4171,
|
|
33
|
+
"start": "2023-11-30T07:00:00.000+01:00"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"value": 0.478,
|
|
37
|
+
"start": "2023-11-30T08:00:00.000+01:00"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"value": 0.4992,
|
|
41
|
+
"start": "2023-11-30T09:00:00.000+01:00"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"value": 0.4818,
|
|
45
|
+
"start": "2023-11-30T10:00:00.000+01:00"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"value": 0.4828,
|
|
49
|
+
"start": "2023-11-30T11:00:00.000+01:00"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"value": 0.4493,
|
|
53
|
+
"start": "2023-11-30T12:00:00.000+01:00"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"value": 0.4429,
|
|
57
|
+
"start": "2023-11-30T13:00:00.000+01:00"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"value": 0.4491,
|
|
61
|
+
"start": "2023-11-30T14:00:00.000+01:00"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"value": 0.4491,
|
|
65
|
+
"start": "2023-11-30T15:00:00.000+01:00"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"value": 0.486,
|
|
69
|
+
"start": "2023-11-30T16:00:00.000+01:00"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"value": 0.5276,
|
|
73
|
+
"start": "2023-11-30T17:00:00.000+01:00"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"value": 0.5137,
|
|
77
|
+
"start": "2023-11-30T18:00:00.000+01:00"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"value": 0.4485,
|
|
81
|
+
"start": "2023-11-30T19:00:00.000+01:00"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"value": 0.4002,
|
|
85
|
+
"start": "2023-11-30T20:00:00.000+01:00"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"value": 0.375,
|
|
89
|
+
"start": "2023-11-30T21:00:00.000+01:00"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"value": 0.3654,
|
|
93
|
+
"start": "2023-11-30T22:00:00.000+01:00"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"value": 0.3524,
|
|
97
|
+
"start": "2023-11-30T23:00:00.000+01:00"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"value": 0.3443,
|
|
101
|
+
"start": "2023-12-01T00:00:00.000+01:00"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"value": 0.3392,
|
|
105
|
+
"start": "2023-12-01T01:00:00.000+01:00"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"value": 0.335,
|
|
109
|
+
"start": "2023-12-01T02:00:00.000+01:00"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"value": 0.3311,
|
|
113
|
+
"start": "2023-12-01T03:00:00.000+01:00"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"value": 0.3314,
|
|
117
|
+
"start": "2023-12-01T04:00:00.000+01:00"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"value": 0.3388,
|
|
121
|
+
"start": "2023-12-01T05:00:00.000+01:00"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"value": 0.3599,
|
|
125
|
+
"start": "2023-12-01T06:00:00.000+01:00"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"value": 0.398,
|
|
129
|
+
"start": "2023-12-01T07:00:00.000+01:00"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"value": 0.4591,
|
|
133
|
+
"start": "2023-12-01T08:00:00.000+01:00"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"value": 0.482,
|
|
137
|
+
"start": "2023-12-01T09:00:00.000+01:00"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"value": 0.4733,
|
|
141
|
+
"start": "2023-12-01T10:00:00.000+01:00"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"value": 0.4711,
|
|
145
|
+
"start": "2023-12-01T11:00:00.000+01:00"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"value": 0.4516,
|
|
149
|
+
"start": "2023-12-01T12:00:00.000+01:00"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"value": 0.4255,
|
|
153
|
+
"start": "2023-12-01T13:00:00.000+01:00"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"value": 0.4245,
|
|
157
|
+
"start": "2023-12-01T14:00:00.000+01:00"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"value": 0.4365,
|
|
161
|
+
"start": "2023-12-01T15:00:00.000+01:00"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"value": 0.4551,
|
|
165
|
+
"start": "2023-12-01T16:00:00.000+01:00"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"value": 0.4916,
|
|
169
|
+
"start": "2023-12-01T17:00:00.000+01:00"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"value": 0.454,
|
|
173
|
+
"start": "2023-12-01T18:00:00.000+01:00"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"value": 0.4176,
|
|
177
|
+
"start": "2023-12-01T19:00:00.000+01:00"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"value": 0.3865,
|
|
181
|
+
"start": "2023-12-01T20:00:00.000+01:00"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"value": 0.3659,
|
|
185
|
+
"start": "2023-12-01T21:00:00.000+01:00"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"value": 0.3579,
|
|
189
|
+
"start": "2023-12-01T22:00:00.000+01:00"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"value": 0.3457,
|
|
193
|
+
"start": "2023-12-01T23:00:00.000+01:00"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"source": "Tibber"
|
|
197
|
+
}
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schedule": [
|
|
3
|
+
{
|
|
4
|
+
"time": "2023-11-30T00:00:00.000+01:00",
|
|
5
|
+
"value": false,
|
|
6
|
+
"countHours": 2
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"time": "2023-11-30T02:00:00.000+01:00",
|
|
10
|
+
"value": true,
|
|
11
|
+
"countHours": 3
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"time": "2023-11-30T05:00:00.000+01:00",
|
|
15
|
+
"value": false,
|
|
16
|
+
"countHours": 43
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"hours": [
|
|
20
|
+
{
|
|
21
|
+
"start": "2023-11-30T00:00:00.000+01:00",
|
|
22
|
+
"price": 0.3417,
|
|
23
|
+
"onOff": false,
|
|
24
|
+
"saving": null
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"start": "2023-11-30T01:00:00.000+01:00",
|
|
28
|
+
"price": 0.3414,
|
|
29
|
+
"onOff": false,
|
|
30
|
+
"saving": null
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"start": "2023-11-30T02:00:00.000+01:00",
|
|
34
|
+
"price": 0.3387,
|
|
35
|
+
"onOff": true,
|
|
36
|
+
"saving": null
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"start": "2023-11-30T03:00:00.000+01:00",
|
|
40
|
+
"price": 0.336,
|
|
41
|
+
"onOff": true,
|
|
42
|
+
"saving": null
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"start": "2023-11-30T04:00:00.000+01:00",
|
|
46
|
+
"price": 0.338,
|
|
47
|
+
"onOff": true,
|
|
48
|
+
"saving": null
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"start": "2023-11-30T05:00:00.000+01:00",
|
|
52
|
+
"price": 0.3435,
|
|
53
|
+
"onOff": false,
|
|
54
|
+
"saving": null
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"start": "2023-11-30T06:00:00.000+01:00",
|
|
58
|
+
"price": 0.371,
|
|
59
|
+
"onOff": false,
|
|
60
|
+
"saving": null
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"start": "2023-11-30T07:00:00.000+01:00",
|
|
64
|
+
"price": 0.4171,
|
|
65
|
+
"onOff": false,
|
|
66
|
+
"saving": null
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"start": "2023-11-30T08:00:00.000+01:00",
|
|
70
|
+
"price": 0.478,
|
|
71
|
+
"onOff": false,
|
|
72
|
+
"saving": null
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"start": "2023-11-30T09:00:00.000+01:00",
|
|
76
|
+
"price": 0.4992,
|
|
77
|
+
"onOff": false,
|
|
78
|
+
"saving": null
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"start": "2023-11-30T10:00:00.000+01:00",
|
|
82
|
+
"price": 0.4818,
|
|
83
|
+
"onOff": false,
|
|
84
|
+
"saving": null
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"start": "2023-11-30T11:00:00.000+01:00",
|
|
88
|
+
"price": 0.4828,
|
|
89
|
+
"onOff": false,
|
|
90
|
+
"saving": null
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"start": "2023-11-30T12:00:00.000+01:00",
|
|
94
|
+
"price": 0.4493,
|
|
95
|
+
"onOff": false,
|
|
96
|
+
"saving": null
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"start": "2023-11-30T13:00:00.000+01:00",
|
|
100
|
+
"price": 0.4429,
|
|
101
|
+
"onOff": false,
|
|
102
|
+
"saving": null
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"start": "2023-11-30T14:00:00.000+01:00",
|
|
106
|
+
"price": 0.4491,
|
|
107
|
+
"onOff": false,
|
|
108
|
+
"saving": null
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"start": "2023-11-30T15:00:00.000+01:00",
|
|
112
|
+
"price": 0.4491,
|
|
113
|
+
"onOff": false,
|
|
114
|
+
"saving": null
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"start": "2023-11-30T16:00:00.000+01:00",
|
|
118
|
+
"price": 0.486,
|
|
119
|
+
"onOff": false,
|
|
120
|
+
"saving": null
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"start": "2023-11-30T17:00:00.000+01:00",
|
|
124
|
+
"price": 0.5276,
|
|
125
|
+
"onOff": false,
|
|
126
|
+
"saving": null
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"start": "2023-11-30T18:00:00.000+01:00",
|
|
130
|
+
"price": 0.5137,
|
|
131
|
+
"onOff": false,
|
|
132
|
+
"saving": null
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"start": "2023-11-30T19:00:00.000+01:00",
|
|
136
|
+
"price": 0.4485,
|
|
137
|
+
"onOff": false,
|
|
138
|
+
"saving": null
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"start": "2023-11-30T20:00:00.000+01:00",
|
|
142
|
+
"price": 0.4002,
|
|
143
|
+
"onOff": false,
|
|
144
|
+
"saving": null
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"start": "2023-11-30T21:00:00.000+01:00",
|
|
148
|
+
"price": 0.375,
|
|
149
|
+
"onOff": false,
|
|
150
|
+
"saving": null
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"start": "2023-11-30T22:00:00.000+01:00",
|
|
154
|
+
"price": 0.3654,
|
|
155
|
+
"onOff": false,
|
|
156
|
+
"saving": null
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"start": "2023-11-30T23:00:00.000+01:00",
|
|
160
|
+
"price": 0.3524,
|
|
161
|
+
"onOff": false,
|
|
162
|
+
"saving": null
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"start": "2023-12-01T00:00:00.000+01:00",
|
|
166
|
+
"price": 0.3443,
|
|
167
|
+
"onOff": false,
|
|
168
|
+
"saving": null
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"start": "2023-12-01T01:00:00.000+01:00",
|
|
172
|
+
"price": 0.3392,
|
|
173
|
+
"onOff": false,
|
|
174
|
+
"saving": null
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"start": "2023-12-01T02:00:00.000+01:00",
|
|
178
|
+
"price": 0.335,
|
|
179
|
+
"onOff": false,
|
|
180
|
+
"saving": null
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"start": "2023-12-01T03:00:00.000+01:00",
|
|
184
|
+
"price": 0.3311,
|
|
185
|
+
"onOff": false,
|
|
186
|
+
"saving": null
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"start": "2023-12-01T04:00:00.000+01:00",
|
|
190
|
+
"price": 0.3314,
|
|
191
|
+
"onOff": false,
|
|
192
|
+
"saving": null
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"start": "2023-12-01T05:00:00.000+01:00",
|
|
196
|
+
"price": 0.3388,
|
|
197
|
+
"onOff": false,
|
|
198
|
+
"saving": null
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"start": "2023-12-01T06:00:00.000+01:00",
|
|
202
|
+
"price": 0.3599,
|
|
203
|
+
"onOff": false,
|
|
204
|
+
"saving": null
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"start": "2023-12-01T07:00:00.000+01:00",
|
|
208
|
+
"price": 0.398,
|
|
209
|
+
"onOff": false,
|
|
210
|
+
"saving": null
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"start": "2023-12-01T08:00:00.000+01:00",
|
|
214
|
+
"price": 0.4591,
|
|
215
|
+
"onOff": false,
|
|
216
|
+
"saving": null
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"start": "2023-12-01T09:00:00.000+01:00",
|
|
220
|
+
"price": 0.482,
|
|
221
|
+
"onOff": false,
|
|
222
|
+
"saving": null
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"start": "2023-12-01T10:00:00.000+01:00",
|
|
226
|
+
"price": 0.4733,
|
|
227
|
+
"onOff": false,
|
|
228
|
+
"saving": null
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"start": "2023-12-01T11:00:00.000+01:00",
|
|
232
|
+
"price": 0.4711,
|
|
233
|
+
"onOff": false,
|
|
234
|
+
"saving": null
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"start": "2023-12-01T12:00:00.000+01:00",
|
|
238
|
+
"price": 0.4516,
|
|
239
|
+
"onOff": false,
|
|
240
|
+
"saving": null
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"start": "2023-12-01T13:00:00.000+01:00",
|
|
244
|
+
"price": 0.4255,
|
|
245
|
+
"onOff": false,
|
|
246
|
+
"saving": null
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"start": "2023-12-01T14:00:00.000+01:00",
|
|
250
|
+
"price": 0.4245,
|
|
251
|
+
"onOff": false,
|
|
252
|
+
"saving": null
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"start": "2023-12-01T15:00:00.000+01:00",
|
|
256
|
+
"price": 0.4365,
|
|
257
|
+
"onOff": false,
|
|
258
|
+
"saving": null
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"start": "2023-12-01T16:00:00.000+01:00",
|
|
262
|
+
"price": 0.4551,
|
|
263
|
+
"onOff": false,
|
|
264
|
+
"saving": null
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"start": "2023-12-01T17:00:00.000+01:00",
|
|
268
|
+
"price": 0.4916,
|
|
269
|
+
"onOff": false,
|
|
270
|
+
"saving": null
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"start": "2023-12-01T18:00:00.000+01:00",
|
|
274
|
+
"price": 0.454,
|
|
275
|
+
"onOff": false,
|
|
276
|
+
"saving": null
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"start": "2023-12-01T19:00:00.000+01:00",
|
|
280
|
+
"price": 0.4176,
|
|
281
|
+
"onOff": false,
|
|
282
|
+
"saving": null
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"start": "2023-12-01T20:00:00.000+01:00",
|
|
286
|
+
"price": 0.3865,
|
|
287
|
+
"onOff": false,
|
|
288
|
+
"saving": null
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"start": "2023-12-01T21:00:00.000+01:00",
|
|
292
|
+
"price": 0.3659,
|
|
293
|
+
"onOff": false,
|
|
294
|
+
"saving": null
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"start": "2023-12-01T22:00:00.000+01:00",
|
|
298
|
+
"price": 0.3579,
|
|
299
|
+
"onOff": false,
|
|
300
|
+
"saving": null
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"start": "2023-12-01T23:00:00.000+01:00",
|
|
304
|
+
"price": 0.3457,
|
|
305
|
+
"onOff": false,
|
|
306
|
+
"saving": null
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"source": "Tibber",
|
|
310
|
+
"config": {
|
|
311
|
+
"fromTime": "00",
|
|
312
|
+
"toTime": "00",
|
|
313
|
+
"hoursOn": 3,
|
|
314
|
+
"maxPrice": 0.35,
|
|
315
|
+
"doNotSplit": false,
|
|
316
|
+
"sendCurrentValueWhenRescheduling": true,
|
|
317
|
+
"outputIfNoSchedule": false,
|
|
318
|
+
"outputOutsidePeriod": false,
|
|
319
|
+
"outputValueForOn": true,
|
|
320
|
+
"outputValueForOff": false,
|
|
321
|
+
"outputValueForOntype": "bool",
|
|
322
|
+
"outputValueForOfftype": "bool",
|
|
323
|
+
"override": "auto",
|
|
324
|
+
"contextStorage": "memory",
|
|
325
|
+
"hasChanged": false
|
|
326
|
+
},
|
|
327
|
+
"time": "2023-11-30T17:29:23.336+00:00",
|
|
328
|
+
"version": "4.1.5",
|
|
329
|
+
"strategyNodeId": "n1",
|
|
330
|
+
"current": false
|
|
331
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
const { DateTime } = require("luxon");
|
|
2
|
+
const expect = require("chai").expect;
|
|
3
|
+
const helper = require("node-red-node-test-helper");
|
|
4
|
+
const lowestPrice = require("../src/strategy-lowest-price.js");
|
|
5
|
+
const { version } = require("../package.json");
|
|
6
|
+
const { makePayload } = require("./strategy-lowest-price-test-utils.js");
|
|
7
|
+
|
|
8
|
+
helper.init(require.resolve("node-red"));
|
|
9
|
+
|
|
10
|
+
describe("ps-strategy-lowest-price-bugs", function () {
|
|
11
|
+
beforeEach(function (done) {
|
|
12
|
+
helper.startServer(done);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
afterEach(function (done) {
|
|
16
|
+
helper.unload().then(function () {
|
|
17
|
+
helper.stopServer(done);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("use outputOutsidePeriod correct when period spans midnight", function (done) {
|
|
22
|
+
const input = require("./data/lowest-price-bug184-input.json");
|
|
23
|
+
const result = require("./data/lowest-price-bug184.json");
|
|
24
|
+
result.version = version;
|
|
25
|
+
result.strategyNodeId = "n1";
|
|
26
|
+
result.current = false;
|
|
27
|
+
const flow = [
|
|
28
|
+
{
|
|
29
|
+
id: "n1",
|
|
30
|
+
type: "ps-strategy-lowest-price",
|
|
31
|
+
name: "test name",
|
|
32
|
+
fromTime: "20",
|
|
33
|
+
toTime: "05",
|
|
34
|
+
hoursOn: 4,
|
|
35
|
+
maxPrice: null,
|
|
36
|
+
doNotSplit: false,
|
|
37
|
+
sendCurrentValueWhenRescheduling: true,
|
|
38
|
+
outputIfNoSchedule: true,
|
|
39
|
+
outputOutsidePeriod: false,
|
|
40
|
+
wires: [["n3"], ["n4"], ["n2"]],
|
|
41
|
+
},
|
|
42
|
+
{ id: "n2", type: "helper" },
|
|
43
|
+
{ id: "n3", type: "helper" },
|
|
44
|
+
{ id: "n4", type: "helper" },
|
|
45
|
+
];
|
|
46
|
+
helper.load(lowestPrice, flow, function () {
|
|
47
|
+
const n1 = helper.getNode("n1");
|
|
48
|
+
const n2 = helper.getNode("n2");
|
|
49
|
+
n2.on("input", function (msg) {
|
|
50
|
+
result.current = msg.payload.current;
|
|
51
|
+
expect(msg).to.have.deep.property("payload", result);
|
|
52
|
+
n1.warn.should.not.be.called;
|
|
53
|
+
done();
|
|
54
|
+
});
|
|
55
|
+
const time = DateTime.fromISO("2023-11-09T16:08:07.158+01:00");
|
|
56
|
+
result.time = time.toISO();
|
|
57
|
+
n1.receive({ payload: makePayload(input, time) });
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const { DateTime } = require("luxon");
|
|
2
|
+
const expect = require("chai").expect;
|
|
3
|
+
const helper = require("node-red-node-test-helper");
|
|
4
|
+
const lowestPrice = require("../src/strategy-lowest-price.js");
|
|
5
|
+
const { version } = require("../package.json");
|
|
6
|
+
const { makePayload } = require("./strategy-lowest-price-test-utils.js");
|
|
7
|
+
|
|
8
|
+
helper.init(require.resolve("node-red"));
|
|
9
|
+
|
|
10
|
+
describe("ps-strategy-lowest-price-bugs", function () {
|
|
11
|
+
beforeEach(function (done) {
|
|
12
|
+
helper.startServer(done);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
afterEach(function (done) {
|
|
16
|
+
helper.unload().then(function () {
|
|
17
|
+
helper.stopServer(done);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("cannot reproduce this bug", function (done) {
|
|
22
|
+
const input = require("./data/lowest-price-bug187-input.json");
|
|
23
|
+
const result = require("./data/lowest-price-bug187.json");
|
|
24
|
+
// result.version = version;
|
|
25
|
+
// result.strategyNodeId = "n1";
|
|
26
|
+
// result.current = false;
|
|
27
|
+
// const flow = [
|
|
28
|
+
// {
|
|
29
|
+
// id: "n1",
|
|
30
|
+
// type: "ps-strategy-lowest-price",
|
|
31
|
+
// name: "test name",
|
|
32
|
+
// fromTime: "00",
|
|
33
|
+
// toTime: "00",
|
|
34
|
+
// hoursOn: 3,
|
|
35
|
+
// maxPrice: 0.35,
|
|
36
|
+
// doNotSplit: false,
|
|
37
|
+
// sendCurrentValueWhenRescheduling: true,
|
|
38
|
+
// outputIfNoSchedule: false,
|
|
39
|
+
// outputOutsidePeriod: false,
|
|
40
|
+
// contextStorage: "memory",
|
|
41
|
+
// wires: [["n3"], ["n4"], ["n2"]],
|
|
42
|
+
// },
|
|
43
|
+
// { id: "n2", type: "helper" },
|
|
44
|
+
// { id: "n3", type: "helper" },
|
|
45
|
+
// { id: "n4", type: "helper" },
|
|
46
|
+
// ];
|
|
47
|
+
// helper.load(lowestPrice, flow, function () {
|
|
48
|
+
// const n1 = helper.getNode("n1");
|
|
49
|
+
// const n2 = helper.getNode("n2");
|
|
50
|
+
// n2.on("input", function (msg) {
|
|
51
|
+
// result.current = msg.payload.current;
|
|
52
|
+
// expect(msg).to.have.deep.property("payload", result);
|
|
53
|
+
// n1.warn.should.not.be.called;
|
|
54
|
+
done();
|
|
55
|
+
// });
|
|
56
|
+
// const time = DateTime.fromISO("2023-11-30T17:29:23.336+00:00");
|
|
57
|
+
// result.time = time.toISO();
|
|
58
|
+
// n1.receive({ payload: makePayload(input, time) });
|
|
59
|
+
// });
|
|
60
|
+
});
|
|
61
|
+
});
|