I like the simplicity of this publish/subscribe service and Freeboard. Looks like Verizon feels the same way (see ThingSpace). The library works fine with one exception: the Stream function fails with status code 18.
The function has “reconnect” logic for status 28 but looks like the code was copied from the Twitter library without adjusting it for Dweet.io, see “stream(searchTerms, onTweet, onError);”.
Also, the instructions for getLatest should be changed from client.get to client.getLatest.
No, it fails after receiving multiple dweets. I changed the “reconnect” code (the parameters for the stream function and a check for code 18). Now I received a 52. if (resp.statuscode == 18 || resp.statuscode == 28 || resp.statuscode == 200) { server.log("Reconnecting...") stream(thing, callback);
Looks like adding a check for 52 (nothing was returned from the server) took care of the problem. Interesting that the reconnects are not random. Usually every 60 seconds, or exactly 2 min, 6 min, etc. Must be something on the Dweet.io side.