InputPort problem setting PIN

This is my first experience using Electric Imp so this is probably a newbie mistake but could someone help me figure out why my code is not changing the state of the LED. I am using the HTTP In node in the planner to send a value to an input in the code below…

`
// Control the LED from an outside input

class input extends InputPort
{
name = "LED Control Input"
type = “number”

function set(value)
{
    server.log("Input Value Received: " + value);
    
    if (value)
    {
        server.log("Turning ON the LED");            
        hardware.pin8.write(1);
    }
    else
    {
        server.log("Turning OFF the LED");
        hardware.pin8.write(0);
    }
}

}

// Configure pin 8 as an open drain output with internal pull up
hardware.pin8.configure(DIGITAL_OUT_OD_PULLUP);

// Register with the server
imp.configure(“Control LED”, [input()], []);

`

Upon sending a request to the URL provided in the HTTP In node settings, I am getting the following lines written to the log. It seems like no matter what I send it, I am getting the value 1 in my InputPort set() function. Is there anything I need to know about how to construct the POST request and sending the “value” parameter?

9/11/2013 10:56:12 PM: Downloading new code 9/11/2013 10:56:13 PM: Device configured to be "Control LED" 9/11/2013 10:56:32 PM: Input Value Received: 1 9/11/2013 10:56:32 PM: Turning ON the LED 9/11/2013 10:56:53 PM: Input Value Received: 1 9/11/2013 10:56:53 PM: Turning ON the LED 9/11/2013 10:57:03 PM: Input Value Received: 1 9/11/2013 10:57:03 PM: Turning ON the LED 9/11/2013 10:57:12 PM: Input Value Received: 1 9/11/2013 10:57:12 PM: Turning ON the LED 9/11/2013 10:58:00 PM: Input Value Received: 1 9/11/2013 10:58:00 PM: Turning ON the LED 9/11/2013 10:58:09 PM: Device booting 9/11/2013 10:58:09 PM: Device configured to be "Control LED" 9/11/2013 10:58:13 PM: Input Value Received: 1 9/11/2013 10:58:13 PM: Turning ON the LED

If anyone could help me with this I would really appreciate it. I am stumped!

Thanks,
Brian

You should use the URL of the HTTP IN block and append “?value=0” to get a zero.

Hugo,
It is working now. I swear I tried that and it didn’t work but something else must have been different at the time.

Thank you for your quick response! Much appreciated.

Brian