• redPlc UniPi 1.1 node

    2
    1
    0 Votes
    2 Posts
    660 Views
    No one has replied
  • Limited acces to node-red

    3
    0 Votes
    3 Posts
    951 Views
    Martin KudláčekM
    And this is the installation script we use: set -e # don't ask question export DEBIAN_FRONTEND=noninteractive # gnupg for apt-key # g++ for the node-red NPM package echo "installation of dependenicies" apt install -y --no-install-recommends wget curl gnupg g++ make # add unofficial NodeJS repository and install the nodejs # https://github.com/nodesource/distributions/blob/master/README.md#debmanual echo "Installation of nodejs and npm" wget -O - -q https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - echo "deb https://deb.nodesource.com/node_12.x buster main" > /etc/apt/sources.list.d/nodesource.list apt update apt install -y --no-install-recommends nodejs # installation of npm curl https://www.npmjs.com/install.sh | bash # Node-RED installation echo "Installation of node-red via npm" npm install -g --unsafe-perm node-red # install the Node-RED systemd service echo "Setting up the Node-RED to be run via systemd" cp "${SCRIPT_FILES}/node-red.service" /etc/systemd/system systemctl enable node-red
  • Modbus RTU communication with custom Device

    2
    0 Votes
    2 Posts
    1k Views
    S
    Seems like the problem was a bad Connection or so. Testet something else and had to reconnect the rs485 wires and now it works. Bit weird that mbpoll worked without a problem...
  • 1 wire with node-red os image

    3
    2
    0 Votes
    3 Posts
    1k Views
    L
    Hello Martin, Thanks for the reaction! Okey, I indeed thought it had something to do with that, but I couldn't find any update notes on the os image. I don't really need to access the sensors through the unipi node anyways, so I'm going to try option 2. Best Regards
  • Installation manual Node-RED (use at your own risk)

    node-red manual axon
    7
    0 Votes
    7 Posts
    2k Views
    Martin KudláčekM
    Hello @FabioIT, the Node-RED image is defacto a Raspberry Pi OS. You can proceed with any general tutorial for adding the desktop environment, which you can find on the offical Raspberry Pi OS webpage.
  • PWM Output with node Red

    1
    0 Votes
    1 Posts
    724 Views
    No one has replied
  • Unipi 1.1 Lite - read from 1W-Sensor in NODERED

    3
    0 Votes
    3 Posts
    1k Views
    J
    this flow gets data from unipi 1.1. unipi lite does not have ai ao. Just skip it. temp input is one wire sensor data. the json all node initializes all variables and then websocket delivers actual data. [{"id":"cad50249.94c0e","type":"tab","label":"unipi1.1 to MQTT","disabled":false,"info":""},{"id":"9d58b57c.1dc5c8","type":"websocket in","z":"cad50249.94c0e","name":"","server":"","client":"84e45387.411c2","x":150,"y":340,"wires":[["f1646973.6f0b08"]]},{"id":"f1646973.6f0b08","type":"json","z":"cad50249.94c0e","name":"","property":"payload","action":"","pretty":false,"x":330,"y":340,"wires":[["317506aa.3aa32a","fa0726fd.a44fb8"]]},{"id":"cdd4d544.02a9f8","type":"mqtt out","z":"cad50249.94c0e","name":"home/ug/Buero/unipi/1","topic":"","qos":"","retain":"","broker":"e78c6663.280d38","x":1180,"y":400,"wires":[]},{"id":"bc4f4c59.0d206","type":"trigger","z":"cad50249.94c0e","op1":"","op2":"1 Stunde keine Meldung von One-Wire Sensoren!","op1type":"nul","op2type":"str","duration":"1","extend":true,"units":"hr","reset":"","bytopic":"all","name":"","x":290,"y":180,"wires":[["1e8f1bff.5ff404"]]},{"id":"7b4c23b3.9cfebc","type":"function","z":"cad50249.94c0e","name":"","func":"msg.payload = msg.topic + \" ---> \" + msg.payload;\nmsg.topic = \"Zeitüberschreitung One-Wire Sensoren\";\nreturn msg;","outputs":1,"noerr":0,"x":670,"y":180,"wires":[["c4704b1c.ce25d8","8e60f8f7.3d3ee8"]]},{"id":"317506aa.3aa32a","type":"switch","z":"cad50249.94c0e","name":"","property":"payload.dev","propertyType":"msg","rules":[{"t":"eq","v":"temp","vt":"str"},{"t":"eq","v":"input","vt":"str"},{"t":"eq","v":"relay","vt":"str"},{"t":"eq","v":"ao","vt":"str"},{"t":"eq","v":"ai","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":490,"y":340,"wires":[["bc4f4c59.0d206","c0a56553.2502e8"],["6168748d.9395fc"],["ec9fec9a.b8bb8"],["bf29c465.fd0b98"],["6ec28c7b.7a5854"]]},{"id":"c4704b1c.ce25d8","type":"debug","z":"cad50249.94c0e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":830,"y":220,"wires":[]},{"id":"e7b77d5b.681fb","type":"inject","z":"cad50249.94c0e","name":"","topic":"test","payload":"Testmail unipi-big","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":620,"y":140,"wires":[["8e60f8f7.3d3ee8"]]},{"id":"c0a56553.2502e8","type":"function","z":"cad50249.94c0e","name":"temp","func":"var t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit;\nmsg.payload = parseFloat(msg.payload.value).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":280,"wires":[["cdd4d544.02a9f8"]]},{"id":"6168748d.9395fc","type":"function","z":"cad50249.94c0e","name":"input","func":"var t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit;\nmsg.payload = msg.payload.value;\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":320,"wires":[["cdd4d544.02a9f8"]]},{"id":"ec9fec9a.b8bb8","type":"function","z":"cad50249.94c0e","name":"relay","func":"var t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit;\nmsg.payload = msg.payload.value;\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":360,"wires":[["cdd4d544.02a9f8"]]},{"id":"bf29c465.fd0b98","type":"function","z":"cad50249.94c0e","name":"ao","func":"var t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit;\nmsg.payload = parseFloat(msg.payload.value).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"x":910,"y":400,"wires":[["cdd4d544.02a9f8"]]},{"id":"6ec28c7b.7a5854","type":"switch","z":"cad50249.94c0e","name":"","property":"payload.circuit","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"2","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":650,"y":460,"wires":[["a14e1ae1.a92608"],["dad4982a.d5fe18"]]},{"id":"a14e1ae1.a92608","type":"function","z":"cad50249.94c0e","name":"ai 1","func":"var t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit; \nmsg.payload = parseFloat(msg.payload.value).toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":440,"wires":[["7095cd82.073ff4"]]},{"id":"dad4982a.d5fe18","type":"function","z":"cad50249.94c0e","name":"ai 2","func":"var t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit; \nmsg.payload = (10.0 - parseFloat(msg.payload.value)).toFixed(2);\n//msg.payload = msg.payload.toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"x":790,"y":480,"wires":[["6749874e.7eb638"]]},{"id":"8e60f8f7.3d3ee8","type":"e-mail","z":"cad50249.94c0e","server":"smtp.gmail.com","port":"465","secure":true,"tls":false,"name":"[email protected]","dname":"[email protected]","x":860,"y":180,"wires":[]},{"id":"1e8f1bff.5ff404","type":"moment","z":"cad50249.94c0e","name":"HH:mm:ss DD-MM-YYYY","topic":"","input":"xyz","inputType":"flow","inTz":"Europe/Berlin","adjAmount":0,"adjType":"days","adjDir":"add","format":"HH:mm:ss DD-MM-YYYY","locale":"de_DE","output":"topic","outputType":"msg","outTz":"Europe/Berlin","x":490,"y":180,"wires":[["7b4c23b3.9cfebc"]]},{"id":"fa0726fd.a44fb8","type":"debug","z":"cad50249.94c0e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":350,"y":400,"wires":[]},{"id":"5de6d555.65fd4c","type":"inject","z":"cad50249.94c0e","name":"Ubig","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":"1.0","x":110,"y":580,"wires":[["1ec43156.0d3ecf"]]},{"id":"1ec43156.0d3ecf","type":"http request","z":"cad50249.94c0e","name":"http://localhost:8080/json/all","method":"GET","ret":"txt","paytoqs":false,"url":"http://localhost:8080/json/all","tls":"","persist":false,"proxy":"","authType":"","x":320,"y":580,"wires":[["fadb47c7.8068d8"]]},{"id":"b0b395e7.71ed48","type":"catch","z":"cad50249.94c0e","name":"catch no success","scope":["1ec43156.0d3ecf","2dbeaf6.88fdf5"],"uncaught":false,"x":220,"y":640,"wires":[["1bbd0392.3fcfec","63a3399c.45f138"]]},{"id":"63a3399c.45f138","type":"delay","z":"cad50249.94c0e","name":"30 sec","pauseType":"delay","timeout":"30","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":390,"y":640,"wires":[["1ec43156.0d3ecf"]]},{"id":"1bbd0392.3fcfec","type":"debug","z":"cad50249.94c0e","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"error","targetType":"msg","x":400,"y":680,"wires":[]},{"id":"2dbeaf6.88fdf5","type":"function","z":"cad50249.94c0e","name":"no success","func":"node.error(\"json/all no success\", msg); ","outputs":1,"noerr":0,"x":630,"y":640,"wires":[[]]},{"id":"fadb47c7.8068d8","type":"json","z":"cad50249.94c0e","name":"","property":"payload","action":"","pretty":false,"x":510,"y":580,"wires":[["f4c43419.9505e8"]]},{"id":"f4c43419.9505e8","type":"switch","z":"cad50249.94c0e","name":"success","property":"payload.status","propertyType":"msg","rules":[{"t":"eq","v":"success","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":640,"y":580,"wires":[["34618e75.c993a2"],["2dbeaf6.88fdf5"]]},{"id":"34618e75.c993a2","type":"function","z":"cad50249.94c0e","name":"split","func":"var ar = msg.payload.data;\nvar i;\nfor (i = 0; i < ar.length; i++) {\n node.send({payload:ar[i]});\n}\nreturn;","outputs":1,"noerr":0,"x":790,"y":580,"wires":[["a813b8d1.c4b208"]]},{"id":"a813b8d1.c4b208","type":"function","z":"cad50249.94c0e","name":"format","func":"/*\nvar t_loc = \"home/ug/Buero/unipi/1/\";\nmsg.topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit;\nswitch (msg.payload.dev){\n case \"temp\":\n msg.payload = parseFloat(msg.payload.value).toFixed(2);\n break;\n case \"input\":\n msg.payload = msg.payload.value;\n break; \n case \"relay\":\n msg.payload = msg.payload.value;\n}\nreturn msg;\n*/\n\nvar t_loc = \"home/ug/Buero/unipi/1/\";\nvar mqtt_topic = t_loc + msg.payload.dev + \"/\" + msg.payload.circuit;\nswitch (msg.payload.dev){\n case \"temp\":\n return{payload:parseFloat(msg.payload.value).toFixed(2),topic:mqtt_topic};\n case \"input\":\n return{payload:msg.payload.value,topic:mqtt_topic};\n case \"relay\":\n return{payload:msg.payload.value,topic:mqtt_topic};\n}\nreturn;","outputs":1,"noerr":0,"x":910,"y":580,"wires":[["cdd4d544.02a9f8"]]},{"id":"c52a64.b19355a","type":"comment","z":"cad50249.94c0e","name":"init input, relay, temp","info":"","x":1120,"y":580,"wires":[]},{"id":"6749874e.7eb638","type":"switch","z":"cad50249.94c0e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"","vt":"prev"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":480,"wires":[["cdd4d544.02a9f8"]]},{"id":"7095cd82.073ff4","type":"switch","z":"cad50249.94c0e","name":"","property":"payload","propertyType":"msg","rules":[{"t":"neq","v":"","vt":"prev"}],"checkall":"true","repair":false,"outputs":1,"x":910,"y":440,"wires":[["cdd4d544.02a9f8"]]},{"id":"84e45387.411c2","type":"websocket-client","z":"","path":"ws://localhost:8080/ws","tls":"","wholemsg":"false"},{"id":"e78c6663.280d38","type":"mqtt-broker","z":"","broker":"10.0.0.43","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
  • websocket is not open

    3
    1
    0 Votes
    3 Posts
    1k Views
    Martin KudláčekM
    Hello @ktanghe, the port 1880 is port of Node-RED. You need to write to the port of Evok. I would suggest to download image with Node-RED preinstalled, where you will find example with Dashboard palette as well: https://kb.unipi.technology/en:sw:03-3rd-party:nodered Best regards, Martin
  • websocket readystate 3

    4
    0 Votes
    4 Posts
    2k Views
    K
    in the neuron image there are a few mistakes in the walkthrough, 1:log is unipi,pass is unipi.technology 2:bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered) : this is an old package 3 de demo flow does not work, ik has unknown stuff in it
  • Unipi 1.1 - how to set relay output in NODERED

    5
    1
    0 Votes
    5 Posts
    2k Views
    W
    ok, I solved the problem. it is logic but a little strange because UniPi Output only prepare the JSON message, but to send it you still need websocket ( I thought that UniPi Output node handle all of it). it works [image: 9545cb0a-eee5-46f4-bb5e-ff719019f1eb-image.png]
  • access denied

    3
    0 Votes
    3 Posts
    1k Views
    T
    If you are using Axon or Neuron, use our official image with preinstalled Node-Red https://kb.unipi.technology/en:sw:03-3rd-party:nodered#os_images_with_preinstalled_node-red images for Unipi 1.1 and Lite are coming out soon
  • unipi1.1, Raspi 4, evok, Node_Red floor heating control.

    1
    1
    0 Votes
    1 Posts
    913 Views
    No one has replied
  • Node-RED on UniPi Neuron PDF guide download not available

    3
    0 Votes
    3 Posts
    1k Views
    Martin KudláčekM
    Hi @harpau, the KB is back online. Best regards, Martin
  • Switching output or relay on

    14
    1
    0 Votes
    14 Posts
    5k Views
    L
    @zdenek_jotio Success!! I've changed your inject node to "1" instead of "1_01" and it's worked. Finally getting somewhere.... Changing the nodes is working on all examples now Brilliant, thanks for the direction
  • After Reboot

    3
    1
    0 Votes
    3 Posts
    1k Views
    M
    Thank you, And I can do this how? best regards.
  • Example UI flow not working

    4
    2
    0 Votes
    4 Posts
    2k Views
    WesleyFrankenW
    Everything is chinese the first time :-), don't worry. Can you show me the configuration of the Relay 4 Node within Node-RED? Also open your EVOKE configuration bij entering in your case 192.168.1.7, and show the configuration of your relay 4.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    102 Views
    No one has replied
  • Simple input output map

    2
    1
    0 Votes
    2 Posts
    1k Views
    Z
    @matrixratrix said in Simple input output map: I new on node red. I trying map a simple input to a relay bu Node red unsing Unipi, ai use this example: https://flows.nodered.org/node/@unipitechnology/node-red-contrib-unipi-evok The "Unipi Control Panel" tell me that the comunication is working, the WS ip is set and is connected, but for some reason the output is not working. the debug is tell me the same: [image: 0_1571852498572_uni.JPG] There is there any other detail you should configure? Hello matrixratrix, Please can you check if the configuration of your ws node - if the "Type" is set to "Connect to" as is shown in the picture. [image: 0_1572474763431_768637ba-7b75-4ded-b7aa-c323d09628f3-image.png] This config change should solve your problem.
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    32 Views
    No one has replied
  • NodeRed with analog OUTput

    2
    0 Votes
    2 Posts
    2k Views
    Z
    Hello @beergeek You are right with problem when using analog output in configuration 0-20mA. When we designed nodes, we only implemented voltage output. To fast repair you can add function node to output, that recalculate output value from 0-10 to 0-20. So your input value will be 0 to 10, but output value will be 0-20. We will try to repair output node with support for current output it in next week. Function code to fast implementation: [image: 0_1562793741763_b5537379-d362-4d19-b00b-00d50f3b5464-image.png] Try to import funtion and connect it as in picture. [{"id":"98b4db11.a43aa8","type":"function","z":"dd6bd412.3bde08","name":"0-20mA","func":"if(msg.payload.value) \n{\n msg.payload.value = msg.payload.value*2.00;\n}\nreturn msg;","outputs":1,"noerr":0,"x":1260,"y":220,"wires":[["a7851ed2.a7d6"]]}] Thank you for your notice.