Image appears in "image output" but not in "dashboard"

I send an image from python to node-red via websocket
the image appears in "image preview" in the working space which means that the connection is fine and the image was sent__ But it does not appear in the dashboard "I used dashboard media"
Any help ??

A little more information is needed.

  • which ui node are you using (ui-media??)
  • what does the msg you are sending look like? (Add a debug node - set to display the complete msg object - to the output of the node feeding the ui node and show what it displays
  • when you say it shows up in image preview, what node are you talking about
  • export and attach your flow

Thanks you for your time
I found a solution
I think my mistake was using ui-media instead of ui-template
now it is working and here is my solution in case someone needs it

  • In Python I used flasks instead of websocket, I streamed my video over a link to node-red
[
    {
        "id": "d96c237d756d0e10",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "dfcc9a31.860948",
        "type": "inject",
        "z": "d96c237d756d0e10",
        "name": "Start stream",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 399.8333435058594,
        "y": 340.00003814697266,
        "wires": [
            [
                "db5630e7.83cdc"
            ]
        ]
    },
    {
        "id": "6535feb.cbf33",
        "type": "base64",
        "z": "d96c237d756d0e10",
        "name": "Encode",
        "action": "",
        "property": "payload",
        "x": 790,
        "y": 340,
        "wires": [
            [
                "fb64a032.e945b"
            ]
        ]
    },
    {
        "id": "fb64a032.e945b",
        "type": "ui_template",
        "z": "d96c237d756d0e10",
        "group": "cc59dc7f5961ced9",
        "name": "Display image",
        "order": 1,
        "width": "6",
        "height": "6",
        "format": "<img width=\"16\" height=\"16\" alt=\"stream test\" src=\"data:image/jpg;base64,{{msg.payload}}\" />\n",
        "storeOutMessages": true,
        "fwdInMessages": true,
        "resendOnRefresh": false,
        "templateScope": "local",
        "className": "",
        "x": 967.2569236755371,
        "y": 340.4166660308838,
        "wires": [
            []
        ]
    },
    {
        "id": "db5630e7.83cdc",
        "type": "multipart-decoder",
        "z": "d96c237d756d0e10",
        "name": "",
        "ret": "bin",
        "url": "http://192.168.1.4:5000/video_feed",
        "tls": "",
        "delay": 0,
        "maximum": "10000000",
        "blockSize": "1",
        "x": 600,
        "y": 340,
        "wires": [
            [
                "6535feb.cbf33"
            ]
        ]
    },
    {
        "id": "3f3d533ce30e099b",
        "type": "ui_button",
        "z": "d96c237d756d0e10",
        "name": "",
        "group": "cc59dc7f5961ced9",
        "order": 9,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Start Stream",
        "tooltip": "",
        "color": "",
        "bgcolor": "red",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "date",
        "topic": "topic",
        "topicType": "msg",
        "x": 410,
        "y": 280,
        "wires": [
            [
                "db5630e7.83cdc"
            ]
        ]
    },
    {
        "id": "cc59dc7f5961ced9",
        "type": "ui_group",
        "name": "Default",
        "tab": "6b5776c92264d7c2",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "6b5776c92264d7c2",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.