HTTP In Node Issue

Hello All,

I’m brand new to the Electric Imp and Squirrel and I am trying to read in a String that is POSTed using this simple HTML form:

`

Select state: On Off
`

My Squirrel code is:

`
// April controlling power

class PowerController extends InputPort{
name = "Power Controller"
type = “string”

function set(value){
    server.show("Value: "+value.value);
    if(value == "ON"){
        hardware.pin1.write(1);
    }
    else if(value == "OFF"){
        this.pin1.write(0);
    }
}

}

hardware.pin1.configure(DIGITAL_OUT);
hardware.pin1.write(1);
server.log(“Power Controller Started!”);
imp.configure(“Power Controller”, [PowerController()], []);
`

In the Planner, when I create a link from the HTTP In node to my Power Controller, it says that the data types are “number” for the HTTP In node and “string” for the Power Controller node. When I submit my form, the value displayed is 1. Am I missing something here? Do I have to do some sort of conversion in the PowerController’s set function? Thanks in advance!

==UPDATE==
Decided to start working on me…Not sure why but I am a happy camper :slight_smile: