Sending Agent Query response to device

Of course, now that I have my agent code working correctly, my device code errors when I hit the URL.

2014-10-15 20:26:49 UTC-7 [Device] ERROR: no handler for device.send()

The device code is really simple but of course, it’s still beating me !!

Phil

`// device code

zapper <- hardware.pin9;
zapper.configure(DIGITAL_OUT);
zapper.write(0);

function zapState(zState) {
server.log(zState)

    zapper.write(zState);

}
`

hooray… I got my code all working.

Thanks to everybody for your help.

I’ll be back with more questions I’m sure.

`// device code

zapper <- hardware.pin9;
zapper.configure(DIGITAL_OUT);
zapper.write(0);

function zapState(zState) {
server.log(zState)

    zapper.write(zState);

}

agent.on(“zapState”, zapState);`