logiccloud Calculator Demo
This flow shows the usage of node-RED logiccloud control nodes. It handles inputs and outputs of a logiccloud control device created from the Calculator sample.
[{"id":"4faac2fcb9ad1050","type":"tab","label":"Calculator Demo","disabled":false,"info":"","env":[]},{"id":"01dc0ac82a2a83c0","type":"inject","z":"4faac2fcb9ad1050","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10","payloadType":"num","x":130,"y":220,"wires":[["d5c201721704b0a4"]]},{"id":"d290a228825f89be","type":"inject","z":"4faac2fcb9ad1050","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"20","payloadType":"num","x":130,"y":260,"wires":[["d5c201721704b0a4"]]},{"id":"a5434dfc44589356","type":"inject","z":"4faac2fcb9ad1050","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"12.34","payloadType":"num","x":130,"y":340,"wires":[["fc2fb85afb215b80"]]},{"id":"0e40e3d220181739","type":"inject","z":"4faac2fcb9ad1050","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"56.78","payloadType":"num","x":130,"y":380,"wires":[["fc2fb85afb215b80"]]},{"id":"b51c4484a337a485","type":"debug","z":"4faac2fcb9ad1050","name":"OUTPUT","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":420,"y":580,"wires":[]},{"id":"de2e136fba87dcb7","type":"comment","z":"4faac2fcb9ad1050","name":"Use \"logiccloud control input\" node to write (input) data to the logiccloud control.","info":"Use <b>logiccloud control input</b> node to write (input) data to the logiccloud control.\n<br/>\n<br/>\nThe logiccloud control input node provides the following properties:\n - name: the name of the node; if it is not set, the node will have the default name \"logiccloud-control-input\"\n - logiccloudControl: the logiccloud control configuration node to be used for the communication with the logiccloud control\n - variable: the access variable name to be written; there are two ways to set the access variable name:\n - by typing the access variable name in the variable field\n - by browsing the available input access variables in the logiccloud control (by clicking on the search icon next to the variable field)\n\n**Note:** in order to use the browsing functionality, several steps have to be performed beforehand:\n - the logiccloud control configuration node has to be properly configured (valid host and port of an existing running logiccloud control Node-RED connector)\n - the logiccloud control configuration node has to be deployed\n - the logiccloud control configuration node has to be selected in the logiccloudControl field of the logiccloud control input node\n - close and re-open the configuration for the logiccloud control input node\n\nIf the above steps are performed and the logiccloud control Node-RED connector is running, by clicking the search icon next to the variable field the list of available inputs will be displayed. \nThen the user can select the desired access variable. \nThe access variable name will be automatically filled in the variable field.\n<br/>\nIf all of the above steps are performed and the logiccloud control Node-RED connector is running, but there are no input access variables defined in the mappings for the logiccloud Node-RED connector, a warning message will be displayed: \"No inputs found on logiccloud control on port: [port]\".\n<br/>\nIf one of the above steps is not performed or logiccloud control Node-RED connector is not running, the browsing functionality will not work.\nIn this case, a warning message will be displayed: \"No inputs found on logiccloud control on port: [port]\".\nThe user has to manually type the access variable name in the variable field.\n","x":320,"y":140,"wires":[]},{"id":"11dfa605f556fe44","type":"comment","z":"4faac2fcb9ad1050","name":"Use \"logiccloud control output\" node to receive (output) data from the logiccloud control.","info":"Use <b>logiccloud control output</b> node to receive (output) data from the logiccloud control.\n<br/>\n<br/>\nThe logiccloud control output node provides the following properties:\n- name: the name of the node; if it is not set, the node will have the default name \"logiccloud-control-output\"\n- logiccloudControl: the logiccloud control configuration node to be used for the communication with the logiccloud control\n- variable: the access variable name for which the node will receive updates; there are two ways to set the access variable name:\n - by typing the access variable name in the variable field\n - by browsing the available output access variables in the logiccloud control (by clicking on the search icon next to the variable field)\n\n**Note:** in order to use the browsing functionality, several steps have to be performed beforehand:\n- the logiccloud control configuration node has to be properly configured (valid host and port of an existing running logiccloud control Node-RED connector)\n- the logiccloud control configuration node has to be deployed\n- the logiccloud control configuration node has to be selected in the logiccloudControl field of the logiccloud control output node\n- close and re-open the configuration for the logiccloud control output node\n\nIf the above steps are performed and the logiccloud control Node-RED connector is running, by clicking the search icon next to the variable field the list of available outputs will be displayed.\nThen the user can select the desired access variable.\nThe access variable name will be automatically filled in the variable field.\n<br/>\nIf all of the above steps are performed and the logiccloud control Node-RED connector is running, but there are no output access variables defined in the mappings for the logiccloud Node-RED connector, a warning message will be displayed: \"No outputs found on logiccloud control on port: [port]\".\n<br/>\nIf one of the above steps is not performed or logiccloud control Node-RED connector is not running, the browsing functionality will not work.\nIn this case, a warning message will be displayed: \"No outputs found on logiccloud control on port: [port]\".\nThe user has to manually type the access variable name in the variable field.\n","x":350,"y":480,"wires":[]},{"id":"439d1f8e16cef154","type":"comment","z":"4faac2fcb9ad1050","name":"Writes 10 or 20 value to INPUT_1 acces variable.","info":"Writes 10 or 20 value to INPUT_1 acces variable.","x":460,"y":200,"wires":[]},{"id":"b74835182f864c27","type":"comment","z":"4faac2fcb9ad1050","name":"Writes 12.34 or 56.78 value to INPUT_2 acces variable.","info":"Writes 12.34 or 56.78 value to INPUT_2 acces variable.","x":480,"y":320,"wires":[]},{"id":"a5f8f52db1abe9f2","type":"comment","z":"4faac2fcb9ad1050","name":"Receives the value of OUTPUT access variable.","info":"Receives the value of OUTPUT access variable.","x":240,"y":540,"wires":[]},{"id":"eaf2c1e6b694515f","type":"comment","z":"4faac2fcb9ad1050","name":"Create and configure a logiccloud-control-configuration node","info":"The logiccloud control configuration node is used to connect to the logiccloud control.\n<br/>\n<br/>\nThe communication with the logiccloud control is always done via logiccloud Node-RED connector.\nThe logiccloud Node-RED connector is the one responsible with the data handling between the logiccloud control input / logiccloud control output nodes and the logiccloud control.\nThe logiccloud Node-RED connector is only allowing access to the logiccloud control access variables defined in its mappings. \nThis means that the logiccloud Node-RED nodes only have access to a subset of all logiccloud control access variables, so only to the ones defined in the mappings. \nIf the mappings of logiccloud Node-RED connector are updated, the Node-RED flow has to be restarted in order for the changes to take effect also on logiccloud Node-RED nodes. \n<br/>\nThe logiccloud control configuration node provides the following properties:\n- name: the name of the node; if it is not set, the node will have the default name \"logiccloud-control-on:[host]:[port]\"\n- host: the hostname or IP address of the logiccloud Node-RED connector\n- port: the port of the logiccloud Node-RED connector\n\n<br/>\nThe logiccloud control configuration node provides browsing support that can be used to discover the available input/output access variables in the logiccloud control (of course, as described before, the ones defined in the mappings by the logiccloud Node-RED connector).\nIn order to use this feature, the logiccloud control configuration node has to be properly configured (valid host and port of an existing running logiccloud control) and deployed. \n","x":260,"y":40,"wires":[]},{"id":"d5c201721704b0a4","type":"logiccloud-control-input","z":"4faac2fcb9ad1050","name":"INPUT_1","logiccloudControl":"","variable":"INPUT_1","x":340,"y":240,"wires":[]},{"id":"fc2fb85afb215b80","type":"logiccloud-control-input","z":"4faac2fcb9ad1050","name":"INPUT_2","logiccloudControl":"","variable":"INPUT_2","x":340,"y":360,"wires":[]},{"id":"4e7324baf8ccc9ea","type":"logiccloud-control-output","z":"4faac2fcb9ad1050","name":"OUTPUT","logiccloudControl":"","variable":"OUTPUT","x":120,"y":580,"wires":[["b51c4484a337a485"]]}]