Group Abstract Group Abstract

Message Boards Message Boards

0
|
10K Views
|
1 Reply
|
3 Total Likes
View groups...
Share
Share this post:
GROUPS:

Watch a databin for new entries?

Posted 9 years ago
POSTED BY: Ville Saalo
Posted 9 years ago

Dear Ville,

This is a simple demo on how this can be done.

I've set up the following wolfram language script and left it running in a raspberryPi.

CloudConnect["user@domain.com","password"]; 
db=Databin["databinID"];
count=db["EntryCount"]; 
latestCount=count;
While[
    FindFile["quit.txt"]==$Failed,  
    latestCount=db["EntryCount"];
    If[latestCount>count, SendMail["Record added in DataBin @"<>DateString@Now];
    count=latestCount;];
    Pause[10];]
    DeleteFile["quit.txt"]

You could use other methods to interrupt the process that we'll trigger in the raspberry Pi instead of checking for the file. Try out the new Channel-Comm to play with this.

enter image description here

From my computer I added a record in the databin

DatabinAdd[db, 666];

The script detected the increase in recordcount of the bin and send me a message back to my registered email address.

enter image description here

POSTED BY: Diego Zviovich
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard