Eliminating duplicate values before plotting | ThingSpeak Projects | 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
Eliminating duplicate values before plotting
No permission to create posts
August 22, 2019
1:05 pm
Avatar
maximelanoelle
New Member
Members
Forum Posts: 4
Member Since:
July 12, 2018
sp_UserOfflineSmall Offline

Hello all,
I am collecting sensor data that I am plotting to Thingspeak.
A particular sensor gives me 0 or 1 depending on the status of an electrical relay.
I am recording the time when the relay turns ON (value 1). Then I want confirmation that the relay turned OFF (value 0). This is expected to happen twice a day, every day.
Although I am keen to record / display the data to ensure the relay goes ON and OFF when it needs to, I am trying to minimise the data plotted as I have more than one sensor, and the website where I display the plots struggles due to the number of points.
I am aware of the min / max function that allows to eliminate "bad" data, but I need to see both 0 and 1 in my case, so this isn't an option unfortunately. I also cannot use the average function since I wouldn't know if I could have missed a "relay=ON" event.
Is there an easy way to only plot points that are different from one time iteration (t) to the next (t+1)? This would minimise significantly the number of points I want to display.
I am already using all the fields possible in my channel, so I don't think I can do a calculation in Matlab to then write onto a new field.
If removing duplicates is not an option, do you have any other suggestions?
Many thanks in advance.
Max

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
20 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:

Hema, askask, Rakwireless, budiardi basuki, oliver009, shelby1234

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457