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

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

$
0
0

This is so strange, The other channel I have that is not public (it is not secret, just private) is doing almost the same thing as this one and the code is the same. I have received two mails today because of crash. Works amazing.

Then I have the Wemos... I used the code below, same I get from you (I also have not removed my keys) and still get error when I make it crash (pull the electricity). Before the crash it works fine, I get a lot of Data. It is when it crash it goes bad. I get the error:

 

t1 =

20-May-2016 19:24:01

t =

20-May-2016 19:15:00

Data =

[]

Taim =

[]

lin =

0

Comparison is not defined between double and datetime arrays.

I don´t understand the problem they tell me.

 

The code:

t1 = datetime('now','TimeZone','Europe/Berlin') % use your TimeZone What time is it "right now" (local) when running this
t = t1 - minutes(9) - seconds(second(t1))
% Hour 5 min less 00 sec i.e. before "right now"
% 'ReadKey','9KEQ8XZZZZZXNYD1WDOR3L'
[Data, Taim] = thingSpeakRead(116592,'numminutes',9, 'fields', [1,2,3,4])
% As I check every 5 minutes then I read the last 5 minutes
lin=length(Taim)
% How many lines in Taim array (if I send each minute must be 5 lines if all O.K.)
sumi=sum(Taim>t)
% Count how many lines in Taim array are "newer" than t i.e. data arrived
%So sumi tells me how many data points recognize ThingSpeak. Now tell me, in my case via SMS to my phone (regular 2G, no 3G needed)
if sumi<=5
response = webwrite('http://api.pushingbox.com/pushingbox?devid=v0A76B1D431104BF','data','tekstfeZZZZZke')
end


Viewing all articles
Browse latest Browse all 1833

Trending Articles