node-red-contrib-power-saver 3.4.3 → 3.4.4
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/BestSaveVerificator.vue +17 -7
- package/docs/.vuepress/components/DonateButtons.vue +0 -1
- package/docs/.vuepress/config.js +15 -28
- package/docs/.vuepress/dist/404.html +6 -6
- package/docs/.vuepress/dist/assets/404.32f46df8.js +1 -0
- package/docs/.vuepress/dist/assets/404.html.bee13de6.js +1 -0
- package/docs/.vuepress/dist/assets/404.html.f166316b.js +1 -0
- package/docs/.vuepress/dist/assets/BestSaveVerificator.574001b7.js +1 -0
- package/docs/.vuepress/dist/assets/DonateButtons.ab660315.js +1 -0
- package/docs/.vuepress/dist/assets/Layout.1b8eeaf1.js +1 -0
- package/docs/.vuepress/dist/assets/{img/add-tariff-flow.eb700d4f.png → add-tariff-flow.9e258f5b.png} +0 -0
- package/docs/.vuepress/dist/assets/app.b3d8926b.js +8 -0
- package/docs/.vuepress/dist/assets/{img/back-to-top.8b37f773.svg → back-to-top.8efcbe56.svg} +0 -0
- package/docs/.vuepress/dist/assets/{img/best-save-config.79a2f39a.png → best-save-config.70d29386.png} +0 -0
- package/docs/.vuepress/dist/assets/best-save-viewer.html.bb64949a.js +1 -0
- package/docs/.vuepress/dist/assets/best-save-viewer.html.e897b3ac.js +1 -0
- package/docs/.vuepress/dist/assets/{img/copy-payload-best-save.b9192985.png → copy-payload-best-save.8b51cdf4.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/elvia-config-no-config.b4bb972c.png → elvia-config-no-config.7ea35c3b.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/elvia-config-no-tariff.3f89aba8.png → elvia-config-no-tariff.a208a0f3.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/elvia-config-select-tariff.0f73fd56.png → elvia-config-select-tariff.48562d43.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/elvia-config-subscription-key.8be8ab8a.png → elvia-config-subscription-key.3368b931.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/elvia-flow.bae2a4d5.png → elvia-flow.a8b126d6.png} +0 -0
- package/docs/.vuepress/dist/assets/example-cascade-temperature-control.html.3632cc6c.js +272 -0
- package/docs/.vuepress/dist/assets/example-cascade-temperature-control.html.5a363ecf.js +1 -0
- package/docs/.vuepress/dist/assets/{img/example-flow-1.3ff3e23f.png → example-flow-1.971bbb87.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/example-flow-2.b653b58d.png → example-flow-2.a0c62ed7.png} +0 -0
- package/docs/.vuepress/dist/assets/example-heat-capacitor.html.89cdea26.js +1 -0
- package/docs/.vuepress/dist/assets/example-heat-capacitor.html.b87ab267.js +215 -0
- package/docs/.vuepress/dist/assets/example-next-schedule-entity.html.dd06a4d6.js +11 -0
- package/docs/.vuepress/dist/assets/example-next-schedule-entity.html.fc8e9124.js +1 -0
- package/docs/.vuepress/dist/assets/example-nordpool-current-state.html.278abccb.js +1 -0
- package/docs/.vuepress/dist/assets/example-nordpool-current-state.html.8eca9b26.js +174 -0
- package/docs/.vuepress/dist/assets/example-nordpool-events-state.html.05c3331c.js +159 -0
- package/docs/.vuepress/dist/assets/example-nordpool-events-state.html.47dbda83.js +1 -0
- package/docs/.vuepress/dist/assets/example-tibber-mqtt.html.bed6459b.js +1 -0
- package/docs/.vuepress/dist/assets/example-tibber-mqtt.html.ce7f09e2.js +167 -0
- package/docs/.vuepress/dist/assets/{img/heat-capacitor-temperatureVsPrice.6e74905b.png → heat-capacitor-temperatureVsPrice.19bc8932.png} +0 -0
- package/docs/.vuepress/dist/assets/index.html.21bfa52e.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.350682d1.js +38 -0
- package/docs/.vuepress/dist/assets/index.html.3bbc4fe4.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.485a4abc.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.49024575.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.4c0ec52b.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.54f6072c.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.75c4e015.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.7857db23.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.797b027e.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.88f59477.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.c4e8bf36.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.c98d742c.js +1 -0
- package/docs/.vuepress/dist/assets/index.html.edb1389f.js +1 -0
- package/docs/.vuepress/dist/assets/{img/lowest-price-config.6d66a8c2.png → lowest-price-config.d7043621.png} +0 -0
- package/docs/.vuepress/dist/assets/migrate-best-save.dcc20d06.js +1 -0
- package/docs/.vuepress/dist/assets/{img/migrate-best-save.f73420f6.png → migrate-best-save.ec036b00.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/migrate-power-saver.aae13f9d.png → migrate-power-saver.98ee9f2e.png} +0 -0
- package/docs/.vuepress/dist/assets/mysterious-plan.687d8b75.png +0 -0
- package/docs/.vuepress/dist/assets/{img/next-schedule-entity.4406856a.png → next-schedule-entity.418ab6ec.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/next-schedule-flow.413ad62b.png → next-schedule-flow.862dea60.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/next-schedule-sensor.eb896bdd.png → next-schedule-sensor.87198baf.png} +0 -0
- package/docs/.vuepress/dist/assets/node-power-saver.3a115c24.js +1 -0
- package/docs/.vuepress/dist/assets/{img/node-power-saver.51ff2e5d.png → node-power-saver.feb2d4fb.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-elvia-add-tariff.94ea2b09.png → node-ps-elvia-add-tariff.0bff05a9.png} +0 -0
- package/docs/.vuepress/dist/assets/node-ps-elvia-add-tariff.57baddc7.js +1 -0
- package/docs/.vuepress/dist/assets/node-ps-general-add-tariff.17755af1.js +1 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-general-add-tariff.a3cf6f06.png → node-ps-general-add-tariff.5a5c98c6.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-receive-price.76eaa418.png → node-ps-receive-price.3587e62e.png} +0 -0
- package/docs/.vuepress/dist/assets/node-ps-receive-price.dbc5e137.js +1 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-strategy-best-save.392292d5.png → node-ps-strategy-best-save.13861759.png} +0 -0
- package/docs/.vuepress/dist/assets/node-ps-strategy-best-save.516d9e66.js +1 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-strategy-heat-capacitor-cascade-control.2e75ed9e.png → node-ps-strategy-heat-capacitor-cascade-control.f35cce75.png} +0 -0
- package/docs/.vuepress/dist/assets/node-ps-strategy-heat-capacitor-simple-flow-example.099aa155.js +1 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-strategy-heat-capacitor-simple-flow-example.29d9bf59.png → node-ps-strategy-heat-capacitor-simple-flow-example.5b712b3b.png} +0 -0
- package/docs/.vuepress/dist/assets/node-ps-strategy-heat-capacitor.e7736c9e.js +1 -0
- package/docs/.vuepress/dist/assets/{img/node-ps-strategy-lowest-price.3a4ad347.png → node-ps-strategy-lowest-price.4e5c38ee.png} +0 -0
- package/docs/.vuepress/dist/assets/node-ps-strategy-lowest-price.83209fac.js +1 -0
- package/docs/.vuepress/dist/assets/old-power-saver-doc.html.c7324541.js +1 -0
- package/docs/.vuepress/dist/assets/old-power-saver-doc.html.f428e475.js +83 -0
- package/docs/.vuepress/dist/assets/{img/oven-setpoint-calculation.5bda0eec.png → oven-setpoint-calculation.47b65429.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/overshoot-time.b3b5d70e.png → overshoot-time.2c4e3929.png} +0 -0
- package/docs/.vuepress/dist/assets/plugin-vue_export-helper.21dcd24c.js +1 -0
- package/docs/.vuepress/dist/assets/{img/power-saver-nordpool-current-state.bf14afde.png → power-saver-nordpool-current-state.cbe8e48a.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/power-saver-nordpool-events-state.8c392507.png → power-saver-nordpool-events-state.a764b813.png} +0 -0
- package/docs/.vuepress/dist/assets/{img/power-saver-tibber-mqtt.16891dd2.png → power-saver-tibber-mqtt.c04fb150.png} +0 -0
- package/docs/.vuepress/dist/assets/power-saver.html.4baca6ba.js +1 -0
- package/docs/.vuepress/dist/assets/power-saver.html.875a1f0e.js +1 -0
- package/docs/.vuepress/dist/assets/ps-elvia-add-tariff.html.05d3ab1b.js +1 -0
- package/docs/.vuepress/dist/assets/ps-elvia-add-tariff.html.dce36de0.js +1 -0
- package/docs/.vuepress/dist/assets/ps-general-add-tariff.html.3056f433.js +1 -0
- package/docs/.vuepress/dist/assets/ps-general-add-tariff.html.3cce3e4d.js +1 -0
- package/docs/.vuepress/dist/assets/ps-receive-price.html.0d762910.js +66 -0
- package/docs/.vuepress/dist/assets/ps-receive-price.html.53dde398.js +1 -0
- package/docs/.vuepress/dist/assets/ps-strategy-best-save.html.503ecfbe.js +1 -0
- package/docs/.vuepress/dist/assets/ps-strategy-best-save.html.9b0747bf.js +72 -0
- package/docs/.vuepress/dist/assets/ps-strategy-heat-capacitor.html.53b3383d.js +228 -0
- package/docs/.vuepress/dist/assets/ps-strategy-heat-capacitor.html.b7849bf7.js +1 -0
- package/docs/.vuepress/dist/assets/ps-strategy-lowest-price.html.1e419f56.js +92 -0
- package/docs/.vuepress/dist/assets/ps-strategy-lowest-price.html.f006d811.js +1 -0
- package/docs/.vuepress/dist/assets/strategy-input.html.6d452f16.js +26 -0
- package/docs/.vuepress/dist/assets/strategy-input.html.8a16d321.js +1 -0
- package/docs/.vuepress/dist/assets/style.a8aae67b.css +1 -0
- package/docs/.vuepress/dist/assets/temperature-manipulation-config.a0e0439b.png +0 -0
- package/docs/.vuepress/dist/changelog/index.html +6 -6
- package/docs/.vuepress/dist/contribute/index.html +6 -6
- package/docs/.vuepress/dist/examples/example-cascade-temperature-control.html +6 -6
- package/docs/.vuepress/dist/examples/example-heat-capacitor.html +6 -6
- package/docs/.vuepress/dist/examples/example-next-schedule-entity.html +7 -7
- package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +6 -6
- package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +6 -6
- package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +6 -6
- package/docs/.vuepress/dist/examples/index.html +5 -5
- package/docs/.vuepress/dist/faq/best-save-viewer.html +6 -6
- package/docs/.vuepress/dist/faq/index.html +6 -6
- package/docs/.vuepress/dist/guide/index.html +8 -8
- package/docs/.vuepress/dist/index.html +6 -6
- package/docs/.vuepress/dist/nodes/index.html +6 -6
- package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +9 -9
- package/docs/.vuepress/dist/nodes/power-saver.html +6 -6
- package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +6 -6
- package/docs/.vuepress/dist/nodes/ps-general-add-tariff.html +6 -6
- package/docs/.vuepress/dist/nodes/ps-receive-price.html +11 -11
- package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +12 -12
- package/docs/.vuepress/dist/nodes/ps-strategy-heat-capacitor.html +11 -11
- package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +11 -11
- package/docs/.vuepress/dist/nodes/strategy-input.html +6 -6
- package/docs/changelog/README.md +4 -0
- package/docs/faq/best-save-viewer.md +1 -0
- package/package.json +9 -11
- package/docs/.vuepress/dist/.nojekyll +0 -0
- package/docs/.vuepress/dist/assets/css/835.styles.c5afb22b.css +0 -1
- package/docs/.vuepress/dist/assets/css/896.styles.21a80cb6.css +0 -1
- package/docs/.vuepress/dist/assets/css/styles.1c48cbd0.css +0 -10
- package/docs/.vuepress/dist/assets/js/229.5c5378fa.js +0 -1
- package/docs/.vuepress/dist/assets/js/331.872104cd.js +0 -1
- package/docs/.vuepress/dist/assets/js/405.f4edd94d.js +0 -2
- package/docs/.vuepress/dist/assets/js/405.f4edd94d.js.LICENSE.txt +0 -8
- package/docs/.vuepress/dist/assets/js/490.1e639e05.js +0 -1
- package/docs/.vuepress/dist/assets/js/491.bd938119.js +0 -1
- package/docs/.vuepress/dist/assets/js/555.d8963d84.js +0 -1
- package/docs/.vuepress/dist/assets/js/811.5f659592.js +0 -1
- package/docs/.vuepress/dist/assets/js/app.6c6c1409.js +0 -1
- package/docs/.vuepress/dist/assets/js/runtime~app.f6ac32d7.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-0607240a.0193a377.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-08683c60.52e94cb6.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-0aca7ba6.cac5d4b9.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.18561f6e.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-1ad821fa.6697a349.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-1b3a0ab8.c6c4e19b.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-1e2b191e.07b8ab21.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-29504124.00be7399.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-30acb564.28af12af.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-3706649a.c76d575b.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-4637f9e4.d334c29a.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-4c28314d.8cbb0f9d.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-510ed0d4.c04bc2e4.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-5954bcb2.dff3fc67.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-5db8da3a.e5e6d7a6.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-61f728ca.81968036.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-677dfaed.c159b0f4.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-7446a652.8fc2c591.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-7c87f26e.8ed52391.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-84304104.f3f07ed3.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-8daa1a0e.ed84ca09.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-b4a42144.9a2a0c9f.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-e8c55052.b7d52fc6.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-fffb8e28.d09ab959.js +0 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{m as p,o as i,d as c,f as s,q as e,s as r,F as u,x as t,l as n}from"./app.b3d8926b.js";import{_ as l}from"./node-ps-strategy-best-save.516d9e66.js";import{_ as d}from"./plugin-vue_export-helper.21dcd24c.js";var h="/assets/best-save-config.70d29386.png";const b={},m=t('<h1 id="ps-strategy-best-save" tabindex="-1"><a class="header-anchor" href="#ps-strategy-best-save" aria-hidden="true">#</a> ps-strategy-best-save</h1><p><img src="'+l+'" alt="ps-strategy-best-save"></p><p>Strategy node to postpone power consumption until the price is lower.</p><h2 id="description" tabindex="-1"><a class="header-anchor" href="#description" aria-hidden="true">#</a> Description</h2><p>This strategy turns off the hours where the price difference is largest compared to the next hour that is on. The idea is that the power you are not using when the switch is turned off, will be used immediately when the switch is turned on. This would fit well for turning off a water heater or another thermostat controlled heater.</p><p>The picture at the bottom of the page, under <a href="#integration-with-magicmirror">Integration with MagicMirror</a>, illustrates this by the purple strokes, taking the price from the top of the price curve to the level of the first hour after the save-period.</p><h2 id="configuration" tabindex="-1"><a class="header-anchor" href="#configuration" aria-hidden="true">#</a> Configuration</h2><p><img src="'+h+`" alt="Best Save Config"></p><table><thead><tr><th>Value</th><th>Description</th></tr></thead><tbody><tr><td>Max per sequence</td><td>Maximum number of hours to turn off in a sequence.</td></tr><tr><td>Min recover</td><td>Minimum hours to turn on immediately after a period when turned off the maximum number of hours that is allowed to be turned off</td></tr><tr><td>Min saving</td><td>Minimum amount to save per kWh in order to bother turning it off. It is recommended to have some amount here, e.g. 2 cents / 2 \xF8re. No point in saving 0.001, is it?</td></tr><tr><td>Send when rescheduling</td><td>Check this to make sure on or off output is sent immediately after rescheduling</td></tr><tr><td>If no schedule, send</td><td>What to do if there is no valid schedule any more (turn on or off).</td></tr></tbody></table><div class="custom-container warning"><p class="custom-container-title">Min recover</p><p>NB! The <code>Min recover</code> only has effect if the previous save-period is of length <code>Max per sequence</code>. If the save-period is shorter, the following on-period may be as short as one hour.</p></div><h3 id="dynamic-config" tabindex="-1"><a class="header-anchor" href="#dynamic-config" aria-hidden="true">#</a> Dynamic config</h3><p>It is possible to change config dynamically by sending a config message to the node. The config messages has a payload with a config object like this example:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token property">"payload"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
2
|
+
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
3
|
+
<span class="token property">"maxHoursToSaveInSequence"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
|
|
4
|
+
<span class="token property">"minHoursOnAfterMaxSequenceSaved"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
|
|
5
|
+
<span class="token property">"minSaving"</span><span class="token operator">:</span> <span class="token number">0.02</span><span class="token punctuation">,</span>
|
|
6
|
+
<span class="token property">"sendCurrentValueWhenRescheduling"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
7
|
+
<span class="token property">"outputIfNoSchedule"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
8
|
+
<span class="token punctuation">}</span>
|
|
9
|
+
<span class="token punctuation">}</span>
|
|
10
|
+
</code></pre><div class="line-numbers" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div><p>All the variables in the config object are optional. You can send only those you want to change.</p><p>The config sent like this will be valid until a new config is sent the same way, or until the flow is restarted. On a restart, the original config set up in the node will be used.</p><p>When a config is sent like this, and without price data, the schedule will be replanned based on the last previously received price data. If no price data has been received, no scheduling is done.</p><p>However, you can send config and price data in the same message. Then both will be used.</p><h3 id="dynamic-commands" tabindex="-1"><a class="header-anchor" href="#dynamic-commands" aria-hidden="true">#</a> Dynamic commands</h3><p>You can dynamically send some commands to the node via its input, by using a <code>commands</code> object in the payload as described below.</p><p>Commands can be sent together with config and/or price data, but the exact behavior is not defined.</p><h4 id="sendschedule" tabindex="-1"><a class="header-anchor" href="#sendschedule" aria-hidden="true">#</a> sendSchedule</h4><p>You can get the schedule sent to output 3 any time by sending a message like this to the node:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token property">"payload"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
11
|
+
<span class="token property">"commands"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
12
|
+
<span class="token property">"sendSchedule"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
13
|
+
<span class="token punctuation">}</span>
|
|
14
|
+
<span class="token punctuation">}</span>
|
|
15
|
+
</code></pre><div class="line-numbers" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>When you do this, the current schedule is actually recalculated based on the last received data, and then sent to output 3 the same way as when it was originally planned.</p><h4 id="sendoutput" tabindex="-1"><a class="header-anchor" href="#sendoutput" aria-hidden="true">#</a> sendOutput</h4><p>You can get the node to send the current output to output 1 or 2 any time by sending a message like this to the node:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token property">"payload"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
16
|
+
<span class="token property">"commands"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
17
|
+
<span class="token property">"sendOutput"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
18
|
+
<span class="token punctuation">}</span>
|
|
19
|
+
<span class="token punctuation">}</span>
|
|
20
|
+
</code></pre><div class="line-numbers" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>When you do this, the current schedule is actually recalculated based on the last received data. The current output is sent to output 1 or 2, and the schedule is sent to output 3.</p><h4 id="reset" tabindex="-1"><a class="header-anchor" href="#reset" aria-hidden="true">#</a> reset</h4><p>You can reset data the node has saved in context by sending this message:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token property">"payload"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
21
|
+
<span class="token property">"commands"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
22
|
+
<span class="token property">"reset"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
23
|
+
<span class="token punctuation">}</span>
|
|
24
|
+
<span class="token punctuation">}</span>
|
|
25
|
+
</code></pre><div class="line-numbers" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p>When you do this, all historical data the node has saved is deleted, including the current schedule, so the result will be that the node shows status "No price data". When new price data is received, a schedule is calculated without considering any history.</p><p>The nodes config is not deleted, as the node depends on it to work.</p><div class="custom-container warning"><p class="custom-container-title">WARNING</p><p>This operation cannot be undone.</p><p>However, it is normally not a big loss, as you can just feed the node with new price data and start from scratch.</p></div><h2 id="input" tabindex="-1"><a class="header-anchor" href="#input" aria-hidden="true">#</a> Input</h2>`,35),k=n("The input is the "),f=n("common strategy input format"),g=n("."),y=t(`<p>In addition to the prices sent as input, the node is using the schedule for the day before it receives data for, so that it can calculate the schedule in the beginning of the day according to the configured rules. This requires of course that the node was run the day before.</p><h2 id="output" tabindex="-1"><a class="header-anchor" href="#output" aria-hidden="true">#</a> Output</h2><p>There are three outputs. You use only those you need for your purpose.</p><h3 id="output-1" tabindex="-1"><a class="header-anchor" href="#output-1" aria-hidden="true">#</a> Output 1</h3><p>A payload with the word <code>true</code> is sent to output 1 whenever the power / switch shall be turned on.</p><h3 id="output-2" tabindex="-1"><a class="header-anchor" href="#output-2" aria-hidden="true">#</a> Output 2</h3><p>A payload with the word <code>false</code> is sent to output 2 whenever the power / switch shall be turned off.</p><h3 id="output-3" tabindex="-1"><a class="header-anchor" href="#output-3" aria-hidden="true">#</a> Output 3</h3><p>When a valid input is received, and the schedule is recalculated, the resulting schedule, as well as some other information, is sent to output 3. You can use this to see the plan and verify that it meets your expectations. You can also use it to display the schedule in any way you like.</p><p>Example of output:</p><div class="language-json ext-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
|
|
26
|
+
<span class="token property">"schedule"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
|
|
27
|
+
<span class="token punctuation">{</span>
|
|
28
|
+
<span class="token property">"time"</span><span class="token operator">:</span> <span class="token string">"2021-09-30T00:00:00.000+02:00"</span><span class="token punctuation">,</span>
|
|
29
|
+
<span class="token property">"value"</span><span class="token operator">:</span> <span class="token boolean">false</span>
|
|
30
|
+
<span class="token punctuation">}</span><span class="token punctuation">,</span>
|
|
31
|
+
<span class="token punctuation">{</span>
|
|
32
|
+
<span class="token property">"time"</span><span class="token operator">:</span> <span class="token string">"2021-09-30T01:00:00.000+02:00"</span><span class="token punctuation">,</span>
|
|
33
|
+
<span class="token property">"value"</span><span class="token operator">:</span> <span class="token boolean">true</span>
|
|
34
|
+
<span class="token punctuation">}</span>
|
|
35
|
+
<span class="token punctuation">]</span><span class="token punctuation">,</span>
|
|
36
|
+
<span class="token property">"hours"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
|
|
37
|
+
<span class="token punctuation">{</span>
|
|
38
|
+
<span class="token property">"price"</span><span class="token operator">:</span> <span class="token number">1.2584</span><span class="token punctuation">,</span>
|
|
39
|
+
<span class="token property">"onOff"</span><span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span>
|
|
40
|
+
<span class="token property">"start"</span><span class="token operator">:</span> <span class="token string">"2021-09-30T00:00:00.000+02:00"</span><span class="token punctuation">,</span>
|
|
41
|
+
<span class="token property">"saving"</span><span class="token operator">:</span> <span class="token number">0.2034</span>
|
|
42
|
+
<span class="token punctuation">}</span><span class="token punctuation">,</span>
|
|
43
|
+
<span class="token punctuation">{</span>
|
|
44
|
+
<span class="token property">"price"</span><span class="token operator">:</span> <span class="token number">1.055</span><span class="token punctuation">,</span>
|
|
45
|
+
<span class="token property">"onOff"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
46
|
+
<span class="token property">"start"</span><span class="token operator">:</span> <span class="token string">"2021-09-30T01:00:00.000+02:00"</span><span class="token punctuation">,</span>
|
|
47
|
+
<span class="token property">"saving"</span><span class="token operator">:</span> <span class="token null keyword">null</span>
|
|
48
|
+
<span class="token punctuation">}</span><span class="token punctuation">,</span>
|
|
49
|
+
<span class="token punctuation">{</span>
|
|
50
|
+
<span class="token property">"price"</span><span class="token operator">:</span> <span class="token number">1.2054</span><span class="token punctuation">,</span>
|
|
51
|
+
<span class="token property">"onOff"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
52
|
+
<span class="token property">"start"</span><span class="token operator">:</span> <span class="token string">"2021-09-30T02:00:00.000+02:00"</span><span class="token punctuation">,</span>
|
|
53
|
+
<span class="token property">"saving"</span><span class="token operator">:</span> <span class="token null keyword">null</span>
|
|
54
|
+
<span class="token punctuation">}</span>
|
|
55
|
+
<span class="token punctuation">]</span><span class="token punctuation">,</span>
|
|
56
|
+
<span class="token property">"source"</span><span class="token operator">:</span> <span class="token string">"Nord Pool"</span><span class="token punctuation">,</span>
|
|
57
|
+
<span class="token property">"config"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
58
|
+
<span class="token property">"maxHoursToSaveInSequence"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
|
|
59
|
+
<span class="token property">"minHoursOnAfterMaxSequenceSaved"</span><span class="token operator">:</span> <span class="token string">"1"</span><span class="token punctuation">,</span>
|
|
60
|
+
<span class="token property">"minSaving"</span><span class="token operator">:</span> <span class="token number">0.001</span><span class="token punctuation">,</span>
|
|
61
|
+
<span class="token property">"sendCurrentValueWhenRescheduling"</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
|
|
62
|
+
<span class="token property">"outputIfNoSchedule"</span><span class="token operator">:</span> <span class="token boolean">false</span>
|
|
63
|
+
<span class="token punctuation">}</span><span class="token punctuation">,</span>
|
|
64
|
+
<span class="token property">"time"</span><span class="token operator">:</span> <span class="token string">"2021-09-30T23:45:12.123+02:00"</span><span class="token punctuation">,</span>
|
|
65
|
+
<span class="token property">"version"</span><span class="token operator">:</span> <span class="token string">"3.1.2"</span>
|
|
66
|
+
<span class="token punctuation">}</span>
|
|
67
|
+
</code></pre><div class="line-numbers" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br></div></div><p>The <code>schedule</code> array shows every time the switch is turned on or off. The <code>hours</code> array shows values per hour containing the price (received as input), whether that hour is on or off, the start time of the hour and the amount per kWh that is saved on hours that are turned off, compared to the next hour that is on.</p><h3 id="data-saved-in-context" tabindex="-1"><a class="header-anchor" href="#data-saved-in-context" aria-hidden="true">#</a> Data saved in context</h3><p>The node saves some data in the nodes context, so that it can be used on restarts and also taken into consideration when calculating the schedule over midnight.</p><p>You can see the saved data if you select the node in Node-RED, and view "Context data", and refresh the Node context.</p><h2 id="algorithm" tabindex="-1"><a class="header-anchor" href="#algorithm" aria-hidden="true">#</a> Algorithm</h2><p>The calculation that decides what hours to turn off works as follows:</p><ol><li>A matrix (x * y) is created where x is the number of hours we have price information for, and y is the configured maximum number of hours to turn off in a sequence.</li><li>The matrix is filled with how much you save by turning off hour x for y hours.</li><li>The matrix is processed calculating all possibilities for turning off a number of hours in a sequence and by that saving money. In this process all non-saving sequences are discarded. Also, if the average saving per hour is less than what you have configured as minimum amount to save per kWh, the sequence is discarded.</li><li>The remaining sequences are sorted by how much that is saved, in descending order.</li><li>Next, a table with one value per hour is created, with all hours in state "on".</li><li>Then the saving sequences is applied one by one, turning off the hours in each sequence, discarding sequences that lead to any violation of the rules set by the config.</li><li>When all sequences are processed, the resulting table shows a pretty good savings plan, that in most cases would be the optimal plan.</li></ol><p>I say "in most cases", because there is a chance that a group of two or more sequences combined can give a better plan than a single sequence preceeding those two, but where the selection of the one sequence causes the group to be discarded. If anyone encounters this situation, I would be happy to receive the price data set, and try to improve the algorithm even further.</p><h2 id="data-used-for-calculation" tabindex="-1"><a class="header-anchor" href="#data-used-for-calculation" aria-hidden="true">#</a> Data used for calculation</h2><p>Normally data is received for one or two whole days, and all this data is used to do the calculation. In addition, if the node has run before, so there is historical data, the last period on or off before the period data is received for, is considered in the calculation, so that the rules in the configuration are followed also between days.</p><h2 id="restarts" tabindex="-1"><a class="header-anchor" href="#restarts" aria-hidden="true">#</a> Restarts</h2><p>The node saves data in the nodes context, so if Node-RED is configured to save context between restarts, the node will replan with the last received data when it restarts.</p>`,23),q={class:"custom-container warning"},v=t(`<p class="custom-container-title">WARNING</p><p>In Home Assistant, Node-RED is by default configured to save context between restarts. However, if you run Node-RED another way, this may not be the case by default. If context is only stored in memory, it is lost between restarts, and even between re-deployments. This can be changed in the <code>settings.js</code> file for Node-RED like this:</p><div class="language-javascript ext-js line-numbers-mode"><pre class="language-javascript"><code><span class="token literal-property property">contextStorage</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
68
|
+
<span class="token keyword">default</span><span class="token operator">:</span> <span class="token punctuation">{</span>
|
|
69
|
+
<span class="token literal-property property">module</span><span class="token operator">:</span> <span class="token string">"localfilesystem"</span>
|
|
70
|
+
<span class="token punctuation">}</span>
|
|
71
|
+
<span class="token punctuation">}</span>
|
|
72
|
+
</code></pre><div class="line-numbers" aria-hidden="true"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div>`,3),w=n("Please read the "),_={href:"https://nodered.org/docs/user-guide/context",target:"_blank",rel:"noopener noreferrer"},x=n("Node-RED documentation"),T=n(" for more details about this."),M=s("h2",{id:"integration-with-magicmirror",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#integration-with-magicmirror","aria-hidden":"true"},"#"),n(" Integration with MagicMirror")],-1),I=n("Are you using "),j={href:"https://magicmirror.builders/",target:"_blank",rel:"noopener noreferrer"},N=n("MagicMirror"),S=n("? Are you also using "),W={href:"https://tibber.com/",target:"_blank",rel:"noopener noreferrer"},R=n("Tibber"),A=n("? If so, there is a module for MM called "),D={href:"https://github.com/ottopaulsen/MMM-Tibber",target:"_blank",rel:"noopener noreferrer"},O=n("MMM-Tibber"),E=n(", that easily can be used to show savings from this node."),C=s("p",null,[s("img",{src:"https://github.com/ottopaulsen/MMM-Tibber/blob/master/doc/MMM-Tibber-screenshot-savings-graph.png?raw=true",alt:"Show savings in MMM-Tibber"})],-1),V=s("p",null,"The purple lines show savings per kWh.",-1),Y=n("Read more about this in the "),H={href:"https://github.com/ottopaulsen/MMM-Tibber#show-savings",target:"_blank",rel:"noopener noreferrer"},B=n("MMM-Tibber documentation"),L=n("."),F=s("h2",{id:"viewer",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#viewer","aria-hidden":"true"},"#"),n(" Viewer")],-1),G=n("If you like to analyze the data output by the node, take a look at the "),P=n("Best Save Viewer"),z=n(".");function J(K,Q){const o=p("RouterLink"),a=p("ExternalLinkIcon");return i(),c(u,null,[m,s("p",null,[k,e(o,{to:"/nodes/strategy-input.html"},{default:r(()=>[f]),_:1}),g]),y,s("div",q,[v,s("p",null,[w,s("a",_,[x,e(a)]),T])]),M,s("p",null,[I,s("a",j,[N,e(a)]),S,s("a",W,[R,e(a)]),A,s("a",D,[O,e(a)]),E]),C,V,s("p",null,[Y,s("a",H,[B,e(a)]),L]),F,s("p",null,[G,e(o,{to:"/faq/best-save-viewer.html"},{default:r(()=>[P]),_:1}),z])],64)}var $=d(b,[["render",J]]);export{$ as default};
|