Skip to content

Commit

Permalink
Fix x1plus OTA update
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfwithSword committed Jun 26, 2024
1 parent ad037fa commit 3569a76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions files/nodered/resources/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"bedmesh_adv_flow": "2.1.3",
"cloud_login": "2.1.5",
"dashboard_yamls": "2.1.5",
"x1plus_flow": "2.1.5.1",
"x1plus_flow": "2.1.6",
"dates" : {
"basic_flow": "2024-06-24",
"advanced_flow": "2024-06-02",
"bedmesh_basic_flow": "2024-05-15",
"bedmesh_adv_flow": "2024-05-15",
"cloud_login": "2024-06-17",
"dashboard_yamls": "2024-06-17",
"x1plus_flow": "2024-06-23"
"x1plus_flow": "2024-06-26"
}
}
12 changes: 6 additions & 6 deletions files/nodered/x1plus_flow_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"z": "fbda6ab16491b918",
"g": "258d2ebeb830080f",
"name": "Check Values Error",
"func": "flow.set(\"has_x1p_flow\", true);\nflow.set(\"x1plus_flow_version\", \"2.1.5.1\");\nfunction testValue(val) {\n return (val == undefined || val == \"\" || val.startsWith(\"{\"));\n}\n\nif (!flow.get(\"has_basic_flow\")) {\n node.error(\"X1Plus Flow cannot be used without the Basic Flow group in the same flow.\");\n return;\n}\nif (!flow.get(\"x1plus_installed\")) {\n node.error(\"X1Plus Flow requires X1Plus to be installed and set in the settings [x1plus_installed]\");\n return;\n}\nif (testValue(flow.get(\"model\"))) {\n node.error(\"Printer model is not set in flow properties\");\n}\nif (testValue(flow.get(\"printer_name\"))) {\n node.error(\"Printer name is not set in flow properties\");\n}\nif (testValue(flow.get(\"printer_serial\"))) {\n node.error(\"Printer serialnumber is not set in flow properties\");\n}\nif (testValue(flow.get(\"root_topic\"))) {\n node.warn(\"Root Topic is not set, defaulting to homeassistant\");\n flow.set(\"root_topic\", \"homeassistant\");\n}",
"func": "flow.set(\"has_x1p_flow\", true);\nflow.set(\"x1plus_flow_version\", \"2.1.6\");\nfunction testValue(val) {\n return (val == undefined || val == \"\" || val.startsWith(\"{\"));\n}\n\nif (!flow.get(\"has_basic_flow\")) {\n node.error(\"X1Plus Flow cannot be used without the Basic Flow group in the same flow.\");\n return;\n}\nif (!flow.get(\"x1plus_installed\")) {\n node.error(\"X1Plus Flow requires X1Plus to be installed and set in the settings [x1plus_installed]\");\n return;\n}\nif (testValue(flow.get(\"model\"))) {\n node.error(\"Printer model is not set in flow properties\");\n}\nif (testValue(flow.get(\"printer_name\"))) {\n node.error(\"Printer name is not set in flow properties\");\n}\nif (testValue(flow.get(\"printer_serial\"))) {\n node.error(\"Printer serialnumber is not set in flow properties\");\n}\nif (testValue(flow.get(\"root_topic\"))) {\n node.warn(\"Root Topic is not set, defaulting to homeassistant\");\n flow.set(\"root_topic\", \"homeassistant\");\n}",
"outputs": 1,
"timeout": "",
"noerr": 0,
Expand Down Expand Up @@ -270,7 +270,7 @@
"addpay": "payload",
"append": "",
"useSpawn": "false",
"timer": "20",
"timer": "60",
"sigint": true,
"x": 3350,
"y": 1180,
Expand Down Expand Up @@ -977,7 +977,7 @@
"z": "fbda6ab16491b918",
"g": "258d2ebeb830080f",
"name": "Update",
"func": "let x1plus = \"/opt/x1plus/bin/x1plus\"\nif (msg.payload == \"update_fw\") {\n msg.payload = `${x1plus} ota update`;\n}\nreturn msg;",
"func": "let x1plus = \"/opt/x1plus/bin/x1plus\"\nif (msg.payload == \"update_fw\") {\n msg.payload = `${x1plus} ota download && ${x1plus} ota update`;\n}\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
Expand Down Expand Up @@ -1116,9 +1116,9 @@
"type": "comment",
"z": "fbda6ab16491b918",
"g": "258d2ebeb830080f",
"name": "Version 2.1.5.1",
"info": "Version 2.1.5: 2024-06-17\n - Initial Release\n - Requires X1Plus v2.0+\n - Provides a toggle switch for VNC and OTA\n - Provides sensor for current X1P version and OEM version\n - Provides update OTA functionality if a new version of X1Plus is present and detected by X1P\n - Provides a button to force check for firmware OTA updates\n - Currently polls the printer when it turns on and every 5 minutes for settings, 6 hours for Fw",
"x": 2620,
"name": "Version 2.1.6",
"info": "Version 2.1.5: 2024-06-26\n - Fixed OTA update not downloading\n\n===\nVersion 2.1.5: 2024-06-17\n - Initial Release\n - Requires X1Plus v2.0+\n - Provides a toggle switch for VNC and OTA\n - Provides sensor for current X1P version and OEM version\n - Provides update OTA functionality if a new version of X1Plus is present and detected by X1P\n - Provides a button to force check for firmware OTA updates\n - Currently polls the printer when it turns on and every 5 minutes for settings, 6 hours for Fw",
"x": 2610,
"y": 1140,
"wires": []
},
Expand Down

0 comments on commit 3569a76

Please sign in to comment.