node-red-contrib-power-saver 3.0.1 → 3.0.5
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/.github/FUNDING.yml +12 -0
- package/docs/.vuepress/dist/404.html +3 -3
- package/docs/.vuepress/dist/assets/js/app.342dc054.js +1 -0
- package/docs/.vuepress/dist/assets/js/runtime~app.0d53f24f.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-08683c60.07fe8291.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-0aca7ba6.aec5ba75.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.d008d8bc.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-1ad821fa.85407071.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-30acb564.73b8e29f.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-4637f9e4.22ab9413.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-510ed0d4.129ef915.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-5954bcb2.be07962c.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-5db8da3a.ac192f35.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-61f728ca.802ab15e.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-677dfaed.9bbbd037.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-7c87f26e.457a1a60.js +1 -0
- package/docs/.vuepress/dist/assets/js/{v-8daa1a0e.1ea39527.js → v-8daa1a0e.db8b59c6.js} +1 -1
- package/docs/.vuepress/dist/assets/js/v-b4a42144.6e0c5aa0.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-e8c55052.5f85b6cd.js +1 -0
- package/docs/.vuepress/dist/assets/js/v-fffb8e28.e815e852.js +1 -0
- package/docs/.vuepress/dist/changelog/index.html +3 -3
- package/docs/.vuepress/dist/contribute/index.html +3 -3
- package/docs/.vuepress/dist/examples/example-nordpool-current-state.html +3 -3
- package/docs/.vuepress/dist/examples/example-nordpool-events-state.html +3 -3
- package/docs/.vuepress/dist/examples/example-tibber-mqtt.html +3 -3
- package/docs/.vuepress/dist/examples/index.html +3 -3
- package/docs/.vuepress/dist/guide/index.html +3 -3
- package/docs/.vuepress/dist/index.html +2 -2
- package/docs/.vuepress/dist/nodes/index.html +3 -3
- package/docs/.vuepress/dist/nodes/old-power-saver-doc.html +3 -3
- package/docs/.vuepress/dist/nodes/power-saver.html +3 -3
- package/docs/.vuepress/dist/nodes/ps-elvia-add-tariff.html +3 -3
- package/docs/.vuepress/dist/nodes/ps-receive-price.html +3 -3
- package/docs/.vuepress/dist/nodes/ps-strategy-best-save.html +3 -3
- package/docs/.vuepress/dist/nodes/ps-strategy-lowest-price.html +3 -3
- package/docs/.vuepress/dist/nodes/strategy-input.html +3 -3
- package/docs/changelog/README.md +18 -0
- package/package.json +5 -4
- package/src/handle-input.js +1 -1
- package/src/receive-price-functions.js +14 -10
- package/src/receive-price.js +2 -2
- package/src/strategy-lowest-price.html +1 -1
- package/src/strategy-lowest-price.js +3 -3
- package/test/data/converted-prices.json +1 -0
- package/test/data/tibber-data-end-0-24h.json +197 -0
- package/test/data/tibber-data-end-0.json +101 -0
- package/test/data/tibber-result-end-0-24h.json +320 -0
- package/test/data/tibber-result-end-0.json +168 -0
- package/test/receive-price-functions.test.js +20 -0
- package/test/receive-price.test.js +4 -4
- package/test/strategy-lowest-price.test.js +66 -0
- package/docs/.vuepress/dist/assets/js/app.80d4373d.js +0 -1
- package/docs/.vuepress/dist/assets/js/runtime~app.665b411c.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-08683c60.9edcaa60.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-0aca7ba6.5eca5160.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-0b5e3c8c.c02472fb.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-1ad821fa.a628e907.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-30acb564.80b4190d.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-4637f9e4.df94c6ea.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-510ed0d4.a78d8542.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-5954bcb2.4f4712f3.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-5db8da3a.2e49b81a.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-61f728ca.7b545524.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-677dfaed.756e0fb5.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-7c87f26e.57507077.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-b4a42144.a812c440.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-e8c55052.30f30acd.js +0 -1
- package/docs/.vuepress/dist/assets/js/v-fffb8e28.850019c1.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[651],{3029:(e,t,a)=>{a.r(t),a.d(t,{data:()=>r});const r={key:"v-e8c55052",path:"/nodes/",title:"Nodes",lang:"en-US",frontmatter:{},excerpt:"",headers:[{level:2,title:"Power Saver",slug:"power-saver",children:[]},{level:2,title:"Strategy nodes",slug:"strategy-nodes",children:[{level:3,title:"ps-strategy-best-save",slug:"ps-strategy-best-save",children:[]},{level:3,title:"ps-strategy-lowest-price",slug:"ps-strategy-lowest-price",children:[]}]},{level:2,title:"Utility nodes",slug:"utility-nodes",children:[{level:3,title:"ps-receive-price",slug:"ps-receive-price",children:[]}]},{level:2,title:"Grid tariff nodes",slug:"grid-tariff-nodes",children:[{level:3,title:"ps-elvia-add-tariff",slug:"ps-elvia-add-tariff",children:[]}]},{level:2,title:"Other nodes",slug:"other-nodes",children:[{level:3,title:"ps-elvia-tariff-types",slug:"ps-elvia-tariff-types",children:[]},{level:3,title:"ps-elvia-tariff",slug:"ps-elvia-tariff",children:[]}]}],filePathRelative:"nodes/README.md",git:{updatedTime:1639260953e3,contributors:[{name:"Otto Paulsen",email:"otto.paulsen@itema.no",commits:3}]}}},4493:(e,t,a)=>{a.r(t),a.d(t,{default:()=>W});var r=a(6252),s=a(7656),i=a(7188),d=a(6110),l=a(3301),n=a(5824);const o=(0,r._)("h1",{id:"nodes",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#nodes","aria-hidden":"true"},"#"),(0,r.Uk)(" Nodes")],-1),p=(0,r._)("p",null,"Here is an overview of the nodes, and links to detailed descriptions for eah of them.",-1),h={id:"power-saver",tabindex:"-1"},f=(0,r._)("a",{class:"header-anchor",href:"#power-saver","aria-hidden":"true"},"#",-1),c=(0,r.Uk)(),v=(0,r._)("a",{href:"./power-saver"},"Power Saver",-1),g=(0,r.Uk)(),u=(0,r._)("p",null,[(0,r._)("img",{src:s,alt:"Power Saver node"})],-1),_=(0,r._)("p",null,"The old node from version 2 is still working, but should be replaced.",-1),y=(0,r._)("h2",{id:"strategy-nodes",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#strategy-nodes","aria-hidden":"true"},"#"),(0,r.Uk)(" Strategy nodes")],-1),b=(0,r._)("p",null,"These are the nodes used to calculate and control saving.",-1),m=(0,r._)("h3",{id:"ps-strategy-best-save",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#ps-strategy-best-save","aria-hidden":"true"},"#"),(0,r.Uk)(),(0,r._)("a",{href:"./ps-strategy-best-save"},"ps-strategy-best-save")],-1),w=(0,r._)("p",null,[(0,r._)("img",{src:i,alt:"ps-strategy-best-save"})],-1),k=(0,r._)("p",null,"Strategy to find the best hours to turn off for most saving.",-1),x=(0,r._)("h3",{id:"ps-strategy-lowest-price",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#ps-strategy-lowest-price","aria-hidden":"true"},"#"),(0,r.Uk)(),(0,r._)("a",{href:"./ps-strategy-lowest-price"},"ps-strategy-lowest-price")],-1),U=(0,r._)("p",null,[(0,r._)("img",{src:d,alt:"ps-strategy-lowest-price"})],-1),S=(0,r._)("p",null,"Strategy to find the x hours with lowest price in a given period each day.",-1),P=(0,r._)("h2",{id:"utility-nodes",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#utility-nodes","aria-hidden":"true"},"#"),(0,r.Uk)(" Utility nodes")],-1),E=(0,r._)("h3",{id:"ps-receive-price",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#ps-receive-price","aria-hidden":"true"},"#"),(0,r.Uk)(),(0,r._)("a",{href:"./ps-receive-price"},"ps-receive-price")],-1),N=(0,r._)("p",null,[(0,r._)("img",{src:l,alt:"ps-receive-price"})],-1),O=(0,r._)("p",null,"Node to convert different types of input data to the format used by the strategy nodes.",-1),T=(0,r._)("h2",{id:"grid-tariff-nodes",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#grid-tariff-nodes","aria-hidden":"true"},"#"),(0,r.Uk)(" Grid tariff nodes")],-1),A=(0,r._)("h3",{id:"ps-elvia-add-tariff",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#ps-elvia-add-tariff","aria-hidden":"true"},"#"),(0,r.Uk)(),(0,r._)("a",{href:"./ps-elvia-add-tariff"},"ps-elvia-add-tariff")],-1),C=(0,r._)("p",null,[(0,r._)("img",{src:n,alt:"ps-elvia-add-tariff"})],-1),D=(0,r._)("p",null,"Node to add Elvia grid tariff to the prices before sending them to the strategy nodes.",-1),G=(0,r._)("h2",{id:"other-nodes",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#other-nodes","aria-hidden":"true"},"#"),(0,r.Uk)(" Other nodes")],-1),H=(0,r._)("p",null,"These are a couple of other nodes for using the Elvia API, but these are not important to the Power Saver, so they are not given any further documentation here.",-1),I=(0,r._)("h3",{id:"ps-elvia-tariff-types",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#ps-elvia-tariff-types","aria-hidden":"true"},"#"),(0,r.Uk)(" ps-elvia-tariff-types")],-1),R=(0,r._)("p",null,"Use this to get a list of the tariff types available in the Elvia API.",-1),Z=(0,r._)("h3",{id:"ps-elvia-tariff",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#ps-elvia-tariff","aria-hidden":"true"},"#"),(0,r.Uk)(" ps-elvia-tariff")],-1),B=(0,r._)("p",null,"Use this to get the Elvia grid tariff for a selected tariff type.",-1),M={},W=(0,a(3744).Z)(M,[["render",function(e,t){const a=(0,r.up)("Badge");return(0,r.wg)(),(0,r.iD)(r.HY,null,[o,p,(0,r._)("h2",h,[f,c,v,g,(0,r.Wm)(a,{type:"warning",text:"deprecated",vertical:"middle"})]),u,_,y,b,m,w,k,x,U,S,P,E,N,O,T,A,C,D,G,H,I,R,Z,B],64)}]])},3744:(e,t)=>{t.Z=(e,t)=>{const a=e.__vccOpts||e;for(const[e,r]of t)a[e]=r;return a}},7656:(e,t,a)=>{e.exports=a.p+"assets/img/node-power-saver.51ff2e5d.png"},5824:(e,t,a)=>{e.exports=a.p+"assets/img/node-ps-elvia-add-tariff.94ea2b09.png"},3301:(e,t,a)=>{e.exports=a.p+"assets/img/node-ps-receive-price.76eaa418.png"},7188:(e,t,a)=>{e.exports=a.p+"assets/img/node-ps-strategy-best-save.392292d5.png"},6110:(e,t,a)=>{e.exports=a.p+"assets/img/node-ps-strategy-lowest-price.3a4ad347.png"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunknode_red_contrib_power_saver=self.webpackChunknode_red_contrib_power_saver||[]).push([[807],{9570:(e,n,t)=>{t.r(n),t.d(n,{data:()=>r});const r={key:"v-fffb8e28",path:"/guide/",title:"Guide",lang:"en-US",frontmatter:{sidebar:"auto"},excerpt:"",headers:[{level:2,title:"Introduction",slug:"introduction",children:[]},{level:2,title:"Getting started",slug:"getting-started",children:[{level:3,title:"Installation",slug:"installation",children:[]},{level:3,title:"Get price data",slug:"get-price-data",children:[]},{level:3,title:"Add grid tariff",slug:"add-grid-tariff",children:[]},{level:3,title:"Calculate and run schedule",slug:"calculate-and-run-schedule",children:[]},{level:3,title:"Use schedule signals",slug:"use-schedule-signals",children:[]},{level:3,title:"Display schedule",slug:"display-schedule",children:[]},{level:3,title:"More information",slug:"more-information",children:[]}]},{level:2,title:"Migration from v2",slug:"migration-from-v2",children:[]}],filePathRelative:"guide/README.md",git:{updatedTime:1639260953e3,contributors:[{name:"Otto Paulsen",email:"otto.paulsen@itema.no",commits:3}]}}},6734:(e,n,t)=>{t.r(n),t.d(n,{default:()=>je});var r=t(6252),l=t(1321),a=t(3405),s=t(1758);const o=(0,r._)("h1",{id:"guide",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#guide","aria-hidden":"true"},"#"),(0,r.Uk)(" Guide")],-1),i=(0,r._)("h2",{id:"introduction",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#introduction","aria-hidden":"true"},"#"),(0,r.Uk)(" Introduction")],-1),d=(0,r._)("p",null,[(0,r.Uk)("This is a collection of nodes you can use to save money on variable power prices. The solution can be used to control switches or other entities in a smart home system, and for example turn on when the price is low, and turn off when the price is high. There are different ways to calculate what hours to turn on and off, and these are impemented as "),(0,r._)("strong",null,"strategies nodes"),(0,r.Uk)(". Each stragety node can be configured to fit different purposes.")],-1),u=(0,r._)("p",null,"The strategies need price data to work. These can be received from different sources, for example Tibber, Nord Pool or custom sources.",-1),c=(0,r._)("div",{class:"custom-container warning"},[(0,r._)("p",{class:"custom-container-title"},"Price sources"),(0,r._)("p",null,"Tibber and Nord Pool are only available in the nordics, so if you live outside the nordics, you must find another source of price data, and make your own input.")],-1),h=(0,r._)("p",null,[(0,r.Uk)("Grid tariff is normally not part of the electricity price, so if this varies by the hour, it must be added before sent to the strategy nodes for calculation. This can be done by putting a "),(0,r._)("code",null,"ps-xxx-add-tariff"),(0,r.Uk)(" node between the price receiver and the strategy.")],-1),p=(0,r._)("p",null,'The strategy nodes have 3 outputs. Output 1 is used to "turn on", output 2 is used to "turn off", and on output 3, the calculated schedule and some other information is sent. You can use this to make graphs, or just send it to a debug node to view it.',-1),_=(0,r._)("p",null,"Example:",-1),b=(0,r._)("p",null,[(0,r._)("img",{src:l,alt:"Example flow"})],-1),m=(0,r._)("p",null,[(0,r.Uk)("Here prices are received from Tibber, converted in the "),(0,r._)("code",null,"ps-receive-price"),(0,r.Uk)(" node, then gridd tariff for Elvia is added before sent to the "),(0,r._)("code",null,"ps-strategy-best-save"),(0,r.Uk)(" node. Output is sent to Home Assistant via two "),(0,r._)("code",null,"call-service"),(0,r.Uk)(" nodes, and the schedule is sent to a debug node.")],-1),f=(0,r._)("div",{class:"custom-container tip"},[(0,r._)("p",{class:"custom-container-title"},"Home Assistant"),(0,r._)("p",null,"The node collection fits very well with Home Assistant (HA), as Node-RED is frequently used for automations, and there also is an integration with Nord Pool, but there is no direct dependency to HA, so all nodes can be used also without HA.")],-1),g=(0,r._)("h2",{id:"getting-started",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#getting-started","aria-hidden":"true"},"#"),(0,r.Uk)(" Getting started")],-1),v=(0,r._)("h3",{id:"installation",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#installation","aria-hidden":"true"},"#"),(0,r.Uk)(" Installation")],-1),k=(0,r._)("p",null,"Install in Node-RED via the Manage Palette menu.",-1),y=(0,r._)("p",null,"May also be installed via npm:",-1),w=(0,r._)("p",null,[(0,r._)("code",null,"npm install node-red-contrib-power-saver")],-1),U=(0,r._)("p",null,[(0,r.Uk)("Make sure that you upgrade now and then to get the latest version. See "),(0,r._)("a",{href:"CHANGELOG"},"changelog"),(0,r.Uk)(" for changes.")],-1),x=(0,r._)("h3",{id:"get-price-data",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#get-price-data","aria-hidden":"true"},"#"),(0,r.Uk)(" Get price data")],-1),T=(0,r._)("p",null,"This solution is useless without price data. In the nordics, there are at least two very common places to get price data from:",-1),A=(0,r._)("ul",null,[(0,r._)("li",null,"Tibber"),(0,r._)("li",null,"Nord Pool")],-1),S=(0,r._)("p",null,[(0,r.Uk)("The "),(0,r._)("code",null,"ps-receive-price"),(0,r.Uk)(" node is designed to handle price input frome both these, and convert it to the format required by the strategy nodes.")],-1),q=(0,r.Uk)("If you are a Tibber customer, use the "),P=(0,r._)("code",null,"tibber-query",-1),H=(0,r.Uk)(" node from the "),I={href:"https://flows.nodered.org/node/node-red-contrib-tibber-api",target:"_blank",rel:"noopener noreferrer"},M=(0,r.Uk)("Tibber API"),N=(0,r.Uk)(" to receive price, with one of the following queries:"),W=(0,r._)("div",{class:"language-gql ext-gql line-numbers-mode"},[(0,r._)("pre",{class:"language-gql"},[(0,r._)("code",null,"{\n viewer {\n homes {\n id\n address {\n address1\n address2\n address3\n postalCode\n city\n country\n }\n }\n }\n}\n")]),(0,r._)("div",{class:"line-numbers"},[(0,r._)("span",{class:"line-number"},"1"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"2"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"3"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"4"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"5"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"6"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"7"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"8"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"9"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"10"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"11"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"12"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"13"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"14"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"15"),(0,r._)("br")])],-1),E=(0,r._)("div",{class:"language-gql ext-gql line-numbers-mode"},[(0,r._)("pre",{class:"language-gql"},[(0,r._)("code",null,'{\n viewer {\n home(id: "142c1670-ab43-2ab3-ba6d-723703a551e2") {\n currentSubscription{\n priceInfo{\n today {\n total\n energy\n tax\n startsAt\n }\n tomorrow {\n total\n energy\n tax\n startsAt\n }\n }\n }\n }\n }\n}\n')]),(0,r._)("div",{class:"highlight-lines"},[(0,r._)("br"),(0,r._)("br"),(0,r._)("div",{class:"highlight-line"}," "),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br"),(0,r._)("br")]),(0,r._)("div",{class:"line-numbers"},[(0,r._)("span",{class:"line-number"},"1"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"2"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"3"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"4"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"5"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"6"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"7"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"8"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"9"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"10"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"11"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"12"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"13"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"14"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"15"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"16"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"17"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"18"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"19"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"20"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"21"),(0,r._)("br"),(0,r._)("span",{class:"line-number"},"22"),(0,r._)("br")])],-1),G=(0,r._)("p",null,[(0,r.Uk)("See more details in the "),(0,r._)("a",{href:"../nodes/ps-receive-price#tibber-input"},"documentation"),(0,r.Uk)(" for the "),(0,r._)("code",null,"ps-receive-price"),(0,r.Uk)(" node.")],-1),C=(0,r.Uk)("Se documentation for "),O={href:"https://flows.nodered.org/node/node-red-contrib-tibber-api",target:"_blank",rel:"noopener noreferrer"},D=(0,r.Uk)("node-red-contrib-tibber-api"),R=(0,r.Uk)(" for details about the Tibber query."),Y=(0,r._)("div",{class:"custom-container tip"},[(0,r._)("p",{class:"custom-container-title"},"Tibber query"),(0,r._)("p",null,[(0,r.Uk)("You can use an "),(0,r._)("code",null,"inject"),(0,r.Uk)(" node (standard Node-RED) to send the Tibber query as a text string int to the "),(0,r._)("code",null,"tibber-query"),(0,r.Uk)(" node. This can be set to repeat the query for example every hour.")])],-1),L=(0,r.Uk)("See example of Tibber flow and mqtt"),j=(0,r.Uk)("If you use Home Assistant (HA), you can install the "),B={href:"https://github.com/custom-components/nordpool",target:"_blank",rel:"noopener noreferrer"},Z=(0,r.Uk)("Nord Pool custom component"),F=(0,r.Uk)(", that provides a "),z=(0,r._)("em",null,"sensor",-1),J=(0,r.Uk)(" that gives price per hour for today and tomorrow. Data can be sent from both the "),K=(0,r._)("code",null,"current state",-1),Q=(0,r.Uk)(" node or the "),V=(0,r._)("code",null,"events: state",-1),X=(0,r.Uk)(" node."),$=(0,r.Uk)("See example with Nordpool and "),ee=(0,r._)("code",null,"current state",-1),ne=(0,r.Uk)(" node"),te=(0,r.Uk)("See example with Nordpool and "),re=(0,r._)("code",null,"events: state",-1),le=(0,r.Uk)(" node"),ae=(0,r._)("h3",{id:"add-grid-tariff",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#add-grid-tariff","aria-hidden":"true"},"#"),(0,r.Uk)(" Add grid tariff")],-1),se=(0,r._)("p",null,"When also the grid tariff changes per hour, it must be added to the electricity price in order to get the calculations right.",-1),oe=(0,r._)("p",null,[(0,r.Uk)("After the the "),(0,r._)("code",null,"ps-receive-price"),(0,r.Uk)(" node, add a "),(0,r._)("code",null,"ps-xxx-add-tariff"),(0,r.Uk)(" node to add grid tariff. What node to choose depends on what grid you get electricity through. The followinggrids are supported:")],-1),ie=(0,r._)("table",null,[(0,r._)("thead",null,[(0,r._)("tr",null,[(0,r._)("th",null,"Grid supplier"),(0,r._)("th",null,"Node")])]),(0,r._)("tbody",null,[(0,r._)("tr",null,[(0,r._)("td",null,"Elvia"),(0,r._)("td",null,[(0,r._)("code",null,"ps-elvia-add-tariff")])])])],-1),de=(0,r._)("p",null,"Oops. Only one grid is currently supported.",-1),ue=(0,r._)("p",null,"If your grid is not supported, you may code this yourself.",-1),ce=(0,r._)("div",{class:"custom-container tip"},[(0,r._)("p",{class:"custom-container-title"},"Skip this step"),(0,r._)("p",null,"If the grid tariff is the same the whole day, you can skip this step i the flow.")],-1),he=(0,r._)("h3",{id:"calculate-and-run-schedule",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#calculate-and-run-schedule","aria-hidden":"true"},"#"),(0,r.Uk)(" Calculate and run schedule")],-1),pe=(0,r._)("p",null,"This is the step where the value is produced. Based on the prices received, the optimal schedule for you is calculated automatically, based on your configuration. You can choose between the following strategies:",-1),_e=(0,r._)("table",null,[(0,r._)("thead",null,[(0,r._)("tr",null,[(0,r._)("th",null,"Strategy"),(0,r._)("th",null,"Node"),(0,r._)("th",null,"Description")])]),(0,r._)("tbody",null,[(0,r._)("tr",null,[(0,r._)("td",null,"Best save"),(0,r._)("td",null,[(0,r._)("code",null,"ps-strategy-best-save")]),(0,r._)("td",null,"Postpone power consumption when there is most to save.")]),(0,r._)("tr",null,[(0,r._)("td",null,"Lowest price"),(0,r._)("td",null,[(0,r._)("code",null,"ps--strategy-lowest-price")]),(0,r._)("td",null,"Turn on power when the prices are the lowest in a given period.")])])],-1),be=(0,r._)("p",null,"These nodes must be configured for your purpose. See configuration description and other details in the documentation for each node.",-1),me=(0,r._)("p",null,[(0,r.Uk)("Send the result from the "),(0,r._)("code",null,"ps-xxx-add-tariff"),(0,r.Uk)(" node (or the "),(0,r._)("code",null,"ps-receive-price"),(0,r.Uk)(" node) as input to the strategy node you choose.")],-1),fe=(0,r._)("div",{class:"custom-container tip"},[(0,r._)("p",{class:"custom-container-title"},"Choose strategy"),(0,r._)("p",null,"Choose the best save strategy if you can postpone power consumption, and expect the consumption to occur during the first hour after power is turned on again."),(0,r._)("p",null,"Choose the lowest price strategy if you need the power to be on for x hours, but it is not important when that is. Note that you can select to have all hours on in one consecutive period, or spread around on the cheapest hours.")],-1),ge=(0,r._)("h3",{id:"use-schedule-signals",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#use-schedule-signals","aria-hidden":"true"},"#"),(0,r.Uk)(" Use schedule signals")],-1),ve=(0,r._)("p",null,"Use the outputs to control switches, thermostats or other entities to control your power consumers.",-1),ke=(0,r._)("p",null,[(0,r._)("strong",null,"Output 1"),(0,r.Uk)(" is used to turn on. A payload with value "),(0,r._)("code",null,"true"),(0,r.Uk)(" is sent every time turning on is scheduled.")],-1),ye=(0,r._)("p",null,[(0,r._)("strong",null,"Output 2"),(0,r.Uk)(" is used to turn off. A payload with value "),(0,r._)("code",null,"false"),(0,r.Uk)(" is sent every time turning off is scheduled.")],-1),we=(0,r._)("p",null,"Example using Home Assistant:",-1),Ue=(0,r._)("p",null,[(0,r._)("img",{src:a,alt:"Example flow"})],-1),xe=(0,r._)("h3",{id:"display-schedule",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#display-schedule","aria-hidden":"true"},"#"),(0,r.Uk)(" Display schedule")],-1),Te=(0,r._)("p",null,[(0,r._)("strong",null,"Output 3"),(0,r.Uk)(" can be used to print or dispay the calculated schedule. If you just want to see it, send it to a debug node. You can also use it to display the result as graphs in HA.")],-1),Ae=(0,r._)("p",null,[(0,r.Uk)("For users of Magic Mirror and Tibber, the "),(0,r._)("code",null,"ps-best-save"),(0,r.Uk)(" node can send its schedule to the MMM-Tibber module. See more details in the "),(0,r._)("code",null,"ps-best-save"),(0,r.Uk)(" node documentation.")],-1),Se=(0,r._)("h3",{id:"more-information",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#more-information","aria-hidden":"true"},"#"),(0,r.Uk)(" More information")],-1),qe=(0,r.Uk)("There are more details and more information in the documentation for each "),Pe={href:"/nodes/",target:"_blank",rel:"noopener noreferrer"},He=(0,r.Uk)("node"),Ie=(0,r.Uk)(" and in the "),Me={href:"/examples/",target:"_blank",rel:"noopener noreferrer"},Ne=(0,r.Uk)("examples"),We=(0,r.Uk)("."),Ee=(0,r._)("h2",{id:"migration-from-v2",tabindex:"-1"},[(0,r._)("a",{class:"header-anchor",href:"#migration-from-v2","aria-hidden":"true"},"#"),(0,r.Uk)(" Migration from v2")],-1),Ge=(0,r._)("p",null,[(0,r.Uk)("The "),(0,r._)("code",null,"Power Saver"),(0,r.Uk)(" node from v2 is still here, and it is working exactly as before. However, it will not be further maintained, so you should replace it. You may directly replace the "),(0,r._)("code",null,"Power Saver"),(0,r.Uk)(" node by two of the new nodes:")],-1),Ce=(0,r._)("p",null,[(0,r._)("img",{src:s,alt:"Migrate Power Saver"})],-1),Oe=(0,r.Uk)("See more details in the "),De=(0,r.Uk)("documentation for the "),Re=(0,r._)("code",null,"Power Saver",-1),Ye=(0,r.Uk)(" node."),Le={},je=(0,t(3744).Z)(Le,[["render",function(e,n){const t=(0,r.up)("OutboundLink"),l=(0,r.up)("CodeGroupItem"),a=(0,r.up)("CodeGroup"),s=(0,r.up)("RouterLink");return(0,r.wg)(),(0,r.iD)(r.HY,null,[o,i,d,u,c,h,p,_,b,m,f,g,v,k,y,w,U,x,T,A,S,(0,r._)("p",null,[q,P,H,(0,r._)("a",I,[M,(0,r.Wm)(t)]),N]),(0,r.Wm)(a,null,{default:(0,r.w5)((()=>[(0,r.Wm)(l,{title:"All homes"},{default:(0,r.w5)((()=>[W])),_:1}),(0,r.Wm)(l,{title:"Singel home",active:""},{default:(0,r.w5)((()=>[E])),_:1})])),_:1}),G,(0,r._)("p",null,[C,(0,r._)("a",O,[D,(0,r.Wm)(t)]),R]),Y,(0,r._)("p",null,[(0,r.Wm)(s,{to:"/examples/example-tibber-mqtt.html"},{default:(0,r.w5)((()=>[L])),_:1})]),(0,r._)("p",null,[j,(0,r._)("a",B,[Z,(0,r.Wm)(t)]),F,z,J,K,Q,V,X]),(0,r._)("p",null,[(0,r.Wm)(s,{to:"/images/example-nordpool-current-state.html"},{default:(0,r.w5)((()=>[$,ee,ne])),_:1})]),(0,r._)("p",null,[(0,r.Wm)(s,{to:"/images/example-nordpool-events-state.html"},{default:(0,r.w5)((()=>[te,re,le])),_:1})]),ae,se,oe,ie,de,ue,ce,he,pe,_e,be,me,fe,ge,ve,ke,ye,we,Ue,xe,Te,Ae,Se,(0,r._)("p",null,[qe,(0,r._)("a",Pe,[He,(0,r.Wm)(t)]),Ie,(0,r._)("a",Me,[Ne,(0,r.Wm)(t)]),We]),Ee,Ge,Ce,(0,r._)("p",null,[Oe,(0,r.Wm)(s,{to:"/nodes/power-saver.html"},{default:(0,r.w5)((()=>[De,Re])),_:1}),Ye])],64)}]])},3744:(e,n)=>{n.Z=(e,n)=>{const t=e.__vccOpts||e;for(const[e,r]of n)t[e]=r;return t}},1321:(e,n,t)=>{e.exports=t.p+"assets/img/example-flow-1.3ff3e23f.png"},3405:(e,n,t)=>{e.exports=t.p+"assets/img/example-flow-2.b653b58d.png"},1758:(e,n,t)=>{e.exports=t.p+"assets/img/migrate-best-save.f73420f6.png"}}]);
|