Remotely turning on and off an output

Hi guys,

I am working on this same thing. It was working fine off the bat but after some hours (not sure how many yet ~12) my http requests no longer talk to the imp. I wonder if I am no longer in shallow sleep?

Hugo (or anyone else), could you take a peek and let me know if there is something obviously wrong with my code snippet. I attached a text file to this post. I saw something about garbage collection and vars in discussions.



I’ll try and put my samples up on bitbucket this weekend for the moodball. Basically I send a http post with a value of 91 and pin 9 goes high, send a post with 90 and pin 9 goes low , etc

This code looks fine, but I suspect your NAT timeout is catching you. Until the client-initiated ping stuff goes in (likely release-13) then you need to add a watchdog, something like this:

function watchdog() {

// start watchdog write every 60 seconds

…that should ensure everything stays open for now.

I will try it, thanks Hugo!

Also I’ll look out for your bitbucket code snips AJ.