I want to strip down my code to see if it’s something I’ve done that’s causing this. Is there a way to save a second codebase to the same imp/model, and then switch between the two. Can’t see how it would be done in the IDE…
OK, I’m feeling really stupid now, but I can’t see where to create a new model. I can click on the existing model and change its name, but don’t seem to have any other options. Sorry!
Thanks for that. I can see now that when you start typing in the search box it does come up with a message saying “create a new model” - I just wasn’t typing in the search box as I thought I was in the wrong place!
I seem to be having a similar issue with device.isconnected() I can shut off the device, and the call still returns true. Is there documentation on how long the timeout is?
I have a reverse issue.
I have my device monitored for uptime. part of the code is below.
Every now and then, it starts reporting it is disconnected, though it is still dumping data into xively.
Problem seems to go away after a reboot, maybe also spontaneously.
How often are you checking device.isconnected()? The device may be disconnected at the point where this connection check happens, but the imp itself will try very hard to connect if you tell it to send data (and have default policy set).
The monitoring (Nimsoft) calls the agent, which executes the code above (amongst others), every 5 minutes.
The device is AC powered and happily reports its status every 60 seconds to Xively.
I have this documented.
Just today it was not ‘isconnected’ for a while. power cycling the device did not change the situation. ‘Build and run’ did.
I’ve been told there’s more work going on in this area; for now if you want to ensure a client is there, ping it with a device.send() and get it to send you a reply.
OK. Keep us posted.
My application is actually a data logger, so I could look at data staleness.
However, stale data would be a derived indicator, which would give limited visibility in actual failure modes.
How about timestamping new readings (either at the imp end before sending, or at the agent end when received)? This is also a good way to measure freshness.