Hi there,
I am Ahmed an electrical engineer,
I have read your project requirements and i have took a look at your python code, we need to transform that to lua code so that it will works with nodemcu, i will try my best on this, contact me over chat and let's dicuss this project