Hi all,
I have a power meter sensor (MT681 EHZ, 3 values) reading every second. The result is also displayed in a webpage, also every second. That displays a real time power consumption in my home.
In order to push the values to ThingSpeak, I need to set the MessageDelay to 15 seconds. Its a ThingSpeak requirement.
When sending to ThingSpeak starts, the EasyESP pauses 15 seconds between the GET requests of each value- as it should.
Sadly, it also pauses everything else but background tasks (OTA and UDP) too. My sensor and the webpage do not get updated.
Q: is that really the intended behaviour or should'n we rather have a non blocking message queue ?
Q2: I did some more digging in the code. Seems like using thingspeak, each sensor transmits all vallues in one http request. The 15000 ms Message delay is therefore uselsee if I do not poll the sensor more often than 15s.
Is this setting then correct?
Device delay: 600s. ( Sensor gets polled every 10 minutes)
Message delay 0,
Send to controller (ThingSpeak). yes
ThingSpeak upate delay blocks system
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: ThingSpeak upate delay blocks system
I noticed this odd behavior as well. My fix was to NOT use a thingspeak controller. This is what i did.
1. sore the energy data in a quad dummy device.
2. Send the data with a SendToHTTP command. This can be set up in a rule that is triggered by a timer.
If you want ill post the rules i use for my setup tomorrow? Just ask
Regards
Ray
1. sore the energy data in a quad dummy device.
2. Send the data with a SendToHTTP command. This can be set up in a rule that is triggered by a timer.
If you want ill post the rules i use for my setup tomorrow? Just ask
Regards
Ray
-
- Normal user
- Posts: 36
- Joined: 21 Oct 2017, 20:49
Re: ThingSpeak upate delay blocks system
That would be nice. Thanks.
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: ThingSpeak upate delay blocks system
Sorry for the delay.
My rules setup. I run these by sending event, SerialSend through the serial port, i guess you can run from a timer instead.
My devices (only FIELDS1-4 shown) Notice that the dummy devices are disabled BUT you can still read and write to them. Disabling them stopped them from running every x seconds.
My rules setup. I run these by sending event, SerialSend through the serial port, i guess you can run from a timer instead.
Code: Select all
//----------------------------------------------------------------------------------------------------------------------
on SerialSend do
SendToHTTP 184.106.153.149,80,/update.html?key=FIXDUF4VI6PUC8P0&field1=[FIELDS1-4#TotalL]&field2=[FIELDS1-4#FlowRate]&field3=[FIELDS1-4#TxBatteryLevel]&field4=[FIELDS1-4#NoFlowPeriods]&field5=[FIELDS5-8#ChargeStatus]&field6=[FIELDS5-8#RxWiFiSignal]&field7=[FIELDS5-8#CH7]&field8=[FIELDS5-8#CH8]
event,Acknowledge
endon
//----------------------------------------------------------------------------------------------------------------------
on Acknowledge do
Pulse,12,1,100 //Turn LED ON for a period
Delay 100
Pulse,12,1,100 //Turn LED ON for a period
Delay 100
Pulse,12,1,100 //Turn LED ON for a period
Delay 100
Pulse,12,1,100 //Turn LED ON for a period
Delay 100
Pulse,12,1,100 //Turn LED ON for a period
endon
//----------------------------------------------------------------------------------------------------------------------
You do not have the required permissions to view the files attached to this post.
-
- Normal user
- Posts: 144
- Joined: 12 Oct 2017, 12:53
- Location: Philippines
Re: ThingSpeak upate delay blocks system
OOps, correction.
You do not have the required permissions to view the files attached to this post.
-
- Normal user
- Posts: 36
- Joined: 21 Oct 2017, 20:49
Re: ThingSpeak upate delay blocks system
Thanks for the info. There is - at least it seems - a simpler solution for me.
I want to post to thingspeak:
- one quad sensor (humidity / temperture / absolute humidity / ventilation)
- system info uptime
- system info free memory
Limitation on thingspeak is that you only send a message every 15 seconds.
I update the sensor values every 10 minutes (sensor delay). The thingspeak controller collects all four values from the quad sensor and sends them in one request. So no trouble here.
When I update the system info variables I simply choose 10 Minutes + 16 seconds and 10 minutes and 32 seconds. The occasions on which I run into the 15 seconds limitation are very rare then. It only happens every 6 hours for a single value.
If you set all sensor delays to the same value, only the first thingspeak request goes through- every time.
I want to post to thingspeak:
- one quad sensor (humidity / temperture / absolute humidity / ventilation)
- system info uptime
- system info free memory
Limitation on thingspeak is that you only send a message every 15 seconds.
I update the sensor values every 10 minutes (sensor delay). The thingspeak controller collects all four values from the quad sensor and sends them in one request. So no trouble here.
When I update the system info variables I simply choose 10 Minutes + 16 seconds and 10 minutes and 32 seconds. The occasions on which I run into the 15 seconds limitation are very rare then. It only happens every 6 hours for a single value.
If you set all sensor delays to the same value, only the first thingspeak request goes through- every time.
Who is online
Users browsing this forum: Amazon [Bot], Anthropic Claude Bot [bot], Bing [Bot], Perplexity.ai [bot] and 18 guests