Processing commands that interact with actuators in Node.js