# Plant Factory for agriculture

**URL:** <https://discourse.nodered.org/t/plant-factory-for-agriculture/5891>\
**Category:** General\
**Created:** [17 December 2018 16:05 UTC](https://discourse.nodered.org/t/plant-factory-for-agriculture/5891 "2018-12-17T16:05:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [18 December 2018 08:45 UTC](https://discourse.nodered.org/t/plant-factory-for-agriculture/5891/4 "2018-12-18T08:45:04Z")

</div>

Have you thought about using a Finite State Machine (FSM) ?  
It might be a bit of an overkill for what you are trying to do, but would seem to answer your requirement.  
I created a write-up about FSMs on 'Share Your Projects' earlier this year.  
Here's the link.

> [@Finite State Machine (FSM) - UK traffic lights](https://discourse.nodered.org/t/finite-state-machine-fsm-uk-traffic-lights/1580):
>
> [UK traffic lights and FSM](http://resources-area.co.uk/node-red-flows/traffic_lights_and_fsm.pdf) The above link will take you to a tutorial about Finite State Machines (FSM). The model is based on the UK traffic light sequence. Here's a link to the Node-RED flow. [Node-RED flow](http://resources-area.co.uk/node-red-flows/fsm_traffic_lights.txt) Trust you enjoy reading the tutorial.

There's also a Node-RED node written by @cflurin that implements dynamic FSM.

> **[node-red-contrib-dsm](https://flows.nodered.org/node/node-red-contrib-dsm)**
>
> A dynamic state machine node based on the finite state machine model.

---

_[View the full topic](https://discourse.nodered.org/t/plant-factory-for-agriculture/5891)._
