When trying to get the DS18B20 one-wire temp sensor working with the NodeMCU Lua firmware make sure you have compiled the firmware with said one-wire module..
DOH!!!
Pop along to https://nodemcu-build.com/ and make sure the 1-wire box has a tick..
:-\