node-red-mcu-plugin: ui_node support #27
Replies: 2 comments 10 replies
-
@ralphwetzel – yes, we should get UI nodes supported. What is currently committed works (very) nicely. However, it is set-up primarily for our exploration so it isn't so easy to use yet. That said, the The bigger challenge is building an optimized manifest. But that's another discussion. |
Beta Was this translation helpful? Give feedback.
-
@phoddie -- For reference, find below manifest.json & flow.json I'm currently testing with. manifest.json{
"build": {
"MODULES": "/Users/ralph/Projekte/Moddable/moddable/modules",
"MCUROOT": "/Users/ralph/Projekte/node-red-mcu-plugin/node-red-mcu",
"REDNODES": "/Users/ralph/Projekte/node-red/packages/node_modules/@node-red/nodes"
},
"include": [
"$(MCUROOT)/manifest_runtime.json",
"$(MCUROOT)/nodes/ui/manifest.json",
"$(MCUROOT)/nodes/random/manifest.json",
"$(MCUROOT)/nodes/trigger/manifest.json"
],
"modules": {
"*": [
"./main",
{
"source": "./flows",
"transform": "nodered2mcu"
}
],
"~": []
},
"creation": {
"static": 0,
"keys": {
"available": 512
},
"stack": 512
},
"config": {
"noderedmcu": {
"editor": true
}
}
} flows.json[
{
"id": "e76ac5d10d5129d8",
"type": "tab",
"label": "Flow 15",
"disabled": false,
"info": "",
"env": []
},
{
"id": "f414995783d9c912",
"type": "ui_button",
"z": "e76ac5d10d5129d8",
"name": "",
"group": "82ae5262e98d7428",
"order": 3,
"width": "3",
"height": "1",
"passthru": false,
"label": "false",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "false",
"payloadType": "bool",
"topic": "topic",
"topicType": "msg",
"x": 290,
"y": 200,
"wires": [
[
"7455f78f7552838b"
]
]
},
{
"id": "7455f78f7552838b",
"type": "ui_switch",
"z": "e76ac5d10d5129d8",
"name": "",
"label": "switch",
"tooltip": "",
"group": "82ae5262e98d7428",
"order": 2,
"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": "",
"x": 470,
"y": 220,
"wires": [
[
"5b55d5ae28e44faa"
]
]
},
{
"id": "5b55d5ae28e44faa",
"type": "ui_text",
"z": "e76ac5d10d5129d8",
"group": "82ae5262e98d7428",
"order": 1,
"width": 0,
"height": 0,
"name": "",
"label": "value",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 670,
"y": 220,
"wires": []
},
{
"id": "2189c57287ebd9a8",
"type": "ui_button",
"z": "e76ac5d10d5129d8",
"name": "",
"group": "82ae5262e98d7428",
"order": 4,
"width": "3",
"height": "1",
"passthru": false,
"label": "true",
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "",
"payload": "true",
"payloadType": "bool",
"topic": "topic",
"topicType": "msg",
"x": 290,
"y": 240,
"wires": [
[
"7455f78f7552838b"
]
]
},
{
"id": "954946ab8c989af5",
"type": "ui_tab",
"name": "Controls",
"icon": "dashboard",
"order": 3,
"disabled": false,
"hidden": false
},
{
"id": "82ae5262e98d7428",
"type": "ui_group",
"name": "Boolean",
"tab": "954946ab8c989af5",
"order": 2,
"disp": true,
"width": "6",
"collapse": true,
"className": ""
},
{
"id": "81730d2f14c63675",
"type": "ui_base",
"theme": {
"name": "theme-dark",
"lightTheme": {
"default": "#0094CE",
"baseColor": "#0094CE",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"darkTheme": {
"default": "#097479",
"baseColor": "#097479",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif",
"edited": true,
"reset": false
},
"customTheme": {
"name": "Untitled Theme 1",
"default": "#4B7930",
"baseColor": "#4B7930",
"baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
},
"themeState": {
"base-color": {
"default": "#097479",
"value": "#097479",
"edited": false
},
"page-titlebar-backgroundColor": {
"value": "#097479",
"edited": false
},
"page-backgroundColor": {
"value": "#111111",
"edited": false
},
"page-sidebar-backgroundColor": {
"value": "#333333",
"edited": false
},
"group-textColor": {
"value": "#0eb8c0",
"edited": false
},
"group-borderColor": {
"value": "#555555",
"edited": false
},
"group-backgroundColor": {
"value": "#333333",
"edited": false
},
"widget-textColor": {
"value": "#eeeeee",
"edited": false
},
"widget-backgroundColor": {
"value": "#097479",
"edited": false
},
"widget-borderColor": {
"value": "#333333",
"edited": false
},
"base-font": {
"value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"
}
},
"angularTheme": {
"primary": "indigo",
"accents": "blue",
"warn": "red",
"background": "grey",
"palette": "dark"
}
},
"site": {
"name": "Node-RED Dashboard",
"hideToolbar": "false",
"allowSwipe": "false",
"lockMenu": "false",
"allowTempTheme": "none",
"dateFormat": "DD.MM.YYYY",
"sizes": {
"sx": 48,
"sy": 48,
"gx": 6,
"gy": 6,
"cx": 6,
"cy": 6,
"px": 0,
"py": 0
}
}
}
] |
Beta Was this translation helpful? Give feedback.
-
@phoddie -- Hello Peter!
Due to the success of your presentation @ Node-RED Con 22 (👍 👍) I feel it's mandatory now that the plugin supports as well
ui_nodes
. Based on what I've seen in uitest there seem to be additional steps necessary to initialize a graphical app on a MCU:node-red-mcu/uitest/main.js
Lines 1 to 9 in 5d8bde9
Can I take this as a standard template - or do I need to provide a way to customize the setup?
Shall the options provided to
REDApplication
(e.g.commandListLength
) be configurable? Is there any documentation concerning these parameters?Is there anything relevant - from your perspective - to be considered additionally?
Beta Was this translation helpful? Give feedback.
All reactions