Smick_06_digital_input

Digital input example

[{"id":"e82eefd6.a4c5e","type":"tab","label":"digital_input"},{"id":"9a0095c7.dde578","type":"trigger","z":"e82eefd6.a4c5e","op1":"LED=1","op2":"LED=0","op1type":"str","op2type":"str","duration":"5","extend":false,"units":"s","reset":"","name":"led on 5sec","x":570,"y":280,"wires":[[]]},{"id":"6f854012.79d","type":"ui_gauge","z":"e82eefd6.a4c5e","name":"Button","group":"65a1418e.b6f28","order":2,"width":"3","height":"3","gtype":"donut","title":"click event","label":"click","format":"{{value}}","min":0,"max":"1","colors":["#00b500","#e6e600","#ca3838"],"x":790,"y":380,"wires":[]},{"id":"7606ed9f.9465e4","type":"ui_chart","z":"e82eefd6.a4c5e","name":"click","group":"65a1418e.b6f28","order":3,"width":"0","height":"0","label":"click history","chartType":"line","legend":"false","xformat":"%H:%M:%S","interpolate":"step-after","nodata":"push switch","ymin":"0","ymax":"1","removeOlder":"60","removeOlderUnit":"60","x":790,"y":440,"wires":[[],[]]},{"id":"e90e5c40.f2d55","type":"trigger","z":"e82eefd6.a4c5e","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"1","extend":true,"units":"s","reset":"","name":"","x":560,"y":400,"wires":[["6f854012.79d","7606ed9f.9465e4"]]},{"id":"ae183781.d756f8","type":"comment","z":"e82eefd6.a4c5e","name":"actions on actuators","info":"","x":590,"y":220,"wires":[]},{"id":"b21099e2.9a96e8","type":"comment","z":"e82eefd6.a4c5e","name":"actions on dashboard","info":"","x":600,"y":340,"wires":[]},{"id":"725a97ae.623098","type":"comment","z":"e82eefd6.a4c5e","name":"actions on social (alarm)","info":"","x":610,"y":480,"wires":[]},{"id":"4ce92a8b.692514","type":"comment","z":"e82eefd6.a4c5e","name":"enable/disable","info":"","x":580,"y":60,"wires":[]},{"id":"eb233c89.538f4","type":"ui_switch","z":"e82eefd6.a4c5e","name":"","label":"D3 button disable/enable","group":"65a1418e.b6f28","order":1,"width":0,"height":0,"passthru":true,"topic":"","style":"","onvalue":"click==d3=0","onvalueType":"str","onicon":"","oncolor":"","offvalue":"click==null","offvalueType":"str","officon":"","offcolor":"","x":850,"y":160,"wires":[["e4526f09.eb336"]]},{"id":"b87d5235.0fe9","type":"switch","z":"e82eefd6.a4c5e","name":"parse","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"CONN","vt":"str"},{"t":"cont","v":"CLICK","vt":"str"}],"checkall":"false","outputs":2,"x":270,"y":400,"wires":[["9733586c.818348"],["9a0095c7.dde578","e90e5c40.f2d55","1166fb27.3795a5"]]},{"id":"e8410a86.195ec8","type":"link in","z":"e82eefd6.a4c5e","name":"event","links":["ca2d688.4211598"],"x":155,"y":400,"wires":[["b87d5235.0fe9"]]},{"id":"e4526f09.eb336","type":"link out","z":"e82eefd6.a4c5e","name":"command","links":["1096456f.bfc93b"],"x":1015,"y":120,"wires":[]},{"id":"9733586c.818348","type":"change","z":"e82eefd6.a4c5e","name":"setup","rules":[{"t":"set","p":"payload","pt":"msg","to":"click==d3=0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":120,"wires":[["e4526f09.eb336"]]},{"id":"738599c0.741078","type":"comment","z":"e82eefd6.a4c5e","name":"Description","info":"Smick_06_digital_input\n_______________________________________________________________________________\nPackage : Smick v.1\nModule  : console\nAuthor  : Curci\nLicence : (CC) BY-NC-SA\n\nThis work is licensed under a Creative Commons \nAttribution-NonCommercial-ShareAlike \n4.0 International License.\n\nHistory\n\nDate        Author  Description\n2016.12.17  Curci   genesis\n_______________________________________________________________________________\n\nDescription\n\ntodo\n_______________________________________________________________________________\n\nBill Of Material\n\nHardware:\n\n    1 Human internet terminal (PC, tablet or smartphone) connected to the internet\n    1 Smick Wi-Fi connected to the internet\n    1 Button connected to smick \n\nHW Connections:\n\n    Device  pin     Smick pin\n    Button  1       D3\n    Button  2       GND\n\nFlow Connections:\n\n    console\n\nAccount:\n\n    Wi-Fi credentials\n    MQTT broker\n    FRED\n","x":180,"y":60,"wires":[]},{"id":"1166fb27.3795a5","type":"link out","z":"e82eefd6.a4c5e","name":"alarm","links":["5487d125.734a9"],"x":515,"y":540,"wires":[]},{"id":"65a1418e.b6f28","type":"ui_group","z":"","name":"digital","tab":"22823145.22de6e","order":1,"disp":true,"width":"6"},{"id":"22823145.22de6e","type":"ui_tab","z":"","name":"Digital Input","icon":"dashboard","order":3}]

Flow Info

Created 7 years, 10 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • change (x1)
  • comment (x5)
  • link in (x1)
  • link out (x2)
  • switch (x1)
  • trigger (x2)
Other
  • tab (x1)
  • ui_chart (x1)
  • ui_gauge (x1)
  • ui_group (x1)
  • ui_switch (x1)
  • ui_tab (x1)

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option