Simple First Analog Read

Hi, I have a reed switch connected to a Photon. I want to read and publish the voltage of the circuit with the reed switch. here is a small extract of the code:

switchValue = analogRead(A7);
    Serial.println(switchValue);
Particle.publish("Value", String(switchValue));

This works, but when i goto the Particle Console to see the output I get:
Event name “Value”. Which is correct
Data as “Null” instead of the voltage readout between 0 and 4095

Any idea how i can actually see the output instead of Null?
Thanks
MGM

So you do get sensible data over serial?
Any chance we could see your entire code? Preferably shared with the share link from the web IDE.

@teppich, how is your read switch connected (power, pin)?

Why use analogRead() and not digitalRead() for a reed switch?
You may also want to publish the event as PRIVATE