I started with home assistant then moved to node red. Both have rich communities and plugins. If you want to do more javascript, use node red.
node-red is available as a hass.io add-on [1], with the Home Assistant node-red plugin pre-installed
First seal to see Then seal to control
Home assistant is the "see" bit. Then you use it (or something else) to control the process