Mal zum Feierabend einen kleine Bitcoin Flow mit NodeRed implementiert. …
Es gehen natürlich auch andere Cryptowährungen und Kurse.
Hier der Flow, mal mit stündlicher aktualisierung und manuellen Button:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
[ { "id": "9928af8e.21852", "type": "tab", "label": "Crypto", "disabled": false, "info": "" }, { "id": "221f19a8.5d274e", "type": "group", "z": "9928af8e.21852", "name": "Gui", "style": { "fill": "#e3f3d3", "label": true }, "nodes": [ "f924800e.a804d", "a1b5f872.d82d08" ], "x": 54, "y": 179, "w": 752, "h": 82 }, { "id": "52207b33.a91e4c", "type": "inject", "z": "9928af8e.21852", "name": "Abfrage jede Stunde", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "3600", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 140, "y": 100, "wires": [ [ "8da0f528.8ccba" ] ] }, { "id": "8da0f528.8ccba", "type": "http request", "z": "9928af8e.21852", "name": "Bitcoin", "method": "GET", "ret": "obj", "paytoqs": "ignore", "url": "https://api.kraken.com/0/public/Ticker?pair=BTCEUR", "tls": "", "persist": false, "proxy": "", "authType": "", "x": 340, "y": 100, "wires": [ [ "7f18c8a3.656d88" ] ] }, { "id": "a3dd082a.1f3db", "type": "debug", "z": "9928af8e.21852", "name": "Konsole", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 740, "y": 100, "wires": [] }, { "id": "e08970e0.148918", "type": "comment", "z": "9928af8e.21852", "name": "Info zu JSON ", "info": "JSON:\n // Last ask price\n ask: ticker.a[0],\n // Last bid price\n bid: ticker.b[0],\n // Last trade closed\n lastTrade: ticker.c[0],\n // Volume traded in the last 24 houurs\n volume: ticker.v[1],\n // 24 hour low\n low: ticker.l[1],\n // 24 hour high\n high: ticker.h[1],\n // Open price\n open: ticker.o", "x": 730, "y": 340, "wires": [] }, { "id": "7f18c8a3.656d88", "type": "function", "z": "9928af8e.21852", "name": "JSON to BTC in Euro", "func": "msg.payload = msg.payload.result.XXBTZEUR.a[0]\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "x": 540, "y": 100, "wires": [ [ "a3dd082a.1f3db", "a1b5f872.d82d08" ] ] }, { "id": "551c03f4.c0a534", "type": "comment", "z": "9928af8e.21852", "name": "(c) 2021 Thomas Wenzlaff www.wenzlaff.info", "info": "", "x": 630, "y": 40, "wires": [] }, { "id": "8066fd6d.b3d0c8", "type": "comment", "z": "9928af8e.21852", "name": "Bitcoin Kurs Ticker", "info": "", "x": 120, "y": 40, "wires": [] }, { "id": "a1b5f872.d82d08", "type": "ui_gauge", "z": "9928af8e.21852", "g": "221f19a8.5d274e", "name": "Anzeige", "group": "62ad21f6.478228", "order": 0, "width": 0, "height": 0, "gtype": "gage", "title": "Bitcoin Kurs in Euro", "label": "Euro", "format": "{{value}}", "min": 0, "max": "100000", "colors": [ "#00b500", "#e6e600", "#ca3838" ], "seg1": "", "seg2": "", "x": 720, "y": 220, "wires": [] }, { "id": "f924800e.a804d", "type": "ui_button", "z": "9928af8e.21852", "g": "221f19a8.5d274e", "name": "", "group": "62ad21f6.478228", "order": 3, "width": 0, "height": 0, "passthru": false, "label": "Update", "tooltip": "", "color": "", "bgcolor": "", "icon": "", "payload": "", "payloadType": "str", "topic": "", "x": 140, "y": 220, "wires": [ [ "8da0f528.8ccba" ] ] }, { "id": "62ad21f6.478228", "type": "ui_group", "name": "Cryptowährung", "tab": "9ed4e3c0.ac177", "order": 1, "disp": true, "width": "6", "collapse": false }, { "id": "9ed4e3c0.ac177", "type": "ui_tab", "name": "Crypto", "icon": "dashboard", "disabled": false, "hidden": false } ] |