I tried 3 times to use the script but it failed all 3 times. I don't remember where it failed but it would hang and generate kernel error messages. I finally used apt-get to install it. The script worked last month when I used it for the SD card that works.
nodejs v10.15.2 on both systems.
Flow attached.
[{"id":"f1d0ee65.185938","type":"tab","label":"ESP32 Flow","disabled":false,"info":"> test"},{"id":"ff641b2b.d4e248","type":"ui_button","z":"f1d0ee65.185938","name":"Status Button","group":"6189c2aa.ecad8c","order":3,"width":"3","height":"1","passthru":false,"label":"Status ?","tooltip":"Displays current door position","color":"","bgcolor":"{{background}}","icon":"","payload":"","payloadType":"str","topic":"","x":740,"y":100,"wires":[[]]},{"id":"876ed58d.9cae28","type":"mqtt out","z":"f1d0ee65.185938","name":"Publish Node","topic":"","qos":"2","retain":"false","broker":"e563d5b9.14f0c8","x":750,"y":180,"wires":[]},{"id":"1f84dcb9.232fc3","type":"ui_button","z":"f1d0ee65.185938","name":"Door Button","group":"6189c2aa.ecad8c","order":6,"width":"3","height":"1","passthru":false,"label":"Operate","tooltip":"","color":"","bgcolor":"{{background}}","icon":"","payload":"pressed","payloadType":"str","topic":"esp32/door/button","x":330,"y":120,"wires":[["b5a21d5b.1dcd38"]]},{"id":"513c9c66.ec1c8c","type":"ui_text","z":"f1d0ee65.185938","group":"6189c2aa.ecad8c","order":1,"width":"0","height":"0","name":"Door Status","label":"Door Status","format":"{{msg.payload}}","layout":"row-spread","x":530,"y":40,"wires":[]},{"id":"54d0980a.d015d8","type":"mqtt in","z":"f1d0ee65.185938","name":"Return Status","topic":"esp32/door/stat-return","qos":"2","datatype":"utf8","broker":"e563d5b9.14f0c8","x":330,"y":40,"wires":[["513c9c66.ec1c8c","2fa42f9c.e02d48"]]},{"id":"4a7113d2.b9620c","type":"mqtt in","z":"f1d0ee65.185938","name":"Beam","topic":"esp32/door/beam","qos":"2","datatype":"auto","broker":"e563d5b9.14f0c8","x":310,"y":320,"wires":[["5d30d4c1.1f58d4","51432b30.94f5f4"]]},{"id":"5d30d4c1.1f58d4","type":"change","z":"f1d0ee65.185938","name":"Beam State","rules":[{"t":"change","p":"payload","pt":"msg","from":"broken","fromt":"str","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"present","fromt":"str","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":340,"wires":[["f4b7117f.bd04a8"]]},{"id":"2fa42f9c.e02d48","type":"function","z":"f1d0ee65.185938","name":"Color State","func":"if(msg.payload == \"Door is open\") {\n msg.background = \"RED\";\n}\nif(msg.payload == \"Door is closed\") {\n msg.background = \"GREEN\";\n}\nif(msg.payload == \"A door switch is stuck closed\") {\n msg.background = \"#ffa100\";\n}\nif(msg.payload == \"Door is stuck\") {\n msg.background = \"#ffa100\";\n}\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":100,"wires":[["ff641b2b.d4e248"]]},{"id":"b5a21d5b.1dcd38","type":"ui_toast","z":"f1d0ee65.185938","position":"dialog","displayTime":"3","highlight":"","outputs":1,"ok":"OK","cancel":"Cancel","topic":"Operate Door?","name":"OK/Cancel","x":350,"y":180,"wires":[["d2203026.65547"]]},{"id":"d2203026.65547","type":"function","z":"f1d0ee65.185938","name":"Confirm","func":"var payload = msg.payload;\nif(payload == \"OK\") {\n msg.payload = \"pressed\";\n msg.topic = \"esp32/door/button\";\n}\nelse {\n msg.payload = null; // cancel\n}\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":160,"wires":[["876ed58d.9cae28"]]},{"id":"128abdd8.be9b6a","type":"e-mail","z":"f1d0ee65.185938","server":"mymailserver.com","port":"3585","secure":false,"tls":true,"name":"tester@zoogle.com","dname":"Mail Out","x":760,"y":300,"wires":[]},{"id":"51432b30.94f5f4","type":"change","z":"f1d0ee65.185938","name":"Msg Mod","rules":[{"t":"change","p":"payload","pt":"msg","from":"broken","fromt":"str","to":"Garage door has been opened. Burglary in progress.","tot":"str"},{"t":"change","p":"topic","pt":"msg","from":"esp32/door/beam","fromt":"str","to":"Door Alert","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"present","fromt":"str","to":"Garage door has been closed.","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":280,"wires":[["f4b7117f.bd04a8"]]},{"id":"8d18432a.5e6e28","type":"change","z":"f1d0ee65.185938","name":"Blink Flow","rules":[{"t":"change","p":"payload","pt":"msg","from":"on","fromt":"str","to":"true","tot":"bool"},{"t":"change","p":"payload","pt":"msg","from":"off","fromt":"str","to":"false","tot":"bool"},{"t":"set","p":"Blink","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":580,"wires":[[]]},{"id":"e41d53f9.6edc6","type":"inject","z":"f1d0ee65.185938","name":"Every 0.45 sec","topic":"","payload":"Blink","payloadType":"flow","repeat":"0.45","crontab":"","once":false,"onceDelay":0.1,"x":340,"y":640,"wires":[["2259bde5.3500a2"]]},{"id":"9823a5b.a89d258","type":"inject","z":"f1d0ee65.185938","name":"Every 1.15 sec","topic":"","payload":"Blink","payloadType":"flow","repeat":"1.15","crontab":"","once":false,"onceDelay":0.1,"x":320,"y":700,"wires":[["ea0b164d.85a6c"]]},{"id":"2259bde5.3500a2","type":"switch","z":"f1d0ee65.185938","name":"Blink == true","property":"Blink","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":530,"y":640,"wires":[["c2150d16.7bb888"]]},{"id":"ea0b164d.85a6c","type":"switch","z":"f1d0ee65.185938","name":"Blink == false","property":"Blink","propertyType":"flow","rules":[{"t":"false"}],"checkall":"true","repair":false,"outputs":1,"x":520,"y":700,"wires":[["305d859f.596cda"]]},{"id":"c2150d16.7bb888","type":"trigger","z":"f1d0ee65.185938","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"200","extend":false,"units":"ms","reset":"","bytopic":"all","name":"Fast Blink","x":720,"y":580,"wires":[["34905f9.06118a"]]},{"id":"305d859f.596cda","type":"trigger","z":"f1d0ee65.185938","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"600","extend":false,"units":"ms","reset":"","bytopic":"all","name":"Slow Blink","x":710,"y":700,"wires":[["34905f9.06118a"]]},{"id":"34905f9.06118a","type":"rpi-gpio out","z":"f1d0ee65.185938","name":"LED Blink","pin":"32","set":"","level":"0","freq":"","out":"out","x":760,"y":640,"wires":[]},{"id":"354fe11.d87389e","type":"comment","z":"f1d0ee65.185938","name":"","info":"Door Armed?, Blink Flow, Every 0.45 sec, Blink ==\ntrue, Fast Blink, Every 1.15 sec, Blink == false,\nSlow Blink, and LED Blink nodes are used to control\nthe flash rate of the Raspberry Pi panel LED. These\nnodes only respond to incoming arm messages from\nthe ESP32. If the arm button on the Raspberry Pi\nis pressed, it sends a message to the ESP32 to arm\nor disarm the system. The ESP32 takes the requested\naction and sends the result back to these nodes.\nThe Raspberry Pi receives the result, beeps the\ncorrect number or beeps, and sets the LED blink\ntime to the correct rate.\n\nDoor Armed?, Set Beep, One Beep, Delay 0.4s, One\nof Two, Two of Two, Alarm Beep, and Beep/Alarm nodes\nall control the arm/disarm beeps at the Raspberry Pi\n\nThe Beam, Beam State, and Beep/Alarm nodes set\noff the alarm buzzer on the Raspberry Pi when the\nsystem is armed and the garage door beam is broken.\n\nThe Beam, Msg Mod, and Mail Out nodes send a text\nmessage to the cell phone when the system is armed\nand the garage door beam is broken.\n\nThe Pi Arm Button, Button Pressed, and Publish Node\nnodes send a message to the ESP32 when the arm\nbutton is pressed on the Raspberry Pi. Each press\nof the button either arms or disarms the system.\nNote: See the very first note above for more\ndetails on the Pi LED flash and beep rate.\n\nDoor Button, OK/Cancel, Confirm, and Publish Node\nnodes control the door opening and closing from the\nweb interface page.\n\nReturn Status, Door Status, Color Status, and Status\nButton nodes update the status bar color and text\nmessage box icons on the web interface page.\n\n\nRaspberry Pi GPIO Assignments:\n32 - GPIO12 - LED blink\n35 - GPIO19 - Pi Arm Button\n37 - GPIO26 - Arm and alarm beeps\n","x":760,"y":520,"wires":[]},{"id":"fdb35ab1.88d5b","type":"switch","z":"f1d0ee65.185938","name":"Set Beep","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":320,"y":500,"wires":[["afb87b23.c38d08","f9ea2120.ce2ff8"],["dd9b4d0d.ebbab8"]]},{"id":"f250540f.bc85f8","type":"mqtt in","z":"f1d0ee65.185938","name":"Door Armed?","topic":"esp32/door/blink","qos":"2","datatype":"auto","broker":"e563d5b9.14f0c8","x":330,"y":580,"wires":[["8d18432a.5e6e28","fdb35ab1.88d5b"]]},{"id":"dd9b4d0d.ebbab8","type":"trigger","z":"f1d0ee65.185938","op1":"1","op2":"0","op1type":"num","op2type":"num","duration":"500","extend":false,"units":"ms","reset":"","bytopic":"all","name":"One Beep","x":520,"y":520,"wires":[["f4b7117f.bd04a8"]]},{"id":"f4b7117f.bd04a8","type":"rpi-gpio out","z":"f1d0ee65.185938","name":"Beep/Alarm","pin":"37","set":true,"level":"0","freq":"","out":"out","x":750,"y":400,"wires":[]},{"id":"afb87b23.c38d08","type":"trigger","z":"f1d0ee65.185938","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"200","extend":false,"units":"ms","reset":"","bytopic":"all","name":"One of Two","x":530,"y":460,"wires":[["f4b7117f.bd04a8"]]},{"id":"f9ea2120.ce2ff8","type":"delay","z":"f1d0ee65.185938","name":"","pauseType":"delay","timeout":"0.4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":330,"y":420,"wires":[["bd7df476.0aa86"]]},{"id":"bd7df476.0aa86","type":"trigger","z":"f1d0ee65.185938","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"200","extend":false,"units":"ms","reset":"","bytopic":"all","name":"Two of Two","x":530,"y":400,"wires":[["f4b7117f.bd04a8"]]},{"id":"adc1aaf4.8e2b6","type":"rpi-gpio in","z":"f1d0ee65.185938","name":"Pi Arm Button","pin":"35","intype":"up","debounce":"100","read":false,"x":330,"y":240,"wires":[["918a586b.7736a"]]},{"id":"918a586b.7736a","type":"change","z":"f1d0ee65.185938","name":"Button Pressed","rules":[{"t":"set","p":"topic","pt":"msg","to":"esp32/door/arm","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"1","fromt":"num","to":"on","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":220,"wires":[["876ed58d.9cae28"]]},{"id":"6189c2aa.ecad8c","type":"ui_group","z":"","name":"Garage Door","tab":"1bf0a2b5.1f8845","disp":true,"width":"6","collapse":false},{"id":"e563d5b9.14f0c8","type":"mqtt-broker","z":"","name":"MyPi","broker":"172.16.1.112","port":"1883","clientid":"pi","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"1bf0a2b5.1f8845","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]