This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<p id="poll">0</p> | |
<p id="errors">0</p> | |
<script> | |
var PollCount = 0; | |
var Errors = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~line 112: | |
config = clone(_config); | |
newFlowConfig = flowUtil.parseConfig(clone(config)); | |
diff = flowUtil.diffConfigs(activeFlowConfig,newFlowConfig); | |
console.log(util.inspect(diff)); | |
// remove credentials before this becomes activeFlowConfig | |
for (var id in newFlowConfig.allNodes) { | |
if (newFlowConfig.allNodes.hasOwnProperty(id)) { | |
delete newFlowConfig.allNodes[id].credentials; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"d3a698fb.007c88","type":"inject","z":"fa9050d8.3686","name":"Start","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":130,"y":80,"wires":[["47e40795.d58228"]]},{"id":"47e40795.d58228","type":"function","z":"fa9050d8.3686","name":"LoadCV","func":"var require = global.get('require');\n// try for global install\nvar cv = null\ntry{\n cv = require.main.require('opencv');\n} catch(e){\n cv = require('opencv');\n}\nif (cv === null){\n node.warn('node-opencv not found');\n return;\n}\n\nvar cvdesc = Object.keys(cv);\nnode.send([null, {payload:cvdesc}]);\nflow.set('cv', cv);\n\nnode.send({payload:1});\nnode.send({payload:'next'});\n","outputs":"2","noerr":0,"x":260,"y":80,"wires":[["46d283a6.ce321c"],[]]},{"id":"46d283a6.ce321c","type":"function","z":"fa9050d8.3686","name":"GetImage","func":"\n\nif (msg.payload === 0){\n var vid = flow.get('cvvid');\n if (vid){\n node.warn(util.inspect(vid));\n vid.release();\n flow.set('cvvid', null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"ab622702.3ede98","type":"inject","z":"fa9050d8.3686","name":"Start","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":150,"y":80,"wires":[["c47265ed.25a238"]]},{"id":"c47265ed.25a238","type":"function","z":"fa9050d8.3686","name":"LoadCV","func":"var require = global.get('require');\nvar cv = null;\ntry{\n // global\n cv = require.main.require('opencv');\n} catch (e) {\n // local\n cv = require('opencv');\n}\nvar cvdesc = Object.keys(cv);\nnode.send([null, {payload:cvdesc}]);\nflow.set('cv', cv);\n\nnode.send({payload:1});\nnode.send({payload:'next'});\n","outputs":"2","noerr":0,"x":280,"y":80,"wires":[["63d26358.6e801c"],[]]},{"id":"63d26358.6e801c","type":"function","z":"fa9050d8.3686","name":"GetImage","func":"\n\nif (msg.payload === 0){\n var vid = flow.get('cvvid');\n if (vid){\n node.warn(util.inspect(vid));\n vid.release();\n flow.set('cvvid', null);\n delete vid;\n }\n}\n\n\nif (msg.payload === 1){\n try{\n flow.set('start', null);\n flow.set('co |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"id":"2bf57a6b.38db16","type":"inject","z":"ad55a124.f98ef","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":190,"y":60,"wires":[["84863181.1b938"]]}, | |
{"id":"84863181.1b938","type":"function","z":"ad55a124.f98ef","name":"LoadCV","func":"var require = global.get('require');\nvar cv = require.main.require('opencv');\nvar cvdesc = util.inspect(cv);\nnode.send({payload:cvdesc});\nflow.set('cv', cv);\nreturn msg;","outputs":"1","noerr":0,"x":320,"y":60,"wires":[["71fa0b4.c0bebf4"]]}, | |
{"id":"71fa0b4.c0bebf4","type":"debug","z":"ad55a124.f98ef","name":"","active":true,"console":"false","complete":"false","x":470,"y":60,"wires":[]} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"id":"775a3cab.3b2814","type":"inject","z":"cbec4f4f.7908a","name":"","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":190,"y":140,"wires":[["36315f14.c7c18"]]}, | |
{"id":"36315f14.c7c18","type":"function","z":"cbec4f4f.7908a","name":"LoadCV","func":"var require = global.get('require');\nvar cv = require('opencv');\nvar cvdesc = util.inspect(cv);\nnode.send({payload:cvdesc});\nflow.set('cv', cv);\nreturn msg;","outputs":"1","noerr":0,"x":320,"y":140,"wires":[["cbac4aa3.0b66d8"]]}, | |
{"id":"cbac4aa3.0b66d8","type":"debug","z":"cbec4f4f.7908a","name":"","active":true,"console":"false","complete":"false","x":470,"y":140,"wires":[]} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install https://github.com/peterbraden/node-opencv | |
> opencv@6.0.0 install /home/pi/.node-red/node_modules/opencv | |
> node-pre-gyp install --build-from-source | |
gyp info it worked if it ends with ok | |
gyp verb cli [ '/home/pi/.nvm/versions/node/v8.9.0/bin/node', | |
gyp verb cli '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js', | |
gyp verb cli 'clean' ] | |
gyp info using node-gyp@3.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\DataNoBackup\ocv>set OPENCV_DIR=C:\DataNoBackup\ocv3.3.1\opencv\build\x64\vc14 | |
C:\DataNoBackup\ocv>npm install peterbraden/node-opencv | |
> opencv@6.0.0 install C:\DataNoBackup\ocv\node_modules\opencv | |
> node-pre-gyp install --build-from-source | |
C:\DataNoBackup\ocv\node_modules\opencv>if not defined npm_config_node_gyp (node "C:\Users\Simon\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" clean ) else (node "" clean ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "591ff606.f43378", | |
"type": "tab", | |
"label": "Flow 6", | |
"disabled": true, | |
"info": "" | |
}, | |
{ | |
"id": "b43ed4b8.4650d8", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"id": "eba842e3.87cce", | |
"type": "inject", | |
"z": "206db361.104f6c", | |
"name": "Start", | |
"topic": "", | |
"payload": "1", | |
"payloadType": "num", | |
"repeat": "", |
OlderNewer