Chicken_house_system

A back up of my chicken house setup.

[{"id":"b69f94c8.496068","type":"rpi-gpio out","name":"","pin":"16","set":true,"level":"1","out":"out","x":619,"y":91,"z":"c3aed0d3.3ce58","wires":[]},{"id":"716c2eb5.8e93d","type":"rpi-gpio in","name":"","pin":"37","intype":"up","read":false,"x":251,"y":425,"z":"c3aed0d3.3ce58","wires":[["e30c3bc7.1cf3c8"]]},{"id":"7cc51837.833ae8","type":"trigger","op1":"0","op2":"1","op1type":"val","op2type":"val","duration":"1","extend":false,"units":"s","name":"On_Off","x":450,"y":113,"z":"c3aed0d3.3ce58","wires":[["b69f94c8.496068"]]},{"id":"e30c3bc7.1cf3c8","type":"switch","name":"","property":"payload","rules":[{"t":"eq","v":"0"}],"checkall":"true","outputs":1,"x":438,"y":425,"z":"c3aed0d3.3ce58","wires":[["28456688.d7ba9a"]]},{"id":"cf301043.30cff","type":"inject","name":"Evening","topic":"Down","payload":"","payloadType":"date","repeat":"","crontab":"45 19 * * *","once":false,"x":238,"y":265,"z":"c3aed0d3.3ce58","wires":[["24cc7b99.db3384"]]},{"id":"28456688.d7ba9a","type":"function","name":"message","func":"var messages = [\n        \"El doros openesos at\",\n        \"Gokkelok opened at\",\n        \"Random message that opened this door at\"\n];\nmsg.payload = messages[Math.floor(Math.random()*messages.length)]+(new Date()).toString();\nreturn msg;","outputs":"1","noerr":0,"x":619,"y":436,"z":"c3aed0d3.3ce58","wires":[["7242729.f8dbd8c"]]},{"id":"fcd02e80.032fd","type":"rpi-gpio out","name":"","pin":"18","set":true,"level":"1","out":"out","x":647,"y":326,"z":"c3aed0d3.3ce58","wires":[]},{"id":"24cc7b99.db3384","type":"trigger","op1":"0","op2":"1","op1type":"val","op2type":"val","duration":"50","extend":false,"units":"ms","name":"On_Off","x":475,"y":292,"z":"c3aed0d3.3ce58","wires":[["fcd02e80.032fd","13a77a4b.ec5886"]]},{"id":"c4389784.3bc768","type":"rpi-gpio in","name":"","pin":"32","intype":"up","read":false,"x":253,"y":528,"z":"c3aed0d3.3ce58","wires":[["a2a2b34a.5d5d5"]]},{"id":"ccdb3ed5.3324c","type":"function","name":"message","func":"msg.payload = \"The door closed at \"+(new Date()).toString();\nreturn msg;","outputs":"1","noerr":0,"x":610,"y":537,"z":"c3aed0d3.3ce58","wires":[["9954a064.66ab6"]]},{"id":"a2a2b34a.5d5d5","type":"switch","name":"","property":"payload","rules":[{"t":"eq","v":"0"}],"checkall":"true","outputs":1,"x":426,"y":531,"z":"c3aed0d3.3ce58","wires":[["ccdb3ed5.3324c"]]},{"id":"348ba0d8.cb746","type":"comment","name":"Lego Up","info":"The relay triggers a button push on\nthe Lego Mindstorms RCX unit which \nstarts motor and after motor has \nopened door completely (measured with\nrotation sensor) the RCX return a\nsignal through a relay to the Rpi and \nnode-red.","x":773,"y":92,"z":"c3aed0d3.3ce58","wires":[]},{"id":"340870f5.cbf79","type":"comment","name":"Lego Down","info":"The relay triggers a button push on\nthe Lego Mindstorms RCX unit which \nstarts motor and after motor has \nclosed door completely (measured with\nrotation sensor) the RCX return a\nsignal through a relay to the Rpi and \nnode-red.","x":788,"y":283,"z":"c3aed0d3.3ce58","wires":[]},{"id":"b0ffa63.f4f0058","type":"rpi-gpio out","name":"","pin":"22","set":true,"level":"1","out":"out","x":452,"y":179,"z":"c3aed0d3.3ce58","wires":[]},{"id":"d78ebff.f28714","type":"comment","name":"Food","info":"The relay for 220v electric fence. ","x":770,"y":158,"z":"c3aed0d3.3ce58","wires":[]},{"id":"a3bf3571.5c40c8","type":"go","name":"","x":226,"y":102,"z":"c3aed0d3.3ce58","wires":[["7cc51837.833ae8","b0ffa63.f4f0058"]]},{"id":"9954a064.66ab6","type":"twitter out","twitter":"","name":"Tweet","x":791,"y":542,"z":"c3aed0d3.3ce58","wires":[]},{"id":"7242729.f8dbd8c","type":"twitter out","twitter":"","name":"Tweet2","x":785,"y":436,"z":"c3aed0d3.3ce58","wires":[]},{"id":"13a77a4b.ec5886","type":"rpi-gpio out","name":"","pin":"22","set":true,"level":"1","out":"out","x":647,"y":265,"z":"c3aed0d3.3ce58","wires":[]},{"id":"758c7e63.8a738","type":"rpi-mouse","name":"","butt":"1","x":141,"y":180,"z":"c3aed0d3.3ce58","wires":[["7cc51837.833ae8","b0ffa63.f4f0058"]]},{"id":"e612061e.19edf8","type":"rpi-mouse","name":"","butt":"2","x":152,"y":350,"z":"c3aed0d3.3ce58","wires":[["24cc7b99.db3384"]]},{"id":"e0f46cb2.1f0b9","type":"http response","name":"","x":585,"y":720,"z":"c3aed0d3.3ce58","wires":[]},{"id":"a497caca.5b6838","type":"template","name":"","field":"payload","format":"handlebars","template":"<html>\n<head>\n  <meta charset=\"utf-8\">\n  <title>click button to open door</title>\n</head>\n<body>\n    <div class=\"login\">\n      <h1>click button to open door</h1>\n      <form method=\"post\" action=\"open_door\">\n         <p class=\"submit\"><input type=\"submit\" name=\"commit\" value=\"Open Door\"></p>\n      </form>\n    </div>\n</body>\n</html>","x":440,"y":719,"z":"c3aed0d3.3ce58","wires":[["e0f46cb2.1f0b9"]]},{"id":"40c50a2a.bf3af4","type":"http in","name":"","url":"/open_door","method":"get","swaggerDoc":"","x":224.5,"y":719,"z":"c3aed0d3.3ce58","wires":[["a497caca.5b6838"]]},{"id":"dfee3d9f.2011c","type":"http in","name":"","url":"/open_door","method":"post","swaggerDoc":"","x":228,"y":651,"z":"c3aed0d3.3ce58","wires":[["7cc51837.833ae8"]]}]

Flow Info

Created 9 years, 2 months ago
Updated 8 years, 9 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • comment (x3)
  • function (x2)
  • http in (x2)
  • http response (x1)
  • inject (x1)
  • switch (x2)
  • template (x1)
  • trigger (x2)
Other

Tags

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