Question about installation procedure #26
-
SummaryOn macOS, ensure Xcode and the command line tools are consistent with the macOS release. In my case:
I discovered this project at the Node-RED Con 2022. Congratulations for porting Node-RED to MCUs and bringing low-code/no-code to MCUs! However, I am facing some issues with the installation.
To make use even easier, is there a Docker container ready to test? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 18 replies
-
Hi! |
Beta Was this translation helpful? Give feedback.
-
Here is the continuation of the out-of-the-box experience... I have applied the official fix to SyntaxError: Unexpected token '??=' on manifest.js:286 #2 , cleaner than commenting out the incriminating lines. Node-RED shows the MCU pane. The minimal example consists of a slider as input and a text as output. Code``` [ { "id": "1fe04122a999db89", "type": "ui_switch", "z": "8e87e4f4f08e5f85", "name": "", "label": "switch", "tooltip": "", "group": "154df00148cb07e8", "order": 0, "width": 0, "height": 0, "passthru": true, "decouple": "false", "topic": "topic", "topicType": "msg", "style": "", "onvalue": "true", "onvalueType": "bool", "onicon": "", "oncolor": "", "offvalue": "false", "offvalueType": "bool", "officon": "", "offcolor": "", "animate": false, "className": "", "_mcu": { "mcu": true }, "x": 410, "y": 260, "wires": [ [ "e1a767782dd7a055" ] ] }, { "id": "e1a767782dd7a055", "type": "ui_text", "z": "8e87e4f4f08e5f85", "group": "154df00148cb07e8", "order": 1, "width": 0, "height": 0, "name": "", "label": "text", "format": "{{msg.payload}}", "layout": "row-spread", "className": "", "_mcu": { "mcu": true }, "x": 610, "y": 260, "wires": [] }, { "id": "154df00148cb07e8", "type": "ui_group", "name": "Default", "tab": "7593fcf8177670fc", "order": 1, "disp": true, "width": "6", "collapse": false, "className": "", "_mcu": { "mcu": false } }, { "id": "7593fcf8177670fc", "type": "ui_tab", "name": "Home", "icon": "dashboard", "disabled": false, "hidden": false, "_mcu": { "mcu": false } } ] ```I have selected Simulation > Moddable Two and pressed Build. The console monitor displays...
...but no more. Are there other steps I am missing? |
Beta Was this translation helpful? Give feedback.
-
Well ... you hit three issues with one flow! 😁
node-red-mcu/manifest_runtime.json Lines 43 to 50 in 5d8bde9
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the clarification. I will try on Linux with a Raspberry Pi Pico W as target. |
Beta Was this translation helpful? Give feedback.
-
Trying now against the Raspberry Pi Pico W! The local machine runs on Debian + Gnome. I have the Pico SDK as explained at Getting Started with Raspberry Pi Pico | Linux setup. Selecting one and clicking on Build return this error
I have noticed all the Pico targets feature a screen. Is there an option without a screen? Is there an example I could replicate? The Node-RED minimal project used here in this example implements a basic MQTT program: received numbers are multiplied by two. [
{
"id": "99367bcd13a45c26",
"type": "mqtt in",
"z": "8e87e4f4f08e5f85",
"name": "",
"topic": "TEST/IN",
"qos": "2",
"datatype": "auto-detect",
"broker": "68a7573a3f55c15e",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"_mcu": {
"mcu": false
},
"x": 200,
"y": 120,
"wires": [
[
"13f25af16955ad16"
]
]
},
{
"id": "a9895ff8516deae2",
"type": "mqtt out",
"z": "8e87e4f4f08e5f85",
"name": "",
"topic": "TEST/OUT",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "68a7573a3f55c15e",
"_mcu": {
"mcu": false
},
"x": 690,
"y": 380,
"wires": []
},
{
"id": "13f25af16955ad16",
"type": "change",
"z": "8e87e4f4f08e5f85",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$number(payload) * 2",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"_mcu": {
"mcu": false
},
"x": 460,
"y": 260,
"wires": [
[
"a9895ff8516deae2"
]
]
},
{
"id": "68a7573a3f55c15e",
"type": "mqtt-broker",
"name": "",
"broker": "192.168.0.147",
"port": "1883",
"clientid": "",
"autoConnect": true,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": "",
"_mcu": {
"mcu": false
}
}
] |
Beta Was this translation helpful? Give feedback.
-
Thank you for your help. Now, with board
However, 8 or so |
Beta Was this translation helpful? Give feedback.
-
Maybe sharing a working container would make exploring Moddable and node-red-mcu easier. |
Beta Was this translation helpful? Give feedback.
-
I tried again to install the whole project, this time on a Mac and targeting a Raspberry Pi Pico. Alas, the installation failed as some tools still target the Intel processors and not the Apple ARM-based processor. Could you please share a container so I could explore Moddable and node-red-mcu? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Thank you for the effort. I can be frustrating when install doesn't work. Let's try to sort it out.
Would you share the install command you used and the error message it reported? FWIW – I regularly build for Raspberry Pi Pico on macOS using an M2 Mac and I know others using an M1 Mac. When I install, I follow the Pico install instructions in the Moddable SDK.
We don't usually provide containers. We could do that, but this install should work so we'd like to sort that out. Thank you for your patience! @mkellner do you have any suggestions here? |
Beta Was this translation helpful? Give feedback.
-
Thank you for your answers and links. Short versionIn a typical Apple way, some tools are no longer compatible with the updated releases of macOS, Xcode and Command Line Tools. Worse, compatible tools are not available except as release candidates. After installing Xcode 14, I had to install Xcode 14.1 RC2 and the corresponding CLT 14.1 RC2 in order to ensure compatibility with macOS 13. Long versionI know this is an early version of Node-RED for MCUs. However, I would like to stress that the whole installation process required me downloading ~24 GB and going through arcane commands, hardly consistent with a product which is supposed to be low code/no code. This is my third tentative to install Moddable and Node-RED for MCUs. Despite my interest on such a solution (see Could Node-RED generate code for MCUs? on the Node-RED forum). I have already spent too much time for installation only and I am afraid I have no more time for actually testing Moddable and Node-RED for MCUs. Maybe a container could squeeze installation time as much as possible and let the user focus instead on the benefits of Moddable and Node-RED for MCUs. As a side note, I am no longer using Apple solutions for development. Two reasons: always changing hardware and software; absence of LTS policy. I learnt it the hard way with embedXcode, a plug-in for embedded development on Xcode I developed. I am now using Linux as a tool for professional development while I am keeping Mac as a toy. |
Beta Was this translation helpful? Give feedback.
-
So now I have installed the
according to the procedure. Two problems:
...and
|
Beta Was this translation helpful? Give feedback.
-
Thanks! Now, that part installs and works correctly. Next step is to play with a minimal project a Pico. Any example to recommend? |
Beta Was this translation helpful? Give feedback.
-
Thank you @phoddie and @ralphwetzel for your answers. After running xs-dev to make sure my prior installation was fine, I managed to play with the suggested example and get the expected result. Some comments: Flows listThe MCU panes shows a long list of flows, while the current project has only one. How to clear the list? JSONataIn the flow below, the payload of the MQTT message The compiler complains against using the JSONata expression
Is JSONata supported? WiFi credentials for Raspberry Pi PicoUsing a standard function solves the issue mentioned before.
However, how to pass the WiFi credentials onto the Raspberry Pi Pico W? Edit: Question about GPIO moved to #35. To be continued... |
Beta Was this translation helpful? Give feedback.
Hi!
Thank you for testing node-red-mcu & the plugin.
You're already ready to go: The plugin installs node-red-mcu as well...
Looking forward to your feedback!
R.