Sending out email when event occurs not on some interval

조회 수: 2 (최근 30일)
vladimir gershman
vladimir gershman 2023년 11월 7일
댓글: vladimir gershman 2023년 11월 7일
Hi,
TimeControl App allows sending email on a givent interval. Can i send email as soon as i see a change in my data channel? for example if a voltage is exceeded, can i send out email right away?

채택된 답변

vladimir gershman
vladimir gershman 2023년 11월 7일
hmm. not there yet. I'd like ot access field 5 and i did:
DoorData = thingSpeakRead(2316538,readKey='xxxxxxxxxxxxxxxx', 'Fields',[1,5]);
but got error:
Error in /users/mss.system.nuncGe/Read Door Status Line: 22 Column: 63
Unsupported use of the '=' operator. To compare values for equality, use '=='. To pass name-value arguments using the name=value format, provide these arguments after all other inputs.
thanks
  댓글 수: 2
Christopher Stapels
Christopher Stapels 2023년 11월 7일
편집: Christopher Stapels 2023년 11월 7일
My bad. Dont mix the syntax types. I edited my original post to fix
data = thingSpeakRead(99998565,readKey='xxxxxxxxxxxxxxxx', Fields=[1,4],...);
%or
data = thingSpeakRead(99998565,'readKey','xxxxxxxxxxxxxxxx', 'Fields',[1,4in ],...);
In fact, even the other syntax combination worked, just not the way I did it.
Even this works
,...'ReadKey','xxxxxxxxxx',fields=[1,5]);
vladimir gershman
vladimir gershman 2023년 11월 7일
That works. Also, I was using API key from my profile, not the one assigned to each Channel. Very sorry. Now i get 401 errror, but let me fight this one.
Thanks a lot.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Christopher Stapels
Christopher Stapels 2023년 11월 7일
Definitely! Use the React app. You can check the data on a regular schedule (kinda like time control) or use 'on data insert' for the fastest response. Keep in mind that there are limits on the frequency of sending alerts and tho total number of alerts per user for a license year.
  댓글 수: 4
vladimir gershman
vladimir gershman 2023년 11월 7일
I think i got it. I use react to get the immidiate action and Matlab Analysis method to send out the email.
I tried it, but i get an error reading private channel. It is not clear to me from the examples how to read private channel fields, but i am trying below:
DoorData = thingSpeakRead(ReadKey = 'channel Read API key', Fileds=5);
and get and erro:
Error using Read Door Status Channel ID must be a positive integer.
Thanks
Christopher Stapels
Christopher Stapels 2023년 11월 7일
편집: Christopher Stapels 2023년 11월 7일
*edited The first argument of thingSpeakRead is the channel ID, like this
data = thingSpeakRead(99998565,ReadKey='xxxxxxxxxxxxxxxx', Fields=[1,4],...)

댓글을 달려면 로그인하십시오.

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 Read Data from Channel에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by