urlfilter stopped working with strfind error | MATLAB IoT Analytics | Forum

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
urlfilter stopped working with strfind error
No permission to create posts
September 13, 2018
8:39 pm
Avatar
svinzant
New Member
Members
Forum Posts: 2
Member Since:
January 27, 2016
sp_UserOfflineSmall Offline

I had an email that my MatLab Analysis stopped working today around 11:35AM
The general error is:
Error using strfind
Inputs must be string scalars or character vectors.
Error in urlfilter
Error in Scrape AmbientWeather.net (line 11)
DataSet = urlfilter(URL, 'winddir', 20)

This has been working fine for months. Now I can't get it fixed for the life of me. I have been all over the map looking at and trying code examples with no luck.
Any help would be greatly appreciated.
My (redacted) code is listed below.
---------------------------------------------------------------
% WriteChannelID
WriteChannelID = NNNNNN;

% WriteAPIKey
WriteAPIKey = 'ABC123';

% URL Setup
URL = 'https://api.ambientweather.net/v1/devices?applicationKey=ZYX&apiKey=098';

% Data Collection
DataSet = urlfilter(URL, 'winddir', 20)

% Display All Data
display(DataSet(1),'Wind Direction');
display(DataSet(2),'Wind Speed - MPH');
display(DataSet(3),'Wind Gust - MPH');
display(DataSet(4),'Maximum Daily Wind Gust - MPH');
display(DataSet(5),'Outside Air Temperature - F');
display(DataSet(6),'Outside Humidity');
display(DataSet(7),'Hourly Rain Rate - Inches');
display(DataSet(8),'Daily Rain Total - Inches');
display(DataSet(9),'Weekly Rain Total - Inches');
display(DataSet(10),'Monthly Rain Total - Inches');
display(DataSet(11),'Yearly Rain Total - Inches');
display(DataSet(12),'Total Rainfall - Inches');
display(DataSet(13),'Inside Air Temperature - F');
display(DataSet(14),'Inside Humidity');
display(DataSet(15),'Relative Barometric Pressure - Inches of Mercury');
display(DataSet(16),'Absolute Barametric Pressure - Inches of Mercury');
display(DataSet(17),'UV');
display(DataSet(18),'Solar Radition - w/m2');
display(DataSet(19),'Outside Temperature Feels like - F');
display(DataSet(20),'Dew Point');

%Write eight parameters of data
thingSpeakWrite(WriteChannelID, {DataSet(1),DataSet(2),DataSet(5),DataSet(6),DataSet(7),DataSet(8),DataSet(15),DataSet(19)}, 'Writekey', WriteAPIKey)
------------------------------------------------------------
Attached is a screenshot of the output from the AmbientWeather api.

If you need additional info, please let me know and I will track it down or explain in more detail.
Thanks!
ScottAW-1.PNGImage EnlargerAW.PNGImage Enlarger

sp_PlupAttachments Attachments
September 14, 2018
11:41 am
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 477
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

We are able to reproduce this problem and we are working a resolution. We will post in the forum when it has been resolved.

September 14, 2018
12:47 pm
Avatar
svinzant
New Member
Members
Forum Posts: 2
Member Since:
January 27, 2016
sp_UserOfflineSmall Offline

One thing I have noted, my other MatLab Analysis that DOES work is only using "http", whereas the one that is NOT working uses "https".
It is certainly something in the "urlfilter" command, maybe something with the way input is handled? Or something with the way secure http is dealt with.
If there is a way to chat/message privately, please contact me and I can share my complete api keys with you for further testing on your end.
Thanks!
Scott

September 14, 2018
3:27 pm
Avatar
cstapels
Moderator
Members


Moderators
Forum Posts: 477
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

The issue has been resolved, please let us know if you continue to see the issue. Be sure to refresh your browser before testing. I think you have provided enough information for us to recreate the experiment. Thanks for the helpful information. We will reach out if we need more information.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
39 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

JaketripDernnida, KenterDernnida, AlisaMiz, AriurinDernnida, KabinaDernnida, lakishakm3

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457