node-red-contrib-power-saver
Version:
A module for Node-RED that you can use to turn on and off a switch based on power prices
147 lines (146 loc) • 3.33 kB
JSON
[
{
"id": "4f11b5ae.4cc22c",
"type": "inject",
"z": "d938c47f.3398f8",
"name": "Refresh",
"props": [
{
"p": "payload"
}
],
"repeat": "3600",
"crontab": "",
"once": true,
"onceDelay": "1",
"topic": "",
"payload": "{viewer{homes{currentSubscription{priceInfo(resolution:QUARTER_HOURLY){today{totalstartsAt}tomorrow{totalstartsAt}}}}}}",
"payloadType": "str",
"x": 120,
"y": 40,
"wires": [["ab2d599a.077738"]]
},
{
"id": "ab2d599a.077738",
"type": "tibber-query",
"z": "d938c47f.3398f8",
"name": "Get Tibber prices",
"active": true,
"apiEndpointRef": "b70ec5d0.6f8f08",
"x": 310,
"y": 40,
"wires": [["0ef929fde193cf4d"]]
},
{
"id": "0ef929fde193cf4d",
"type": "ps-receive-price",
"z": "d938c47f.3398f8",
"name": "Price Receiver",
"x": 140,
"y": 100,
"wires": [["391ac08890e0dd40"]]
},
{
"id": "391ac08890e0dd40",
"type": "ps-strategy-lowest-price",
"z": "d938c47f.3398f8",
"name": "Lowest Price",
"doNotSplit": "false",
"sendCurrentValueWhenRescheduling": true,
"outputIfNoSchedule": "true",
"outputOutsidePeriod": "false",
"x": 410,
"y": 400,
"wires": [["32f17ab2.927cf6"], ["526a6e89600f0f19"], ["ed7202ff.b5725"]],
"fromHour": "00",
"fromMinute": "00",
"toHour": "00",
"toMinute": "00",
"minutesOn": "720",
"maxPrice": null,
"outputValueForOn": true,
"outputValueForOff": false,
"outputValueForOntype": "bool",
"outputValueForOfftype": "bool",
"contextStorage": "default"
},
{
"id": "32f17ab2.927cf6",
"type": "debug",
"z": "d938c47f.3398f8",
"name": "Turn up",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 700,
"y": 340,
"wires": []
},
{
"id": "526a6e89600f0f19",
"type": "debug",
"z": "d938c47f.3398f8",
"name": "Turn down",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 710,
"y": 400,
"wires": []
},
{
"id": "ed7202ff.b5725",
"type": "debug",
"z": "d938c47f.3398f8",
"name": "Lowest Price Schedule",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 750,
"y": 460,
"wires": []
},
{
"id": "82c86d92b7c9292c",
"type": "inject",
"z": "d938c47f.3398f8",
"name": "Send schedule",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "{\"commands\":{\"sendSchedule\":true}}",
"payloadType": "json",
"x": 140,
"y": 260,
"wires": [["5b6be1568744c6cf", "391ac08890e0dd40"]]
},
{
"id": "b70ec5d0.6f8f08",
"type": "tibber-api-endpoint",
"feedUrl": "wss://api.tibber.com/v1-beta/gql/subscriptions",
"queryUrl": "https://api.tibber.com/v1-beta/gql",
"name": "Tibber API"
}
]