First Stab at a an agent - wrong number of parameters

I have an arduino Imp Sheild which has led’s on pins 8 and 9. So a simple test is to rejig the Getting Started code to turn these on and off, rather than those on a bread board. All looks good, but when I call the url:

https://agent.electricimp.com/YYYYYY-XXXXXX?led=1
(obviously my url is used)

I get the following message int the log file:

2013-11-24 17:19:41 UTC+0: [Device] ERROR: wrong number of parameters
2013-11-24 17:19:46 UTC+0: [Power State] Power state: online=>offline
2013-11-24 17:19:52 UTC+0: [Power State] Power state: offline=>online
2013-11-24 17:19:52 UTC+0: [Status] Device booting
2013-11-24 17:19:52 UTC+0: [Status] Device configured to be “LED Api”

Any ideas would be appreciated.

Kevin

That log is from the device, so something is going wrong there. As the log says, you are not passing the function the correct number of parameters. Could we see all of your agent and device code? If you are using the functions to talk between the agent and the imp you need to pass at least two parameters to each function, either a string and a function or a string and a variable, depending on which you are using.

Problem solved. The callback function bound to the message listener did not contain a parameter to pick up the message payload:

// listener
agent.on(“led”, toggle);

callback method was toggle(), changed to toggle(ledState)

Thank you.