node-red-contrib-power-saver 3.3.2 → 3.4.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.
Files changed (77) hide show
  1. package/docs/.vuepress/config.js +7 -1
  2. package/docs/.vuepress/dist/404.html +3 -3
  3. package/docs/.vuepress/dist/assets/img/heat-capacitor-temperatureVsPrice.6e74905b.png +0 -0
  4. package/docs/.vuepress/dist/assets/img/node-ps-strategy-heat-capacitor-cascade-control.2e75ed9e.png +0 -0
  5. package/docs/.vuepress/dist/assets/img/node-ps-strategy-heat-capacitor-simple-flow-example.29d9bf59.png +0 -0
  6. package/docs/.vuepress/dist/assets/img/oven-setpoint-calculation.5bda0eec.png +0 -0
  7. package/docs/.vuepress/dist/assets/img/overshoot-time.b3b5d70e.png +0 -0
  8. package/docs/.vuepress/dist/assets/js/app.e881e9b6.js +1 -0
  9. package/docs/.vuepress/dist/assets/js/runtime~app.8bebaa00.js +1 -0
  10. package/docs/.vuepress/dist/assets/js/v-0aca7ba6.4f3573a3.js +1 -0
  11. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.76407435.js +1 -0
  12. package/docs/.vuepress/dist/assets/js/v-1b3a0ab8.def099e9.js +1 -0
  13. package/docs/.vuepress/dist/assets/js/{v-4637f9e4.703b1d96.js → v-4637f9e4.5cc542f6.js} +1 -1
  14. package/docs/.vuepress/dist/assets/js/v-4c28314d.48fc6e75.js +1 -0
  15. package/docs/.vuepress/dist/assets/js/v-510ed0d4.b58000bf.js +1 -0
  16. package/docs/.vuepress/dist/assets/js/v-677dfaed.1ad4c776.js +1 -0
  17. package/docs/.vuepress/dist/assets/js/v-7c87f26e.5e3553b0.js +1 -0
  18. package/docs/.vuepress/dist/assets/js/v-84304104.f66996c5.js +1 -0
  19. package/docs/.vuepress/dist/assets/js/{v-8daa1a0e.c63afc2b.js → v-8daa1a0e.c06c5c76.js} +1 -1
  20. package/docs/.vuepress/dist/assets/js/v-e8c55052.9664f731.js +1 -0
  21. package/docs/.vuepress/dist/changelog/index.html +3 -3
  22. package/docs/.vuepress/dist/contribute/index.html +3 -3
  23. package/docs/.vuepress/dist/examples/example-cascade-temperature-control.html +286 -0
  24. package/docs/.vuepress/dist/examples/example-heat-capacitor.html +229 -0
  25. package/docs/.vuepress/dist/examples/example-next-schedule-entity.html +3 -3
  26. package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +3 -3
  27. package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +3 -3
  28. package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +4 -4
  29. package/docs/.vuepress/dist/examples/index.html +3 -3
  30. package/docs/.vuepress/dist/faq/best-save-viewer.html +2 -2
  31. package/docs/.vuepress/dist/faq/index.html +2 -2
  32. package/docs/.vuepress/dist/guide/index.html +2 -2
  33. package/docs/.vuepress/dist/index.html +3 -3
  34. package/docs/.vuepress/dist/nodes/index.html +3 -3
  35. package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +3 -3
  36. package/docs/.vuepress/dist/nodes/power-saver.html +3 -3
  37. package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +3 -3
  38. package/docs/.vuepress/dist/nodes/ps-general-add-tariff.html +3 -3
  39. package/docs/.vuepress/dist/nodes/ps-receive-price.html +3 -3
  40. package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +10 -5
  41. package/docs/.vuepress/dist/nodes/ps-strategy-heat-capacitor.html +242 -0
  42. package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +10 -5
  43. package/docs/.vuepress/dist/nodes/strategy-input.html +3 -3
  44. package/docs/README.md +1 -1
  45. package/docs/changelog/README.md +4 -0
  46. package/docs/contribute/README.md +8 -0
  47. package/docs/examples/README.md +8 -2
  48. package/docs/examples/example-cascade-temperature-control.md +345 -0
  49. package/docs/examples/example-heat-capacitor.md +271 -0
  50. package/docs/images/heat-capacitor-temperatureVsPrice.png +0 -0
  51. package/docs/images/node-ps-strategy-heat-capacitor-cascade-control.png +0 -0
  52. package/docs/images/node-ps-strategy-heat-capacitor-simple-flow-example.png +0 -0
  53. package/docs/images/node-ps-strategy-heat-capacitor.png +0 -0
  54. package/docs/images/oven-setpoint-calculation.png +0 -0
  55. package/docs/images/overshoot-time.png +0 -0
  56. package/docs/images/temperature-manipulation-config.png +0 -0
  57. package/docs/nodes/README.md +7 -1
  58. package/docs/nodes/ps-strategy-heat-capacitor.md +346 -0
  59. package/package.json +2 -1
  60. package/src/handle-input.js +1 -1
  61. package/src/strategy-heat-capacitor-functions.js +246 -0
  62. package/src/strategy-heat-capacitor.html +85 -0
  63. package/src/strategy-heat-capacitor.js +125 -0
  64. package/test/data/converted-prices.json +1 -1
  65. package/test/data/multiple-trades.json +53 -0
  66. package/test/data/tibber-decreasing-24h.json +101 -0
  67. package/test/data/tibber-decreasing2-24h.json +101 -0
  68. package/test/strategy-heat-capacitor-node.test.js +183 -0
  69. package/test/strategy-heat-capacitor.test.js +105 -0
  70. package/docs/.vuepress/dist/assets/js/app.b705176c.js +0 -1
  71. package/docs/.vuepress/dist/assets/js/runtime~app.47f4f812.js +0 -1
  72. package/docs/.vuepress/dist/assets/js/v-0aca7ba6.25903946.js +0 -1
  73. package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.a6a015b4.js +0 -1
  74. package/docs/.vuepress/dist/assets/js/v-510ed0d4.7b142a81.js +0 -1
  75. package/docs/.vuepress/dist/assets/js/v-677dfaed.44a653b9.js +0 -1
  76. package/docs/.vuepress/dist/assets/js/v-7c87f26e.ee5be992.js +0 -1
  77. package/docs/.vuepress/dist/assets/js/v-e8c55052.ab0a79ec.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[418],{3959:(n,e,s)=>{s.r(e),s.d(e,{data:()=>a});const a={key:"v-4637f9e4",path:"/nodes/ps-strategy-lowest-price.html",title:"ps-strategy-lowest-price",lang:"en-US",frontmatter:{next:"./ps-receive-price.md"},excerpt:"",headers:[{level:2,title:"Description",slug:"description",children:[]},{level:2,title:"Configuration",slug:"configuration",children:[{level:3,title:"Dynamic config",slug:"dynamic-config",children:[]},{level:3,title:"Dynamic commands",slug:"dynamic-commands",children:[]}]},{level:2,title:"Input",slug:"input",children:[]},{level:2,title:"Output",slug:"output",children:[]},{level:2,title:"Tips & tricks",slug:"tips-tricks",children:[{level:3,title:"Multiple nodes works together",slug:"multiple-nodes-works-together",children:[]},{level:3,title:"Highest price",slug:"highest-price",children:[]}]}],filePathRelative:"nodes/ps-strategy-lowest-price.md",git:{updatedTime:1642369461e3}}},3572:(n,e,s)=>{s.r(e),s.d(e,{default:()=>nn});var a=s(6252),t=s(6110),o=s(3981);const l=(0,a._)("h1",{id:"ps-strategy-lowest-price",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#ps-strategy-lowest-price","aria-hidden":"true"},"#"),(0,a.Uk)(" ps-strategy-lowest-price")],-1),r=(0,a._)("p",null,[(0,a._)("img",{src:t,alt:"ps-strategy-lowest-price"})],-1),p=(0,a._)("p",null,"Strategy node to turn on power the hours when the price is lowest during a given period, and turn off the other hours.",-1),c=(0,a._)("h2",{id:"description",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#description","aria-hidden":"true"},"#"),(0,a.Uk)(" Description")],-1),i=(0,a._)("p",null,"The node can work on a specific period from 1 to 24 hours during a 24 hour period. Inside this period, you can decide how many hours that shall be on. The rest of the period will be off. Outside the period, you can select that the output shall be either on or off. You can also decide that the hours on shall be consecutive (one continuous period) or spread around in multiple on-periods.",-1),u=(0,a._)("h2",{id:"configuration",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#configuration","aria-hidden":"true"},"#"),(0,a.Uk)(" Configuration")],-1),_=(0,a._)("p",null,[(0,a._)("img",{src:o,alt:"Node Configuration"})],-1),k=(0,a._)("table",null,[(0,a._)("thead",null,[(0,a._)("tr",null,[(0,a._)("th",null,"Value"),(0,a._)("th",null,"Description")])]),(0,a._)("tbody",null,[(0,a._)("tr",null,[(0,a._)("td",null,"From Time"),(0,a._)("td",null,"The start time of the selected period.")]),(0,a._)("tr",null,[(0,a._)("td",null,"To Time"),(0,a._)("td",null,"The end time of the selected period.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Hours On"),(0,a._)("td",null,"The number of hours that shall be turned on.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Consecutive On-Period"),(0,a._)("td",null,"Check this if you need the on-period to be consecutive.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Send When Rescheduling"),(0,a._)("td",null,"Check this to make sure on or off output is sent immediately after rescheduling.")]),(0,a._)("tr",null,[(0,a._)("td",null,"If No Schedule, Send"),(0,a._)("td",null,"What to do if there is no valid schedule any more (turn on or off).")]),(0,a._)("tr",null,[(0,a._)("td",null,"Outside Period, Send"),(0,a._)("td",null,"Select the value to send outside the selected period.")])])],-1),d=(0,a._)("p",null,"If you want to use a period of 24 hours, set the From Time and To Time to the same value. The time you select is significant in the way that it decides which 24 hours that are considered when finding the hours with lowest price.",-1),h=(0,a._)("div",{class:"custom-container tip"},[(0,a._)("p",{class:"custom-container-title"},"Example with Consecutive On-Period"),(0,a._)("p",null,[(0,a.Uk)("One example to need a consecutive on-period can be if you want to control the washing machine. Let's say it needs 3 hours, and you want it to run between 22:00 and 06:00. Set "),(0,a._)("code",null,"From Time = 22:00"),(0,a.Uk)(", "),(0,a._)("code",null,"To Time = 06:00"),(0,a.Uk)(" and check the "),(0,a._)("code",null,"Consecutive On-Period"),(0,a.Uk)(" flag. This will turn on the cheapest 3-hour period from 22:00 to 06:00.")]),(0,a._)("p",null,"NB! It is not recommended to run the washing machine when you are sleeping or away.")],-1),b=(0,a._)("div",{class:"custom-container tip"},[(0,a._)("p",{class:"custom-container-title"},"Example with non-consecutive on-period"),(0,a._)("p",null,[(0,a.Uk)("If you have heating cables in the driveway, you may need them to be on only for a few hours every day, for example 4 hours, but it may not be important when this is. Then set "),(0,a._)("code",null,"From Time = 00:00"),(0,a.Uk)(", "),(0,a._)("code",null,"To Time = 00:00"),(0,a.Uk)(" and "),(0,a._)("strong",null,"un-check"),(0,a.Uk)(" the "),(0,a._)("code",null,"Consecutive On-Period"),(0,a.Uk)(" flag. This will turn on the 4 cheapest hours during the whole day, and off the rest.")]),(0,a._)("p",null,[(0,a.Uk)("You can use any time for start and end, but it is a good idea to use "),(0,a._)("code",null,"00:00"),(0,a.Uk)(", since the prices normally comes for this period.")])],-1),m=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"Outside Period, Send"),(0,a._)("p",null,[(0,a.Uk)("Unless the period you select is 24 hours ("),(0,a._)("code",null,"From Time"),(0,a.Uk)(" and "),(0,a._)("code",null,"To Time"),(0,a.Uk)(" are the same), it is important what value you choose for "),(0,a._)("code",null,"Outside Period, Send"),(0,a.Uk)(". This decides whether the output is on or off during the period that is outside the selected period.")])],-1),U=(0,a._)("div",{class:"custom-container danger"},[(0,a._)("p",{class:"custom-container-title"},"Schedule not calculated"),(0,a._)("p",null,"If you select a period for example from 10:00 to 02:00, it may not be possible to calculate before the period starts. This is because electricity prices for the next day (in the Nord Pool area) normally are received around 13:00. The node cannot calculate the period until it has price data for the whole period.")],-1),g=(0,a._)("h3",{id:"dynamic-config",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#dynamic-config","aria-hidden":"true"},"#"),(0,a.Uk)(" Dynamic config")],-1),y=(0,a._)("p",null,"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:",-1),f=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"fromTime"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"10"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"toTime"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"16"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hoursOn"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"3"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"doNotSplit"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br")])],-1),w=(0,a._)("p",null,"All the variables in the config object are optional. You can send only those you want to change.",-1),v=(0,a._)("p",null,"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.",-1),T=(0,a._)("p",null,"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.",-1),x=(0,a._)("p",null,"However, you can send config and price data in the same message. Then both will be used .",-1),O=(0,a._)("h3",{id:"dynamic-commands",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#dynamic-commands","aria-hidden":"true"},"#"),(0,a.Uk)(" Dynamic commands")],-1),S=(0,a._)("p",null,[(0,a.Uk)("You can dynamically send some commands to the node via its input, by using a "),(0,a._)("code",null,"commands"),(0,a.Uk)(" object in the payload as described below.")],-1),j=(0,a._)("p",null,"Commands can be sent together with config and/or price data, but the exact behavior is not defined.",-1),C=(0,a._)("h4",{id:"sendschedule",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#sendschedule","aria-hidden":"true"},"#"),(0,a.Uk)(" sendSchedule")],-1),I=(0,a._)("p",null,"You can get the schedule sent to output 3 any time by sending a message like this to the node:",-1),W=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"commands"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br")])],-1),N=(0,a._)("p",null,"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.",-1),P=(0,a._)("h4",{id:"reset",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#reset","aria-hidden":"true"},"#"),(0,a.Uk)(" reset")],-1),Y=(0,a._)("p",null,"You can reset data the node has saved in context by sending this message:",-1),D=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"commands"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"reset"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br")])],-1),H=(0,a._)("p",null,'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.',-1),F=(0,a._)("p",null,"The nodes config is not deleted, as the node depends on it to work.",-1),R=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"WARNING"),(0,a._)("p",null,"This operation cannot be undone."),(0,a._)("p",null,"However, it is normally not a big loss, as you can just feed the node with new price data and start from scratch.")],-1),E=(0,a._)("h2",{id:"input",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#input","aria-hidden":"true"},"#"),(0,a.Uk)(" Input")],-1),V=(0,a.Uk)("The input is the "),A=(0,a.Uk)("common strategy input format"),L=(0,a._)("h2",{id:"output",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output","aria-hidden":"true"},"#"),(0,a.Uk)(" Output")],-1),M=(0,a._)("p",null,"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.",-1),Z=(0,a._)("p",null,"Example of output:",-1),B=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"schedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T00:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T04:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T10:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T18:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T04:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T10:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T18:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hours"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.4778"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T00:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.4828"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T01:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token comment"},"//..."),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.6514"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T23:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"source"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"Tibber"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"fromTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"04"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"toTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"18"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hoursOn"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"06"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"doNotSplit"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T23:45:12.123+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"version"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"3.1.2"'),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"12"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"13"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"14"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"15"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"16"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"17"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"18"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"19"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"20"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"21"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"22"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"23"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"24"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"25"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"26"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"27"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"28"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"29"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"30"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"31"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"32"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"33"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"34"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"35"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"36"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"37"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"38"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"39"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"40"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"41"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"42"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"43"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"44"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"45"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"46"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"47"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"48"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"49"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"50"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"51"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"52"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"53"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"54"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"55"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"56"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"57"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"58"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"59"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"60"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"61"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"62"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"63"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"64"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"65"),(0,a._)("br")])],-1),G=(0,a._)("p",null,[(0,a.Uk)("The "),(0,a._)("code",null,"schedule"),(0,a.Uk)(" array shows every time the switch is turned on or off. The "),(0,a._)("code",null,"hours"),(0,a.Uk)(" 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.")],-1),J=(0,a._)("h2",{id:"tips-tricks",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#tips-tricks","aria-hidden":"true"},"#"),(0,a.Uk)(" Tips & tricks")],-1),q=(0,a._)("h3",{id:"multiple-nodes-works-together",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#multiple-nodes-works-together","aria-hidden":"true"},"#"),(0,a.Uk)(" Multiple nodes works together")],-1),z=(0,a._)("p",null,"You can use multiple nodes simultanously, for different periods, if you want more hours on one part of the day than another part, or to make sure there are at least some hours on during each period.",-1),K=(0,a._)("h3",{id:"highest-price",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#highest-price","aria-hidden":"true"},"#"),(0,a.Uk)(" Highest price")],-1),Q=(0,a._)("p",null,[(0,a.Uk)("If you want to find the "),(0,a._)("code",null,"x"),(0,a.Uk)(" hours with the highest prices, do as follows:")],-1),X=(0,a._)("ol",null,[(0,a._)("li",null,[(0,a.Uk)("Calculate "),(0,a._)("code",null,"y"),(0,a.Uk)(" as the total number of hours in the period. For example, if the period is from "),(0,a._)("code",null,"08:00"),(0,a.Uk)(" to "),(0,a._)("code",null,"20:00"),(0,a.Uk)(", then "),(0,a._)("code",null,"y = 12"),(0,a.Uk)(".")]),(0,a._)("li",null,[(0,a.Uk)("Configure "),(0,a._)("code",null,"Hours On = y - x"),(0,a.Uk)(", so if "),(0,a._)("code",null,"x = 4"),(0,a.Uk)(", then "),(0,a._)("code",null,"Hours On = 12 - 4 = 8"),(0,a.Uk)(".")]),(0,a._)("li",null,[(0,a.Uk)("Use "),(0,a._)("strong",null,"Output 2"),(0,a.Uk)(" to get a signal when you have the hours with the highest prices. Just remember that the value sent to output 2 is "),(0,a._)("code",null,"false"),(0,a.Uk)(", not "),(0,a._)("code",null,"true"),(0,a.Uk)(" as it is on output 1.")])],-1),$={},nn=(0,s(3744).Z)($,[["render",function(n,e){const s=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)(a.HY,null,[l,r,p,c,i,u,_,k,d,h,b,m,U,g,y,f,w,v,T,x,O,S,j,C,I,W,N,P,Y,D,H,F,R,E,(0,a._)("p",null,[V,(0,a.Wm)(s,{to:"/nodes/strategy-input.html"},{default:(0,a.w5)((()=>[A])),_:1})]),L,M,Z,B,G,J,q,z,K,Q,X],64)}]])},3744:(n,e)=>{e.Z=(n,e)=>{const s=n.__vccOpts||n;for(const[n,a]of e)s[n]=a;return s}},3981:(n,e,s)=>{n.exports=s.p+"assets/img/lowest-price-config.6d66a8c2.png"},6110:(n,e,s)=>{n.exports=s.p+"assets/img/node-ps-strategy-lowest-price.3a4ad347.png"}}]);
1
+ "use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[418],{3959:(n,e,s)=>{s.r(e),s.d(e,{data:()=>a});const a={key:"v-4637f9e4",path:"/nodes/ps-strategy-lowest-price.html",title:"ps-strategy-lowest-price",lang:"en-US",frontmatter:{next:"./ps-receive-price.md"},excerpt:"",headers:[{level:2,title:"Description",slug:"description",children:[]},{level:2,title:"Configuration",slug:"configuration",children:[{level:3,title:"Dynamic config",slug:"dynamic-config",children:[]},{level:3,title:"Dynamic commands",slug:"dynamic-commands",children:[]}]},{level:2,title:"Input",slug:"input",children:[]},{level:2,title:"Output",slug:"output",children:[]},{level:2,title:"Tips & tricks",slug:"tips-tricks",children:[{level:3,title:"Multiple nodes works together",slug:"multiple-nodes-works-together",children:[]},{level:3,title:"Highest price",slug:"highest-price",children:[]}]}],filePathRelative:"nodes/ps-strategy-lowest-price.md",git:{updatedTime:1643919651e3}}},7951:(n,e,s)=>{s.r(e),s.d(e,{default:()=>tn});var a=s(6252),t=s(6110),o=s(3981);const l=(0,a._)("h1",{id:"ps-strategy-lowest-price",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#ps-strategy-lowest-price","aria-hidden":"true"},"#"),(0,a.Uk)(" ps-strategy-lowest-price")],-1),r=(0,a._)("p",null,[(0,a._)("img",{src:t,alt:"ps-strategy-lowest-price"})],-1),p=(0,a._)("p",null,"Strategy node to turn on power the hours when the price is lowest during a given period, and turn off the other hours.",-1),c=(0,a._)("h2",{id:"description",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#description","aria-hidden":"true"},"#"),(0,a.Uk)(" Description")],-1),i=(0,a._)("p",null,"The node can work on a specific period from 1 to 24 hours during a 24 hour period. Inside this period, you can decide how many hours that shall be on. The rest of the period will be off. Outside the period, you can select that the output shall be either on or off. You can also decide that the hours on shall be consecutive (one continuous period) or spread around in multiple on-periods.",-1),u=(0,a._)("h2",{id:"configuration",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#configuration","aria-hidden":"true"},"#"),(0,a.Uk)(" Configuration")],-1),_=(0,a._)("p",null,[(0,a._)("img",{src:o,alt:"Node Configuration"})],-1),k=(0,a._)("table",null,[(0,a._)("thead",null,[(0,a._)("tr",null,[(0,a._)("th",null,"Value"),(0,a._)("th",null,"Description")])]),(0,a._)("tbody",null,[(0,a._)("tr",null,[(0,a._)("td",null,"From Time"),(0,a._)("td",null,"The start time of the selected period.")]),(0,a._)("tr",null,[(0,a._)("td",null,"To Time"),(0,a._)("td",null,"The end time of the selected period.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Hours On"),(0,a._)("td",null,"The number of hours that shall be turned on.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Consecutive On-Period"),(0,a._)("td",null,"Check this if you need the on-period to be consecutive.")]),(0,a._)("tr",null,[(0,a._)("td",null,"Send When Rescheduling"),(0,a._)("td",null,"Check this to make sure on or off output is sent immediately after rescheduling.")]),(0,a._)("tr",null,[(0,a._)("td",null,"If No Schedule, Send"),(0,a._)("td",null,"What to do if there is no valid schedule any more (turn on or off).")]),(0,a._)("tr",null,[(0,a._)("td",null,"Outside Period, Send"),(0,a._)("td",null,"Select the value to send outside the selected period.")])])],-1),d=(0,a._)("p",null,"If you want to use a period of 24 hours, set the From Time and To Time to the same value. The time you select is significant in the way that it decides which 24 hours that are considered when finding the hours with lowest price.",-1),h=(0,a._)("div",{class:"custom-container tip"},[(0,a._)("p",{class:"custom-container-title"},"Example with Consecutive On-Period"),(0,a._)("p",null,[(0,a.Uk)("One example to need a consecutive on-period can be if you want to control the washing machine. Let's say it needs 3 hours, and you want it to run between 22:00 and 06:00. Set "),(0,a._)("code",null,"From Time = 22:00"),(0,a.Uk)(", "),(0,a._)("code",null,"To Time = 06:00"),(0,a.Uk)(" and check the "),(0,a._)("code",null,"Consecutive On-Period"),(0,a.Uk)(" flag. This will turn on the cheapest 3-hour period from 22:00 to 06:00.")]),(0,a._)("p",null,"NB! It is not recommended to run the washing machine when you are sleeping or away.")],-1),b=(0,a._)("div",{class:"custom-container tip"},[(0,a._)("p",{class:"custom-container-title"},"Example with non-consecutive on-period"),(0,a._)("p",null,[(0,a.Uk)("If you have heating cables in the driveway, you may need them to be on only for a few hours every day, for example 4 hours, but it may not be important when this is. Then set "),(0,a._)("code",null,"From Time = 00:00"),(0,a.Uk)(", "),(0,a._)("code",null,"To Time = 00:00"),(0,a.Uk)(" and "),(0,a._)("strong",null,"un-check"),(0,a.Uk)(" the "),(0,a._)("code",null,"Consecutive On-Period"),(0,a.Uk)(" flag. This will turn on the 4 cheapest hours during the whole day, and off the rest.")]),(0,a._)("p",null,[(0,a.Uk)("You can use any time for start and end, but it is a good idea to use "),(0,a._)("code",null,"00:00"),(0,a.Uk)(", since the prices normally comes for this period.")])],-1),m=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"Outside Period, Send"),(0,a._)("p",null,[(0,a.Uk)("Unless the period you select is 24 hours ("),(0,a._)("code",null,"From Time"),(0,a.Uk)(" and "),(0,a._)("code",null,"To Time"),(0,a.Uk)(" are the same), it is important what value you choose for "),(0,a._)("code",null,"Outside Period, Send"),(0,a.Uk)(". This decides whether the output is on or off during the period that is outside the selected period.")])],-1),U=(0,a._)("div",{class:"custom-container danger"},[(0,a._)("p",{class:"custom-container-title"},"Schedule not calculated"),(0,a._)("p",null,"If you select a period for example from 10:00 to 02:00, it may not be possible to calculate before the period starts. This is because electricity prices for the next day (in the Nord Pool area) normally are received around 13:00. The node cannot calculate the period until it has price data for the whole period.")],-1),g=(0,a._)("h3",{id:"dynamic-config",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#dynamic-config","aria-hidden":"true"},"#"),(0,a.Uk)(" Dynamic config")],-1),y=(0,a._)("p",null,"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:",-1),f=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"fromTime"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"10"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"toTime"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"16"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hoursOn"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"3"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"doNotSplit"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a.Uk)(),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br")])],-1),w=(0,a._)("p",null,"All the variables in the config object are optional. You can send only those you want to change.",-1),v=(0,a._)("p",null,"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.",-1),T=(0,a._)("p",null,"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.",-1),x=(0,a._)("p",null,"However, you can send config and price data in the same message. Then both will be used .",-1),O=(0,a._)("h3",{id:"dynamic-commands",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#dynamic-commands","aria-hidden":"true"},"#"),(0,a.Uk)(" Dynamic commands")],-1),j=(0,a._)("p",null,[(0,a.Uk)("You can dynamically send some commands to the node via its input, by using a "),(0,a._)("code",null,"commands"),(0,a.Uk)(" object in the payload as described below.")],-1),S=(0,a._)("p",null,"Commands can be sent together with config and/or price data, but the exact behavior is not defined.",-1),C=(0,a._)("h4",{id:"sendschedule",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#sendschedule","aria-hidden":"true"},"#"),(0,a.Uk)(" sendSchedule")],-1),I=(0,a._)("p",null,"You can get the schedule sent to output 3 any time by sending a message like this to the node:",-1),W=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"commands"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br")])],-1),N=(0,a._)("p",null,"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.",-1),P=(0,a._)("h4",{id:"sendoutput",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#sendoutput","aria-hidden":"true"},"#"),(0,a.Uk)(" sendOutput")],-1),Y=(0,a._)("p",null,"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:",-1),D=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"commands"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendOutput"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br")])],-1),H=(0,a._)("p",null,"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.",-1),F=(0,a._)("h4",{id:"reset",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#reset","aria-hidden":"true"},"#"),(0,a.Uk)(" reset")],-1),R=(0,a._)("p",null,"You can reset data the node has saved in context by sending this message:",-1),E=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token property"},'"payload"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"commands"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"reset"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br")])],-1),V=(0,a._)("p",null,'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.',-1),A=(0,a._)("p",null,"The nodes config is not deleted, as the node depends on it to work.",-1),L=(0,a._)("div",{class:"custom-container warning"},[(0,a._)("p",{class:"custom-container-title"},"WARNING"),(0,a._)("p",null,"This operation cannot be undone."),(0,a._)("p",null,"However, it is normally not a big loss, as you can just feed the node with new price data and start from scratch.")],-1),M=(0,a._)("h2",{id:"input",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#input","aria-hidden":"true"},"#"),(0,a.Uk)(" Input")],-1),Z=(0,a.Uk)("The input is the "),B=(0,a.Uk)("common strategy input format"),G=(0,a._)("h2",{id:"output",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#output","aria-hidden":"true"},"#"),(0,a.Uk)(" Output")],-1),J=(0,a._)("p",null,"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.",-1),q=(0,a._)("p",null,"Example of output:",-1),z=(0,a._)("div",{class:"language-json ext-json line-numbers-mode"},[(0,a._)("pre",{class:"language-json"},[(0,a._)("code",null,[(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"schedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T00:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T04:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T10:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T18:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T04:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T10:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T18:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"value"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hours"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"["),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.4778"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T00:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.4828"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-10T01:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token comment"},"//..."),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"price"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token number"},"0.6514"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"onOff"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"start"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-12-11T23:00:00.000+01:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"saving"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token null keyword"},"null"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"]"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"source"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"Tibber"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"config"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token punctuation"},"{"),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"fromTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"04"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"toTime"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"18"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"hoursOn"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"06"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"doNotSplit"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"false"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"sendCurrentValueWhenRescheduling"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token boolean"},"true"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputIfNoSchedule"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"outputOutsidePeriod"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"true"'),(0,a.Uk)("\n "),(0,a._)("span",{class:"token punctuation"},"}"),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"time"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"2021-09-30T23:45:12.123+02:00"'),(0,a._)("span",{class:"token punctuation"},","),(0,a.Uk)("\n "),(0,a._)("span",{class:"token property"},'"version"'),(0,a._)("span",{class:"token operator"},":"),(0,a.Uk)(),(0,a._)("span",{class:"token string"},'"3.1.2"'),(0,a.Uk)("\n"),(0,a._)("span",{class:"token punctuation"},"}"),(0,a.Uk)("\n")])]),(0,a._)("div",{class:"line-numbers"},[(0,a._)("span",{class:"line-number"},"1"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"2"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"3"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"4"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"5"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"6"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"7"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"8"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"9"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"10"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"11"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"12"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"13"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"14"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"15"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"16"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"17"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"18"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"19"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"20"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"21"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"22"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"23"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"24"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"25"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"26"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"27"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"28"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"29"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"30"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"31"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"32"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"33"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"34"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"35"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"36"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"37"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"38"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"39"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"40"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"41"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"42"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"43"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"44"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"45"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"46"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"47"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"48"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"49"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"50"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"51"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"52"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"53"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"54"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"55"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"56"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"57"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"58"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"59"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"60"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"61"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"62"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"63"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"64"),(0,a._)("br"),(0,a._)("span",{class:"line-number"},"65"),(0,a._)("br")])],-1),K=(0,a._)("p",null,[(0,a.Uk)("The "),(0,a._)("code",null,"schedule"),(0,a.Uk)(" array shows every time the switch is turned on or off. The "),(0,a._)("code",null,"hours"),(0,a.Uk)(" 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.")],-1),Q=(0,a._)("h2",{id:"tips-tricks",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#tips-tricks","aria-hidden":"true"},"#"),(0,a.Uk)(" Tips & tricks")],-1),X=(0,a._)("h3",{id:"multiple-nodes-works-together",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#multiple-nodes-works-together","aria-hidden":"true"},"#"),(0,a.Uk)(" Multiple nodes works together")],-1),$=(0,a._)("p",null,"You can use multiple nodes simultanously, for different periods, if you want more hours on one part of the day than another part, or to make sure there are at least some hours on during each period.",-1),nn=(0,a._)("h3",{id:"highest-price",tabindex:"-1"},[(0,a._)("a",{class:"header-anchor",href:"#highest-price","aria-hidden":"true"},"#"),(0,a.Uk)(" Highest price")],-1),en=(0,a._)("p",null,[(0,a.Uk)("If you want to find the "),(0,a._)("code",null,"x"),(0,a.Uk)(" hours with the highest prices, do as follows:")],-1),sn=(0,a._)("ol",null,[(0,a._)("li",null,[(0,a.Uk)("Calculate "),(0,a._)("code",null,"y"),(0,a.Uk)(" as the total number of hours in the period. For example, if the period is from "),(0,a._)("code",null,"08:00"),(0,a.Uk)(" to "),(0,a._)("code",null,"20:00"),(0,a.Uk)(", then "),(0,a._)("code",null,"y = 12"),(0,a.Uk)(".")]),(0,a._)("li",null,[(0,a.Uk)("Configure "),(0,a._)("code",null,"Hours On = y - x"),(0,a.Uk)(", so if "),(0,a._)("code",null,"x = 4"),(0,a.Uk)(", then "),(0,a._)("code",null,"Hours On = 12 - 4 = 8"),(0,a.Uk)(".")]),(0,a._)("li",null,[(0,a.Uk)("Use "),(0,a._)("strong",null,"Output 2"),(0,a.Uk)(" to get a signal when you have the hours with the highest prices. Just remember that the value sent to output 2 is "),(0,a._)("code",null,"false"),(0,a.Uk)(", not "),(0,a._)("code",null,"true"),(0,a.Uk)(" as it is on output 1.")])],-1),an={},tn=(0,s(3744).Z)(an,[["render",function(n,e){const s=(0,a.up)("RouterLink");return(0,a.wg)(),(0,a.iD)(a.HY,null,[l,r,p,c,i,u,_,k,d,h,b,m,U,g,y,f,w,v,T,x,O,j,S,C,I,W,N,P,Y,D,H,F,R,E,V,A,L,M,(0,a._)("p",null,[Z,(0,a.Wm)(s,{to:"/nodes/strategy-input.html"},{default:(0,a.w5)((()=>[B])),_:1})]),G,J,q,z,K,Q,X,$,nn,en,sn],64)}]])},3744:(n,e)=>{e.Z=(n,e)=>{const s=n.__vccOpts||n;for(const[n,a]of e)s[n]=a;return s}},3981:(n,e,s)=>{n.exports=s.p+"assets/img/lowest-price-config.6d66a8c2.png"},6110:(n,e,s)=>{n.exports=s.p+"assets/img/node-ps-strategy-lowest-price.3a4ad347.png"}}]);