Advertisement
NittyGritty

Untitled

May 8th, 2025
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [
  2.     {
  3.         "id": "6d449e2c78b1b570",
  4.         "type": "html",
  5.         "z": "2270875cb0f163ee",
  6.         "name": "",
  7.         "property": "payload",
  8.         "outproperty": "payload",
  9.         "tag": "p",
  10.         "ret": "text",
  11.         "as": "single",
  12.         "chr": "",
  13.         "x": 210,
  14.         "y": 240,
  15.         "wires": [
  16.             [
  17.                 "edbd67e7eac94376",
  18.                 "0f3879d60db30ebe"
  19.             ]
  20.         ]
  21.     },
  22.     {
  23.         "id": "08ce85573b2cee3c",
  24.         "type": "debug",
  25.         "z": "2270875cb0f163ee",
  26.         "name": "debug 41",
  27.         "active": false,
  28.         "tosidebar": true,
  29.         "console": false,
  30.         "tostatus": false,
  31.         "complete": "false",
  32.         "statusVal": "",
  33.         "statusType": "auto",
  34.         "x": 590,
  35.         "y": 140,
  36.         "wires": []
  37.     },
  38.     {
  39.         "id": "a2350cf2e1581fda",
  40.         "type": "www-request",
  41.         "z": "2270875cb0f163ee",
  42.         "name": "",
  43.         "method": "use",
  44.         "ret": "txt",
  45.         "url": "",
  46.         "follow-redirects": true,
  47.         "persistent-http": true,
  48.         "tls": "",
  49.         "x": 370,
  50.         "y": 140,
  51.         "wires": [
  52.             [
  53.                 "08ce85573b2cee3c",
  54.                 "6d449e2c78b1b570"
  55.             ]
  56.         ]
  57.     },
  58.     {
  59.         "id": "edbd67e7eac94376",
  60.         "type": "debug",
  61.         "z": "2270875cb0f163ee",
  62.         "name": "debug 48",
  63.         "active": false,
  64.         "tosidebar": true,
  65.         "console": false,
  66.         "tostatus": false,
  67.         "complete": "false",
  68.         "statusVal": "",
  69.         "statusType": "auto",
  70.         "x": 370,
  71.         "y": 280,
  72.         "wires": []
  73.     },
  74.     {
  75.         "id": "0f3879d60db30ebe",
  76.         "type": "function",
  77.         "z": "2270875cb0f163ee",
  78.         "name": "function 46",
  79.         "func": "var EuroPos=0;\n\nvar count=0;\n\n// find Pragraph containing Euro Price\n\nfor (var i = 0; i < 30; i++) {\n    if (msg.payload[i].includes(\"Bundesdurchschnitt\")) {\n        break;\n        }\n    else\n     { count++;}\n}\n\nEuroPos = count;\n\nvar words = msg.payload[EuroPos].split('Bundesdurchschnitt ');\nvar words1 = words[1].split(' ');\nvar Preis_lose = (words1[0]);\n\nwords = msg.payload[EuroPos].split('derzeit ');\nwords1 = words[1].split(' ');\nvar Preis_Sack = (words1[0]);\n\nvar Influx = [{\n    Room: \"Pelletpreis\",\n    Lose: Preis_lose,\n    Sack: Preis_Sack\n}]\n\nnode.status({\n    fill: \"green\",\n    shape: \"ring\",\n    text:   \"Preis (lose): \" + Preis_lose + \" Euro, \" +\n            \"Preis (Sackware): \" + Preis_Sack + \" Euro\"\n});\n\n// New date using date Constructor\nlet d = new Date();\n// Convert to string\nlet dateString = d.toISOString();\nlet date = dateString.slice(0,10);\nvar SQL= \"INSERT INTO prix_moyen (dateB, prix) VALUES('\" + date + \"', \" + parseInt(Preis_lose) + \");\"\n\nvar NewMsg = \"\";\nNewMsg = {payload: \"empty\"};\nNewMsg.topic = {topic: SQL}; \n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"Date: \" + dateString });\n// return [{payload: Influx}, NewMsg];\nreturn [{payload: Influx},{\"topic\": SQL, \"payload\": \"Please wait, updating views...\"}];",
  80.         "outputs": 2,
  81.         "timeout": 0,
  82.         "noerr": 0,
  83.         "initialize": "",
  84.         "finalize": "",
  85.         "libs": [],
  86.         "x": 370,
  87.         "y": 240,
  88.         "wires": [
  89.             [
  90.                 "43d56ff46af639f2"
  91.             ],
  92.             [
  93.                 "727f1720340068c7",
  94.                 "0a6a3ac445710741"
  95.             ]
  96.         ],
  97.         "outputLabels": [
  98.             "Influx",
  99.             ""
  100.         ]
  101.     },
  102.     {
  103.         "id": "0a6a3ac445710741",
  104.         "type": "mysql",
  105.         "z": "2270875cb0f163ee",
  106.         "mydb": "516bb65d8291d321",
  107.         "name": "Hargassner",
  108.         "x": 590,
  109.         "y": 300,
  110.         "wires": [
  111.             [
  112.                 "47a660065ed43f82"
  113.             ]
  114.         ]
  115.     },
  116.     {
  117.         "id": "43d56ff46af639f2",
  118.         "type": "debug",
  119.         "z": "2270875cb0f163ee",
  120.         "name": "debug 92",
  121.         "active": true,
  122.         "tosidebar": true,
  123.         "console": false,
  124.         "tostatus": false,
  125.         "complete": "true",
  126.         "targetType": "full",
  127.         "statusVal": "",
  128.         "statusType": "auto",
  129.         "x": 590,
  130.         "y": 180,
  131.         "wires": []
  132.     },
  133.     {
  134.         "id": "727f1720340068c7",
  135.         "type": "debug",
  136.         "z": "2270875cb0f163ee",
  137.         "name": "debug 93",
  138.         "active": true,
  139.         "tosidebar": true,
  140.         "console": false,
  141.         "tostatus": false,
  142.         "complete": "true",
  143.         "targetType": "full",
  144.         "statusVal": "",
  145.         "statusType": "auto",
  146.         "x": 590,
  147.         "y": 220,
  148.         "wires": []
  149.     },
  150.     {
  151.         "id": "47a660065ed43f82",
  152.         "type": "debug",
  153.         "z": "2270875cb0f163ee",
  154.         "name": "debug 94",
  155.         "active": true,
  156.         "tosidebar": true,
  157.         "console": false,
  158.         "tostatus": false,
  159.         "complete": "false",
  160.         "statusVal": "",
  161.         "statusType": "auto",
  162.         "x": 590,
  163.         "y": 260,
  164.         "wires": []
  165.     },
  166.     {
  167.         "id": "ded38fff66ce0402",
  168.         "type": "cronplus",
  169.         "z": "2270875cb0f163ee",
  170.         "name": "daily at 4:00",
  171.         "outputField": "payload",
  172.         "timeZone": "",
  173.         "storeName": "",
  174.         "commandResponseMsgOutput": "output1",
  175.         "defaultLocation": "",
  176.         "defaultLocationType": "default",
  177.         "outputs": 1,
  178.         "options": [
  179.             {
  180.                 "name": "Midnight",
  181.                 "topic": "Midnight",
  182.                 "payloadType": "default",
  183.                 "payload": "",
  184.                 "expressionType": "cron",
  185.                 "expression": "0 0 4 * * *",
  186.                 "location": "",
  187.                 "offset": "0",
  188.                 "solarType": "all",
  189.                 "solarEvents": "sunrise,sunset"
  190.             }
  191.         ],
  192.         "x": 130,
  193.         "y": 40,
  194.         "wires": [
  195.             [
  196.                 "05c00401a21aa774"
  197.             ]
  198.         ]
  199.     },
  200.     {
  201.         "id": "05c00401a21aa774",
  202.         "type": "change",
  203.         "z": "2270875cb0f163ee",
  204.         "name": "",
  205.         "rules": [
  206.             {
  207.                 "t": "set",
  208.                 "p": "url",
  209.                 "pt": "msg",
  210.                 "to": "https://www.holzpellets.net/pelletspreise/",
  211.                 "tot": "str"
  212.             },
  213.             {
  214.                 "t": "set",
  215.                 "p": "method",
  216.                 "pt": "msg",
  217.                 "to": "GET",
  218.                 "tot": "str"
  219.             }
  220.         ],
  221.         "action": "",
  222.         "property": "",
  223.         "from": "",
  224.         "to": "",
  225.         "reg": false,
  226.         "x": 380,
  227.         "y": 40,
  228.         "wires": [
  229.             [
  230.                 "a2350cf2e1581fda"
  231.             ]
  232.         ]
  233.     },
  234.     {
  235.         "id": "007396b31aeac6ed",
  236.         "type": "inject",
  237.         "z": "2270875cb0f163ee",
  238.         "name": "",
  239.         "props": [
  240.             {
  241.                 "p": "payload"
  242.             },
  243.             {
  244.                 "p": "topic",
  245.                 "vt": "str"
  246.             }
  247.         ],
  248.         "repeat": "",
  249.         "crontab": "",
  250.         "once": false,
  251.         "onceDelay": 0.1,
  252.         "topic": "",
  253.         "payload": "",
  254.         "payloadType": "date",
  255.         "x": 180,
  256.         "y": 100,
  257.         "wires": [
  258.             [
  259.                 "05c00401a21aa774"
  260.             ]
  261.         ]
  262.     },
  263.     {
  264.         "id": "516bb65d8291d321",
  265.         "type": "MySQLdatabase",
  266.         "name": "SQL-Hargassner",
  267.         "host": "192.168.126.14",
  268.         "port": "3306",
  269.         "db": "hargassner",
  270.         "tz": "",
  271.         "charset": "UTF8"
  272.     }
  273. ]
Tags: Hargassner
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement