This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Node Red standalone
#1
Hi,
On my small boat I'm using an old version of openplotter (0.17 alpha) on a Raspberry PI3. I know, is an old & alpha version, but works very well for my needs. I plan to upgrade to OPv2 when there wiil be an AIS support for SDR.

My OP version includes the Signalk server and Node-Red standalone, with some specific-nodes to use Signalk data in it.

Now I wish to set up a testing environment at home, to develop some new Node-Red flows before installing on boat. So, I have set up a new Linux Mint machine (tricia), with the last version of SignalK server (v1.26) and Node-Red standalone (v1.0.4).

The problem is that I cannot find the signalk nodes for Node-Red standalone. Can anyone help me?

Thanks for all
Reply
#2
unfortunately they only work with the embedded version.
mare liberum
Reply
#3
(2020-04-05, 10:17 AM)jim321 Wrote: unfortunately they only work with the embedded version.

yes... but in the old OP version are working on al standalone version. There is a place where I can find these nodes?
another way possible is to copy those are installed on the OP installation in by boat. Can be done? ...how?
Reply
#4
https://github.com/SignalK/node-red-embe...d-embedded
i never got them on any version with the standalone
mare liberum
Reply
#5
OK, thanks for the quick reply.
If I will find something other I will post
Reply
#6
Code:
[{"id":"2ac8d65b.65dada","type":"websocket in","z":"231102c7.ca0e2e","name":"SignalK input","server":"5f4851b8.4ffba","client":"","x":110,"y":300,"wires":[["a4615651.30e1c8"]]},{"id":"a4615651.30e1c8","type":"json","z":"231102c7.ca0e2e","name":"","property":"payload","action":"","pretty":false,"x":250,"y":300,"wires":[["19ed6fcb.2e422","e72fdb77.725bc8","52c90c91.29f5b4"]]},{"id":"52c90c91.29f5b4","type":"change","z":"231102c7.ca0e2e","name":"Filter exhaust temp","rules":[{"t":"set","p":"payload","pt":"msg","to":"msg.payload.updates.values[path=\"propulsion.exh.temperature\"].value","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":300,"wires":[["43dbe5da.509a3c"]]},{"id":"5f4851b8.4ffba","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"}]
 this is how we did it before the embedded ver. we took the data from the Websocket stream

here is a bunch of test flows i did see if there is anything you can use.
Code:
[{"id":"36380e2.d71d3f2","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"caa87018.b8f9","type":"inject","z":"36380e2.d71d3f2","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":true,"onceDelay":"","x":129,"y":56,"wires":[["8a4d2a10.0b1ed8"]]},{"id":"8a4d2a10.0b1ed8","type":"exec","z":"36380e2.d71d3f2","command":"vcgencmd","addpay":false,"append":"measure_temp","useSpawn":"","timer":"","oldrc":false,"name":"getCPUtemp","x":289,"y":56,"wires":[["2890be6.865a342"],[],[]]},{"id":"7a002876.50a438","type":"debug","z":"36380e2.d71d3f2","name":"","active":false,"console":"false","complete":"payload","x":449,"y":176,"wires":[]},{"id":"2890be6.865a342","type":"function","z":"36380e2.d71d3f2","name":"msg.payload","func":"cpu_temp = parseFloat(msg.payload.replace(\"temp=\",\"\").replace(\"'C\\n\",\"\"));\ncpu_temp = cpu_temp + 273.15\nmsg.payload = '{\\\"updates\\\": [{\\\"source\\\": {\\\"type\\\": \\\"ARMTEMP\\\",\\\"src\\\" : \\\"RPIMCU\\\"},\\\"values\\\":[{\\\"path\\\": \\\"environment.inside.heating.temperature\\\",\\\"value\\\":'+cpu_temp+'}]}]}\\n';\nreturn msg;","outputs":1,"noerr":0,"x":449,"y":56,"wires":[["6b97a826.d1d838"]]},{"id":"6b97a826.d1d838","type":"udp out","z":"36380e2.d71d3f2","name":"sendSK","addr":"localhost","iface":"","port":"55559","ipv":"udp4","outport":"","base64":false,"multicast":"false","x":599,"y":56,"wires":[]},{"id":"a9d57181.edf83","type":"websocket in","z":"36380e2.d71d3f2","name":"ws","server":"5491f69b.2d1778","client":"","x":89,"y":356,"wires":[["d98e249.32fadd8","b07f93f2.43378","c6815ac6.3b7298","e4dacb99.7e6e88","e705e7f8.c89488","7a002876.50a438"]]},{"id":"8e806c99.f727f","type":"function","z":"36380e2.d71d3f2","name":"merge values","func":"var paths={};\nvar arrayLength = msg.payload.length;\nfor (var i = 0; i < arrayLength; i++) {\n    paths[msg.payload[i].path]=msg.payload[i].value;\n}\nmsg.payload = paths;\nreturn msg;","outputs":1,"noerr":0,"x":459,"y":356,"wires":[["f1b415ad.d08258","42aeb035.271df","3c386020.c995d","6e94210a.ba826","e2bc395b.a85b38","6048311f.127a6","653b3e12.17138","1fb0019d.18cb1e","220ea0b0.b5334","ea8349dc.cc8108","4845e4a2.60635c","4567bffa.2e55f","5e6f402b.e8e4f"]]},{"id":"f1b415ad.d08258","type":"function","z":"36380e2.d71d3f2","name":"navigation.speedOverGround","func":"var signalk_key=\"navigation.speedOverGround\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n}","outputs":1,"noerr":0,"x":689,"y":296,"wires":[["a92e6fac.8b24"]]},{"id":"a92e6fac.8b24","type":"function","z":"36380e2.d71d3f2","name":"m/s to knots","func":"msg.payload = Number(msg.payload)*1.94384\nreturn msg;","outputs":1,"noerr":0,"x":919,"y":296,"wires":[["4e043d25.ff2f34"]]},{"id":"42aeb035.271df","type":"function","z":"36380e2.d71d3f2","name":"navigation.position.latitude","func":"var signalk_key=\"navigation.position\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key][\"latitude\"];\n    return msg;\n}","outputs":1,"noerr":0,"x":188.00003814699994,"y":436.0000114441,"wires":[["26ec94e9.5b0c9c"]]},{"id":"6e94210a.ba826","type":"function","z":"36380e2.d71d3f2","name":"navigation.position.longitude","func":"var signalk_key=\"navigation.position\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key][\"longitude\"];\n    return msg;\n}","outputs":1,"noerr":0,"x":188.00003814699994,"y":476.0000114441,"wires":[["281f9a66.6ea7f6"]]},{"id":"3c386020.c995d","type":"function","z":"36380e2.d71d3f2","name":"navigation.courseOverGroundTrue","func":"var signalk_key=\"navigation.courseOverGroundTrue\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n}","outputs":1,"noerr":0,"x":709,"y":336,"wires":[["2fc59a43.3d61d6"]]},{"id":"26ec94e9.5b0c9c","type":"mqtt out","z":"36380e2.d71d3f2","name":"lat","topic":"lat","qos":"0","retain":"","broker":"6f02c0a4.b27a2","x":388.00003814699994,"y":436.0000114441,"wires":[]},{"id":"281f9a66.6ea7f6","type":"mqtt out","z":"36380e2.d71d3f2","name":"","topic":"lon","qos":"0","retain":"","broker":"6f02c0a4.b27a2","x":388.00003814699994,"y":476.0000114441,"wires":[]},{"id":"2fc59a43.3d61d6","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":929,"y":336,"wires":[[]]},{"id":"5b03b0ba.58634","type":"function","z":"36380e2.d71d3f2","name":"math","func":"\nvar vout = 0.0;\nvar vin = 0.0;\nvar R1 = 30000.0;\nvar R2 = 7500.0; \nvar value= msg.payload;\n\n\n vout = (value * 5.0) / 1024.0; \n vin = vout / (R2/(R1+R2)); \n \n//vin.toFixed(1);\n\nmsg.payload=vin;\n\nreturn msg;","outputs":1,"noerr":0,"x":831.0000858306998,"y":468.0000209808,"wires":[["98aba5d9.42bef8"]]},{"id":"98aba5d9.42bef8","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":951.0000858306998,"y":468.0000209808,"wires":[["dcd1eb5.23eb518"]]},{"id":"afb6e2d8.8d75b","type":"mqtt in","z":"36380e2.d71d3f2","name":"","topic":"/ESP03/watertemp/Temperature","qos":"0","broker":"6f02c0a4.b27a2","x":149,"y":916,"wires":[["cdf3197f.cb8ee8","b92de8b6.a6db68"]]},{"id":"723dca8a.ceee84","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":513.0003166198999,"y":913.0001249313,"wires":[[]]},{"id":"68d11d6b.4be6a4","type":"switch","z":"36380e2.d71d3f2","name":"Is it nav data?","property":"msg.payload.updates.source.sentence","propertyType":"jsonata","rules":[{"vt":"str","t":"cont","v":"GLL"}],"checkall":"false","repair":false,"outputs":1,"x":399,"y":296,"wires":[["f88297c4.e417f8"]]},{"id":"f88297c4.e417f8","type":"change","z":"36380e2.d71d3f2","name":"create msg.lat etc","rules":[{"p":"LAT","pt":"msg","t":"set","tot":"jsonata","to":"payload.updates.values.value.latitude"},{"p":"LONG","pt":"msg","t":"set","tot":"jsonata","to":"payload.updates.values.value.longitude"}],"action":"","property":"","from":"","to":"","reg":false,"x":659,"y":256,"wires":[["d13a2883.029a48"]]},{"id":"d13a2883.029a48","type":"function","z":"36380e2.d71d3f2","name":"Make JSON","func":"var mymsg = {\"name\":\"MyPlace\",\"lat\":msg.LAT,\"lon\":msg.LONG, icon:\"ship\",\niconColor:\"red\"};\n\nmsg.payload=mymsg;\nreturn msg;","outputs":1,"noerr":0,"x":849,"y":256,"wires":[["f134cc01.96ac1"]]},{"id":"d98e249.32fadd8","type":"json","z":"36380e2.d71d3f2","name":"","property":"payload","action":"","pretty":true,"x":209,"y":296,"wires":[["68d11d6b.4be6a4"]]},{"id":"4e043d25.ff2f34","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":1069.0000648499,"y":296.0000066757,"wires":[[]]},{"id":"fa104573.1f6738","type":"function","z":"36380e2.d71d3f2","name":"heel","func":"msg.value=msg.payload;\n\nreturn msg;","outputs":"1","noerr":0,"x":1045.0000858307,"y":428.0000209808,"wires":[[]]},{"id":"b569d003.467af","type":"ui_template","z":"36380e2.d71d3f2","group":"3fec2209.be279e","name":"Tempwater","order":4,"width":"3","height":"6","format":"<script src=\"/myjs/tween-min.js\"></script>\n<script src=\"/myjs/steelseries-min.js\"></script>\n<script>\nvar tempwater;\n    (function(scope){ \n        scope.$watch('msg', function(msg) {\n           if (typeof(msg.value) != \"undefined\") tempwater.setValueAnimated(msg.value);\n           //if (typeof(msg.threshold) != \"undefined\") radial4.setThreshold(msg.threshold);\n          // if (typeof(msg.odo) != \"undefined\")radial4.setOdoValue(msg.odo);  \n           //if (typeof(msg.userLed) != \"undefined\") radial4.setUserLedOnOff(msg.userLed);  \n          // if (typeof(msg.trend) != \"undefined\")\n            {\n               // if (msg.trend==1)     radial4.setTrend(steelseries.TrendState.UP);\n                //if (msg.trend==0)     radial4.setTrend(steelseries.TrendState.STEADY);\n               // if (msg.trend==-1)    radial4.setTrend(steelseries.TrendState.DOWN);\n               // if (msg.trend==-2)    radial4.setTrend(steelseries.TrendState.OFF);\n            }\n        });\n    })(scope);\n\n    var sections = [steelseries.Section(0, 25, 'rgba(0, 0, 220, 0.3)'),\n                        steelseries.Section(25, 50, 'rgba(0, 220, 0, 0.3)'),\n                        steelseries.Section(50, 75, 'rgba(220, 220, 0, 0.3)') ],\n\n            // Define one area\n    areas = [steelseries.Section(75, 100, 'rgba(220, 0, 0, 0.3)')],\n\n    tempwater = new steelseries.Linear('tempwater', {\n            gaugeType: steelseries.GaugeType.TYPE2,\n            width: 140,\n            height: 300,\n            //size: 292,\n            section: sections,\n            area: areas,\n            titleString: \"Water\",\n            unitString: \"Degrees F\",\n            threshold: 80,\n            lcdVisible: true,\n           \n            //thresholdRising: false,\n           // userLedVisible: true,\n           // useOdometer: true,\n          //  lcdVisible: true,\n           // trendVisible: true\n        });\n                        \n    tempwater.setFrameDesign(steelseries.FrameDesign.BRASS);\n    tempwater.setValueAnimated(0);\n    tempwater.setPointerType(steelseries.PointerType.TYPE9);\n   // radial4.setThreshold(50);\n    //radial4.blinkUserLed(0);\n   // radial4.setOdoValue(0);\n\n\n</script>\n\n<canvas id=\"tempwater\" width=\"140\" height=\"300\"></canvas>\n","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":789,"y":896,"wires":[[]]},{"id":"e2bc395b.a85b38","type":"function","z":"36380e2.d71d3f2","name":"electrical.batteries","func":"var signalk_key=\"electrical.batteries.house.voltage\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":668.0001239777,"y":468.0000419617,"wires":[["5b03b0ba.58634"]]},{"id":"dcd1eb5.23eb518","type":"delay","z":"36380e2.d71d3f2","name":"del","pauseType":"delay","timeout":"2","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1074.0000858307,"y":468.0000209808,"wires":[[]]},{"id":"6048311f.127a6","type":"function","z":"36380e2.d71d3f2","name":"roll","func":"var signalk_key=\"navigation.attitude.roll\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":"1","noerr":0,"x":625.000120163,"y":427.0000400543,"wires":[["42234a4b.a94be4"]]},{"id":"653b3e12.17138","type":"function","z":"36380e2.d71d3f2","name":"Cabin Temp","func":"var signalk_key=\"environment.inside.maincabin.temperature\" \n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":649.0001239777,"y":508.000043869,"wires":[["de8c47b8.2007e8"]]},{"id":"de8c47b8.2007e8","type":"function","z":"36380e2.d71d3f2","name":"K to F","func":"var temp = msg.payload;\n\nvalue = (temp * 9.0) / 5.0 - 459.67; \nmsg.payload=value;\nreturn msg; ","outputs":1,"noerr":0,"x":805,"y":510.9999952316,"wires":[["f20136a.1f4e2c8"]]},{"id":"f20136a.1f4e2c8","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload; \nreturn msg;","outputs":1,"noerr":0,"x":958.0003128051999,"y":511.00004482270003,"wires":[[]]},{"id":"1fb0019d.18cb1e","type":"function","z":"36380e2.d71d3f2","name":"compass","func":"var signalk_key=\"navigation.headingMagnetic\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":"1","noerr":0,"x":632.0001220703,"y":388.0000362396,"wires":[["5090be80.b0b7b"]]},{"id":"5090be80.b0b7b","type":"function","z":"36380e2.d71d3f2","name":"Rad to Deg","func":"var rad = msg.payload;\nvar deg = rad * 180/3.14;\nmsg.payload=deg;\nreturn msg ;","outputs":1,"noerr":0,"x":789,"y":376,"wires":[["37c670f2.960a6"]]},{"id":"37c670f2.960a6","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":947.0001373291,"y":386.0000314713,"wires":[[]]},{"id":"42234a4b.a94be4","type":"function","z":"36380e2.d71d3f2","name":"Rad to Deg","func":"var rad = msg.payload;\nvar deg = rad * 180/3.14;\nmsg.payload=deg;\nreturn msg ;","outputs":1,"noerr":0,"x":809.0000858306998,"y":427.0000209808,"wires":[["fa104573.1f6738"]]},{"id":"220ea0b0.b5334","type":"function","z":"36380e2.d71d3f2","name":"Water Temp","func":"var signalk_key=\"environment.water.temperature\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":658,"y":559.000002861,"wires":[["eacb4000.ad19d"]]},{"id":"c88e6751.7eece8","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":955.0000610351999,"y":552,"wires":[[]]},{"id":"eacb4000.ad19d","type":"function","z":"36380e2.d71d3f2","name":"K to F","func":"var temp = msg.payload;\n\nvalue = (temp * 9.0) / 5.0 - 459.67; \nmsg.payload=value;\nreturn msg; ","outputs":1,"noerr":0,"x":798,"y":559.000002861,"wires":[[]]},{"id":"aaa9c312.2f40f","type":"mqtt in","z":"36380e2.d71d3f2","name":"","topic":"/esp_easy32/bmp280/Pressure","qos":"2","broker":"6f02c0a4.b27a2","x":151.16670227049997,"y":615.3333616257,"wires":[["6e6e72d1.2ed55c"]]},{"id":"48b45e12.6545d","type":"mqtt in","z":"36380e2.d71d3f2","name":"","topic":"/esp_easy32/bmp280/Temperature","qos":"2","broker":"6f02c0a4.b27a2","x":156.0000686646,"y":681.0000734329,"wires":[["39714d3a.5fd742","d00047e6.caed38"]]},{"id":"b92de8b6.a6db68","type":"debug","z":"36380e2.d71d3f2","name":"","active":false,"console":"false","complete":"false","x":529,"y":1016,"wires":[]},{"id":"307e501a.bb2dd","type":"function","z":"36380e2.d71d3f2","name":"math","func":"\nvar vout = 0.0;\nvar vin = 0.0;\nvar R1 = 30000.0;\nvar R2 = 7500.0; \nvar value= msg.payload;\n\n\n vout = (value * 5.0) / 1024.0; \n vin = vout / (R2/(R1+R2)); \n \n//vin.toFixed(1);\n\nmsg.payload=vin;\n\nreturn msg;","outputs":1,"noerr":0,"x":329,"y":836,"wires":[["1333709f.d85baf"]]},{"id":"1333709f.d85baf","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":449,"y":836,"wires":[[]]},{"id":"d00047e6.caed38","type":"function","z":"36380e2.d71d3f2","name":"C  to F","func":"\n\nvar temp = msg.payload;\n\nvalue = (temp * 9.0) / 5.0 + 32.0; \nmsg.payload=value;\nreturn msg; ","outputs":1,"noerr":0,"x":384,"y":732.0000257492,"wires":[["c71c1a08.977d98"]]},{"id":"c71c1a08.977d98","type":"function","z":"36380e2.d71d3f2","name":"","func":"msg.value=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":518,"y":739.000002861,"wires":[[]]},{"id":"b523fb44.ca3628","type":"mqtt in","z":"36380e2.d71d3f2","name":"","topic":"/esp_easy32/volts/Analog","qos":"2","broker":"6f02c0a4.b27a2","x":129,"y":836,"wires":[["307e501a.bb2dd"]]},{"id":"cdf3197f.cb8ee8","type":"function","z":"36380e2.d71d3f2","name":"C  to F","func":"\n\nvar temp = msg.payload;\n\nvalue = (temp * 9.0) / 5.0 + 32.0; \nmsg.payload=value;\nreturn msg; ","outputs":1,"noerr":0,"x":377.0002441406,"y":914.0000963211,"wires":[["723dca8a.ceee84","cbd3c966.3a5a38"]]},{"id":"cbd3c966.3a5a38","type":"mqtt out","z":"36380e2.d71d3f2","name":"","topic":"watertemp","qos":"","retain":"","broker":"6f02c0a4.b27a2","x":529,"y":956,"wires":[]},{"id":"6e6e72d1.2ed55c","type":"mqtt out","z":"36380e2.d71d3f2","name":"","topic":"pressure","qos":"","retain":"","broker":"6f02c0a4.b27a2","x":479,"y":616,"wires":[]},{"id":"39714d3a.5fd742","type":"mqtt out","z":"36380e2.d71d3f2","name":"","topic":"airtemp","qos":"","retain":"","broker":"6f02c0a4.b27a2","x":492.0000686645999,"y":679.0000352859,"wires":[]},{"id":"7a5b625b.0e90fc","type":"function","z":"36380e2.d71d3f2","name":"","func":"    var sensor_volt;\n    var RS_gas; // Get value of RS in a GAS\n    var ratio; // Get ratio RS_GAS/RS_air\n    var sensorValue =msg.payload;\n    sensor_volt=sensorValue/1024*5.0;\n    RS_gas = (5.0-sensor_volt)/sensor_volt; // omit *RL\n\n          /*-Replace the name \"R0\" with the value of R0 in the demo of First Test -*/\n    ratio = RS_gas/108;  // ratio = RS/R0\n    msg.payload=ratio;\nreturn msg;","outputs":1,"noerr":0,"x":649,"y":816,"wires":[[]]},{"id":"3ed84afc.a5afd6","type":"mqtt in","z":"36380e2.d71d3f2","name":"","topic":"lat","qos":"2","broker":"6f02c0a4.b27a2","x":92.16667556760001,"y":514.3333559036,"wires":[[]]},{"id":"67edca47.759384","type":"mqtt in","z":"36380e2.d71d3f2","name":"","topic":"lon","qos":"2","broker":"6f02c0a4.b27a2","x":94.16667556760001,"y":559.3333568573,"wires":[[]]},{"id":"7dadde49.b337","type":"mqtt out","z":"36380e2.d71d3f2","name":"gas","topic":"gas","qos":"","retain":"","broker":"6f02c0a4.b27a2","x":809,"y":816,"wires":[]},{"id":"18941c06.8f7644","type":"rbe","z":"36380e2.d71d3f2","name":"","func":"rbei","gap":"","start":"","inout":"out","property":"payload","x":649,"y":776,"wires":[["7dadde49.b337","5e15d579.a5526c"]]},{"id":"a7f2f185.ee0fb","type":"exec","z":"36380e2.d71d3f2","command":"sudo reboot","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":306.16672515870005,"y":242.5000047684,"wires":[[],[],[]]},{"id":"ca7daeea.6bbc3","type":"inject","z":"36380e2.d71d3f2","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":108.16667175290002,"y":242.33333873750001,"wires":[["a7f2f185.ee0fb"]]},{"id":"cea56746.857848","type":"debug","z":"36380e2.d71d3f2","name":"","active":false,"console":"false","complete":"false","x":995,"y":669,"wires":[]},{"id":"ea8349dc.cc8108","type":"function","z":"36380e2.d71d3f2","name":"cabin pres","func":"var signalk_key=\"environment.inside.pressure\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":658,"y":599.000002861,"wires":[["6422168d.8f0b68","7f7031ff.91e8e"]]},{"id":"f212f5ac.777f38","type":"ui_chart","z":"36380e2.d71d3f2","name":"","group":"3fec2209.be279e","order":2,"width":0,"height":0,"label":"cabin pres","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"604800","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"outputs":1,"x":993,"y":599,"wires":[[]]},{"id":"4845e4a2.60635c","type":"function","z":"36380e2.d71d3f2","name":"cabin temp","func":"var signalk_key=\"environment.inside.temperature\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":658,"y":639.000002861,"wires":[["55ff889.23afe78"]]},{"id":"b9b2a008.1225c","type":"ui_chart","z":"36380e2.d71d3f2","name":"cabin temp","group":"3fec2209.be279e","order":1,"width":0,"height":0,"label":"cabin temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":true,"outputs":1,"x":995.1666870117001,"y":639,"wires":[[]]},{"id":"f134cc01.96ac1","type":"debug","z":"36380e2.d71d3f2","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1049,"y":196,"wires":[]},{"id":"b07f93f2.43378","type":"mqtt out","z":"36380e2.d71d3f2","name":"","topic":"ws","qos":"","retain":"","broker":"6f02c0a4.b27a2","x":216,"y":392.3333387375,"wires":[]},{"id":"55ff889.23afe78","type":"function","z":"36380e2.d71d3f2","name":"K to F","func":"var temp = msg.payload;\n\nvalue = (temp * 9.0) / 5.0 - 459.67; \nmsg.payload=value;\nreturn msg; ","outputs":1,"noerr":0,"x":800,"y":639.3333387375,"wires":[["b9b2a008.1225c","c88e6751.7eece8"]]},{"id":"e7cbe8a5.efe6a8","type":"ui_text","z":"36380e2.d71d3f2","group":"3fec2209.be279e","order":3,"width":0,"height":0,"name":"","label":" ALARM","format":"{{msg.payload}}","layout":"col-center","x":989,"y":736,"wires":[]},{"id":"5e15d579.a5526c","type":"function","z":"36380e2.d71d3f2","name":"","func":"var alarm= msg.payload;\nvar gas=\"GAS ALARM\";\nvar ok=\"OK\";\n//var water=\"HIGH WATER\"\nif (alarm===1)msg.payload=ok;\nif (alarm===0)msg.payload=gas;\n//if (alarm===2)msg.payload=water;\nreturn msg;","outputs":1,"noerr":0,"x":809,"y":776,"wires":[["e7cbe8a5.efe6a8"]]},{"id":"4567bffa.2e55f","type":"function","z":"36380e2.d71d3f2","name":"float","func":"var signalk_key=\"sensors.floatswitch\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":646,"y":695,"wires":[["eab702c.a3829"]]},{"id":"eab702c.a3829","type":"function","z":"36380e2.d71d3f2","name":"","func":"var water=msg.payload;\nvar alarm=\"BILDGE ALARM\"\nvar ok=\"OK\"\nif (water===1)msg.payload=alarm;\nif (water===0)msg.payload=ok;\nreturn msg;","outputs":1,"noerr":0,"x":803.1666870117001,"y":695.3333387375,"wires":[["e7cbe8a5.efe6a8"]]},{"id":"5e6f402b.e8e4f","type":"function","z":"36380e2.d71d3f2","name":"pir","func":"var signalk_key=\"sensors.pir\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":1,"noerr":0,"x":641,"y":735.9999647141,"wires":[["4b6bd038.1424b"]]},{"id":"4b6bd038.1424b","type":"function","z":"36380e2.d71d3f2","name":"","func":"var pir=msg.payload;\nvar piralarm=\"INTRUDER ALARM\"\nvar ok=\"OK\"\nif (pir===1)msg.payload=piralarm;\nif (pir===0)msg.payload=ok;\nreturn msg;","outputs":1,"noerr":0,"x":809,"y":737.6666517258,"wires":[["e7cbe8a5.efe6a8"]]},{"id":"eeea21f7.ee8cd","type":"function","z":"36380e2.d71d3f2","name":"Create global variable","func":"// \n\n    if (typeof msg.payload.updates !== 'undefined') {\n         \n            obj=msg.payload.updates[0].values[0].path;\n            value=msg.payload.updates[0].values[0].value;\n            global.set(obj, value);\n            msg.payload =  value;\n            msg.topic = obj;\n           \n            \n        \n        return [ null, msg ];\n    } \n","outputs":"2","noerr":0,"x":299,"y":116,"wires":[[],[]]},{"id":"c6815ac6.3b7298","type":"json","z":"36380e2.d71d3f2","name":"","property":"payload","action":"","pretty":false,"x":109,"y":116,"wires":[["eeea21f7.ee8cd"]]},{"id":"e4dacb99.7e6e88","type":"link out","z":"36380e2.d71d3f2","name":"ws","links":["8fa9cee5.69582"],"x":114,"y":316,"wires":[]},{"id":"6422168d.8f0b68","type":"function","z":"36380e2.d71d3f2","name":"pa/mbar","func":"var pa = msg.payload;\nvar mbar =(0);\nmbar = (pa/100 ).toFixed(1); \nmsg.payload = mbar;\nreturn msg; ","outputs":1,"noerr":0,"x":827,"y":600,"wires":[["f212f5ac.777f38","cea56746.857848"]]},{"id":"7f7031ff.91e8e","type":"debug","z":"36380e2.d71d3f2","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":998,"y":701,"wires":[]},{"id":"e705e7f8.c89488","type":"jsonpath","z":"36380e2.d71d3f2","expression":"$.updates..values[*]","split":false,"name":"Signal K delta values","x":265,"y":352,"wires":[["8e806c99.f727f"]]},{"id":"5491f69b.2d1778","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"6f02c0a4.b27a2","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"3fec2209.be279e","type":"ui_group","z":"","name":"","tab":"58484c11.f4c534","order":1,"disp":true,"width":"6","collapse":false},{"id":"58484c11.f4c534","type":"ui_tab","z":"","name":"Home1","icon":"dashboard","disabled":false,"hidden":false}]
mare liberum
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)