This is the classical lower-case example from the node-red documentation but converted from Javascript to TypeScript. But why Typescript? Many, many reasons, for instance did you know that the ...
When you want to connect an IoT device to anything (or, for that matter, anything to anything), you should take a serious look at Node-RED, a free, open source visual process wiring system from IBM ...