The code mostly monitors the sensor, counts the number of "events" during a time interval (in this case 2 minutes) and then sends the number of events to IFTTT maker channel
it has a filter to remove "zero" entries
I discovered it is pretty tricky to use digital inputs in nodemcu which are not pulled HIGH by default (my sensor is LOW by default)
It even changes from pin to pin -- pin 2 did not work for me, but D3 did.
The pin is pulled low by a 1K resistor, I tried higher values with bad results.
Currently when sensor is LOW the voltage on the pin is ~1.7V and when HIGH ~2.1V
this is barely adequate and I hope to get it working more reliably.