ThingSpeak not picking up 3-value sensors

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

ThingSpeak not picking up 3-value sensors

#1 Post by andy » 26 Apr 2016, 20:42

I've got a momentary switch between GPIO 4 and GND, but am reading it like a pulse counter. It's working so far (have to set mSec Debounce to 2000), but my problem is getting the values to ThingSpeak.

The Pulse Counter returns three values: Count, Total, and Time. Count is the number of counts received in some measure of time, Total is total counts received, and Time is apparently a random number (I'm sure it's not, just don't know what it is).

In ESPEasy, I've got the task IDX set to 1, and in ThingSpeak chart 1 brings up Count; so far so good. The problem is there is no data reported for Total or Time on charts 2 and 3 respectively. These values are being reported correctly on the ESPEasy Devices page, and I'm getting EVENT: #Count and EVENT: #Total reported in the serial log. Strangely, I'm not getting EVENT: #Time value in the log, but I don't care about the time in this case.

Is there a bug in _P003_Pulse.ino, or is _C004.ino failing because there are three values reported?

andy
Normal user
Posts: 65
Joined: 26 Jan 2016, 23:07

Re: ThingSpeak not picking up 3-value sensors

#2 Post by andy » 17 May 2016, 22:15

Bump - anyone?

Gareth.D
New user
Posts: 1
Joined: 17 May 2016, 23:39

Re: ThingSpeak not picking up 3-value sensors

#3 Post by Gareth.D » 17 May 2016, 23:49

I seem to be having a similar problem which I haven't solved yet.

I have 2 sensors for Temp Humidity and Pressure that work well using Espeasy sending the data via MQTT.

But when I send data to Thingspeak I only get one set of data appearing in its field and nothing in the other 2 fields
even thought they are setup correctly.

I think its down to Thingspeak only allowing data fields to change every 15 seconds, got to work out how to send data
at 15 sec intervals, and not all at once.

Hope this helps

dduley
Normal user
Posts: 93
Joined: 06 Feb 2016, 17:56

Re: ThingSpeak not picking up 3-value sensors

#4 Post by dduley » 18 May 2016, 00:57

Gareth.D wrote:I seem to be having a similar problem which I haven't solved yet.

I have 2 sensors for Temp Humidity and Pressure that work well using Espeasy sending the data via MQTT.

But when I send data to Thingspeak I only get one set of data appearing in its field and nothing in the other 2 fields
even thought they are setup correctly.

I think its down to Thingspeak only allowing data fields to change every 15 seconds, got to work out how to send data
at 15 sec intervals, and not all at once.

Hope this helps
All,
I have a temperature and pressure sensor that are communicating with Thingspeak just fine. Thingspeak indeed will only allow a 15 second update rate but you can update up to 8 channels at a time. The trick for Gareth to try is to make sure that the message delay in Tools\Advanced is set to 15000 or greater. The problem Andy is having, is with the counter plugin. This plugin is buggy and does not transmit all the data to thingspeak. Also formulas do not work etc. The counter plugin is definitely not ready for prime-time yet. I have been wanting to use the counter plugin to read a water meter and it has the same problem that Andy reports. I have another unit that is measuring temperature and pressure with a Bosch sensor and it transmits to Thingspeak without a hitch. You need to number your IDX values correctly as well as setting the message delay. If you have a temperature sensor set up, set its IDX value to anything from 1 thru 8. The pressure value with show up as IDX Value + 1. If you have a task following the temperature sensor its IDX value must be temperature IDX+2. If the temp sensor IDX is 1 the next available IDX value needs to be 3. Is that clear as mud? :D The IDX values correspond to the Field numbers on Thingspeak.

I hope that helps

Regards

Dave

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests