Skip to content

Instantly share code, notes, and snippets.

@RamblinLane
Created April 26, 2018 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RamblinLane/f8e97b37fdf51b1093032451f048a40e to your computer and use it in GitHub Desktop.
Save RamblinLane/f8e97b37fdf51b1093032451f048a40e to your computer and use it in GitHub Desktop.
Simple Webcam pic

From your Laptop Camera or Webcam, capture a picture and display in the dashboard

Needs the following Nodes to be added to the Palette

• node-red-contrib-browser-utils • node-red-dashboard • node-red-node-base64

[
{
"id": "e43a7ed1.97b08",
"type": "tab",
"label": "Simple Webcam",
"disabled": false,
"info": ""
},
{
"id": "f25e3092.364ac",
"type": "camera",
"z": "e43a7ed1.97b08",
"name": "",
"x": 280,
"y": 280,
"wires": [
[
"619a99c4.faafa8"
]
]
},
{
"id": "18edd75b.945009",
"type": "ui_template",
"z": "e43a7ed1.97b08",
"group": "7c71c7b8.2c9fe8",
"name": "Pic",
"order": 0,
"width": "6",
"height": "6",
"format": "<div>\n <img src=\"data:image/png;base64,{{msg.payload}}\">\n</div>",
"storeOutMessages": true,
"fwdInMessages": true,
"templateScope": "local",
"x": 770,
"y": 440,
"wires": [
[]
]
},
{
"id": "619a99c4.faafa8",
"type": "base64",
"z": "e43a7ed1.97b08",
"name": "",
"action": "",
"property": "payload",
"x": 520,
"y": 340,
"wires": [
[
"18edd75b.945009"
]
]
},
{
"id": "7c71c7b8.2c9fe8",
"type": "ui_group",
"z": "",
"name": "Default",
"tab": "fbf5c038.d632b",
"disp": true,
"width": "6",
"collapse": false
},
{
"id": "fbf5c038.d632b",
"type": "ui_tab",
"z": "",
"name": "Home",
"icon": "dashboard"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment