Quantcast
Channel: ThingSpeak IoT Community - All Forums
Viewing all articles
Browse latest Browse all 1833

piajola on No data ---> React ---> Tweet ---> Not working (?)

$
0
0

Hi H,

If you have a channel that can be cleared you can tell both if this code works Wink Only to clear your Mystery ... 

I hope this code see how old is the last recorded data point and send the email if this time is older than you wish

 

t1 = datetime('now','TimeZone','America/Lima')      % use your TimeZone What time is it "right now" (local) when running this

t = t1 - hours(1)- minutes(13)            % here 1 hour 13 minutes without data to send the email, your choice

[Data,Taim] = thingSpeakRead(116592, 'fields', [1,2,3,4]);

Taim                  % to see the time of your last recorded point you can erase this line

manda=Taim<t

if manda
      response = webwrite('http://api.pushingbox.com/pushingbox?devid=v0A76B1D431104BF','data','tekstfeZZZZZke')
end

 

I think this is enough if you only want to know if your recording is stopped. Share if it works maybe others like to know


Viewing all articles
Browse latest Browse all 1833

Trending Articles