@strixx
BEFORE YOU USE analogRead()
You need to be aware that the MySensors core Ver 2.2 has code to support sensors reporting the chip VCC voltage. As I recall, this code is enabled by default and all readings of the analog port will return 65,535, -1 or hex FFFF, depending on the type of variable you read the value into regardless of what voltage is applied to the analog pin. MySensors has changed the 8266 configuration to read the chip VCC and ignore the analog input and I gather the MySensors coders decided to return 65,535 as an indicator.
You will need to do a search for "ESP analog read" or similar, to find the correct syntax of the special command to change the 8266 mode to re-enable reading of the analog input pin. Note: this analog mode command must be placed at the top of your script before any other functions.
DIFFERENT NodeMCU BOARDS
Please be aware the analog pin 'hardware' varies with different NodeMCU devices and you need to understand how the MySensors restricts how you can use this pin.
First, I have encountered three different 'NodeMcu Ver 1' boards. Traditionally the analog pin expects a range 0V to 1V max. Some docs state going over 1V can destroy the pin, others state it can tolerate 0V to 3.3V but the anagloRead() for voltages of 0V to 1V are as expected, but 1V to 3.3v returns the same value.
On the earlier boards I received, the analog pin of the PCB was wired direct to the 8266 chip (in the metal can) and not connected to anything else.
About a year ago, the boards I received had additional circuitry to protect the analog pin from excess voltage.
More recently I have received a batch of 20 boards which returned values lower than expected? Suspecting a board problem, I traced the circuit and confirmed there is a voltage divider which scales an input of 0V to 3.3V to become 0V to 1V at the actual 8266 chip. I.e. these boards requiire a 0V to 3.3V input on the analog pin. If you code reads values about one third of what you expeted, you may have a 0V to 3.3V board.
VALUES NOT CONSISTENT
As a final tip, I have noticed that no two NodeMCU's return the same value from the analog port. I.e. five 'identical' boards from the same batch will return slightly different values, unlike the Arduino devices, which I find all return accurate readings.
My assumption is, this is due to the 8266 using a different analog to digital conversion method, and the errors are 'possibly' due to some capacitive effect. The differences or minimal, can can be confusing and may need special attention if you are checking for a 'specific' value. Hint: always code analogRead comparisons to look for different 'ranges' of values, rather than "if analogRead(A0) == 350", because the value you get today could be different tomorrow or next week. This is good practice because the value read will vary slightly as your project's supply voltage changes due to changes in load (e.g. several LEDs turned on vs off), or even if your battery or even mains voltage is unstable.
Hope this saves someone banging their head against a brick wall for hours like I did.
Paul