letscontrolit / ESPEasy

Easy MultiSensor device based on ESP8266/ESP32
http://www.espeasy.com
Other
3.22k stars 2.2k forks source link

Generic UPD controller - send only first value from sensor #1891

Closed jezikk82 closed 5 years ago

jezikk82 commented 5 years ago

Hi,

in the newest official build (Release mega-20181011) the is a problem with populating date by the controller. It only sent firs value from sensor.

Details: Sensor: BME280 or TSL2561 or SDS011 Controllers - Generic UDP Controller Publish: %sysname%%tskname%%valname%=%value%

Only first value from each of sensor is sent instead of 2 or 3 shown in UI. Previously on mega-20180126 works fine. Problem confirmed on updated and new unit.

TD-er commented 5 years ago

Can you give a screenshot of the controller settings? And please also press "save" on the settings page to check if it is still a problem. Do you also have an example/screenshot/log entry from the older version to show what the UDP data was sent before.

jezikk82 commented 5 years ago

See screenshot below: espeasy I dont have anything from old versions. I can share some statistics from Loxone (the reciever of the populated UDP data). Unfortunately, It'll be one by one value.

Look at issues #1835 - looks like similar problem.

TD-er commented 5 years ago

The only thing that really has changed is the check of the result value from portUDP.endPacket() See the code here: https://github.com/esp8266/Arduino/blob/d17ffc287493e76e7d6895c5c623ff4ae66baaa6/libraries/ESP8266WiFi/src/WiFiUdp.h#L70-L72

I've looked at other calls to endPacket() and the return value is never checked. So I guess the return value check should be removed.

jezikk82 commented 5 years ago

What I see is that the package with the same value is sent 10-12 times. Always it's the firs value from the sensor. In the mentioned code is only part of building udp package, but I think the problem is in getting values from sensor.

uzi18 commented 5 years ago

and sensor configuration?

jezikk82 commented 5 years ago

E.g: espeasy2

Config is exactly the same as in version from Jan.

If sensor has only one value (eg DS18B20) everything is ok, UPD package is sent only once. For sensors with more then one value (e.g. BME280) package is sent 11-12 times. Even when I create dummy device problem is the same. Only first value is populated.

TD-er commented 5 years ago

It is related to the part of code I showed.

In short, some controllers only send a single value at once. So the values are (now) collected at once and sent in sequence to the receiving end of the controller. If that fails, it will retry for N times (set in the controller settings) and if that fails, it will throw away the entire set of samples taken at a certain moment (thus the other values from that sensor).

It decides it failed by that test I posted. So I will now remove that check and thus for now make the number of retries for that controller useless. N.B. attempts without wifi connection active will not be registered as attempt.

jezikk82 commented 5 years ago

Yesterday I also tried the generic http controller and problem is exactly the same. Only firs value sent.

I know that values are sent one by one, my receiver log all incoming calls and I can confirm that there are no connectivity problems because everything else works fine. Number of resent packages is not connected with the max reties value. I checked it and always it's 11-12 packages received (ever if I have retries set to 5 and 15).

I created dummy devices with single values and everything is sent correctly, only one time. Repetitions only occur for sensors/dummmy device that have more them one value set.

Temporary workaround is to create dummmy devices for every value we want to sent out, fill them in with rules and sent by controller.

uzi18 commented 5 years ago

Try generic http advanced controller, it has capability to send bunch of data

jezikk82 commented 5 years ago

Sorry, I dont have backend to work with batch data and I dont have time to prepare/change env. For know I posted workaround which works, only limitation is number of 12 devices. In case you use HTTP GET notification you don't have that problem because you can sent this data by rules call.

TD-er commented 5 years ago

Since I'm already working on the same bug for Generic UDP, I will also look into this one. Does your receiving end reply with an acknowledgement? Generic HTTP controller waits for an acknowledgement. But if the receiving end is not sending an acknowledgement, the check for result will fail.

So maybe I should add a checkbox to the controller settings to explicitly check return values or ignore them.

jezikk82 commented 5 years ago

In UDP communication stack ACKs are not obligatory, however my receiver sent back ACK for received values. As I said, different values (sensors with single value to send) are ok (only once delivered to receiver).

TD-er commented 5 years ago

The check for result is currently also used for single value plugins, but worst-case scenario is the same is sent a number of times, but it will not be noticable in most systems which log the values.

stefbo27 commented 5 years ago

For me the UDP multivalue problem still exisits (a BME280 only sends temperature). In the log-file I see that all messages are created correctly, however only the first (Temperature) is sent (But 3 times). In the loop over all values of CPLUGIN_PROTOCOL_SEND (line51ff) the element.txt array is populated for element 0 to 2 (in the case of 3 values). In the do_process...queue method only the element.valuesSent element is sent. For my config valuesSent stays at 0. It should be incremented by checkDone but never is. Strange.... I uncommented the MustCheckReply so that the method always returns with checkDone(true);

TD-er commented 5 years ago

I will look into this tomorrow and setup some UDP receiver to be able to test it myself.

jezikk82 commented 5 years ago

Unfortunately, problem is still not fixed. Tested with yesterday release. In my case Temp value of BME280 is sent usually 10 time, even though I have set 5 tries if no ACK.

uzi18 commented 5 years ago

@jezikk82 please set logging level to DEBUG_MORE and paste log here

jezikk82 commented 5 years ago

183791: EVENT: Clock#Time=Thu,06:43 183807: EVENT: Clock#Time=Thu,06:43 Processing time:16 milliSeconds 184011: UDP : C010 connecting to 192.168.1.240:7000 184241: UDP : C010 connecting to 192.168.1.240:7000 184465: UDP : C010 connecting to 192.168.1.240:7000 184687: UDP : C010 connecting to 192.168.1.240:7000 184908: UDP : C010 connecting to 192.168.1.240:7000 185008: WD : Uptime 3 ConnectFailures 0 FreeMem 11824 185129: UDP : C010 connecting to 192.168.1.240:7000 185350: UDP : C010 connecting to 192.168.1.240:7000 185912: SensorSendTask() stats: Count: 9 Avg/min/max 103592.78/4140/362402 usec 185913: sendData() stats: Count: 7 Avg/min/max 67773.43/20297/91697 usec 185913: Compute formula stats: Count: 7 Avg/min/max 19.57/14/23 usec 185913: setNewTimerAt() stats: Count: 2066 Avg/min/max 347.93/299/461 usec 185914: Delay queue C010 stats: Count: 18 Avg/min/max 2818.28/2646/3004 usec 185914: timeDiff() stats: Count: 988166 - CPU cycles per call: 8.57 185914: Scheduler stats: (called/tasks/max_length/idle%) 253652/2042/17/64.20 186015: UDP : C010 connecting to 192.168.1.240:7000 186240: UDP : C010 connecting to 192.168.1.240:7000 186465: UDP : C010 connecting to 192.168.1.240:7000 186687: UDP : C010 connecting to 192.168.1.240:7000 186910: UDP : C010 connecting to 192.168.1.240:7000 187138: UDP : C010 connecting to 192.168.1.240:7000 187359: UDP : C010 connecting to 192.168.1.240:7000 187585: UDP : C010 connecting to 192.168.1.240:7000 187807: UDP : C010 connecting to 192.168.1.240:7000 188029: UDP : C010 connecting to 192.168.1.240:7000 188252: UDP : C010 connecting to 192.168.1.240:7000 188476: UDP : C010 connecting to 192.168.1.240:7000 188698: UDP : C010 connecting to 192.168.1.240:7000 188919: UDP : C010 connecting to 192.168.1.240:7000 189145: UDP : C010 connecting to 192.168.1.240:7000 189367: UDP : C010 connecting to 192.168.1.240:7000 189589: UDP : C010 connecting to 192.168.1.240:7000 189810: UDP : C010 connecting to 192.168.1.240:7000 196548: EVENT: BME280#Pressure=1016.17 196559: EVENT: BME280#Pressure=1016.17 Processing time:11 milliSeconds 196581: Meteo_BME280_Temperature=24.2 196584: Meteo_BME280_Humidity=42.4 196587: Meteo_BME280_Pressure=1016.2 196626: UDP : C010 connecting to 192.168.1.240:7000 196642: Command: taskvalueset 196644: Command: taskvalueset 196849: UDP : C010 connecting to 192.168.1.240:7000 197070: UDP : C010 connecting to 192.168.1.240:7000 197291: UDP : C010 connecting to 192.168.1.240:7000 197517: UDP : C010 connecting to 192.168.1.240:7000 197743: UDP : C010 connecting to 192.168.1.240:7000 197965: UDP : C010 connecting to 192.168.1.240:7000 198187: UDP : C010 connecting to 192.168.1.240:7000 198408: UDP : C010 connecting to 192.168.1.240:7000 198629: UDP : C010 connecting to 192.168.1.240:7000 198850: UDP : C010 connecting to 192.168.1.240:7000 215008: WD : Uptime 4 ConnectFailures 0 FreeMem 12064 215918: Plugin call 10 p/s U stats: Count: 298 Avg/min/max 1126.57/768/1499 usec 215918: Plugin call 1 p/s stats: Count: 30 Avg/min/max 5773.93/5477/9418 usec 215919: SensorSendTask() stats: Count: 4 Avg/min/max 121814.75/4503/351564 usec 215919: sendData() stats: Count: 1 Avg/min/max 123521.00/123521/123521 usec 215919: Compute formula stats: Count: 1 Avg/min/max 18.00/18/18 usec 215920: setNewTimerAt() stats: Count: 2183 Avg/min/max 348.84/299/447 usec 215920: Delay queue C010 stats: Count: 29 Avg/min/max 2835.55/2548/3330 usec 215920: timeDiff() stats: Count: 1018699 - CPU cycles per call: 8.57 215921: Scheduler stats: (called/tasks/max_length/idle%) 259991/2152/17/64.60 241233: Meteo_Lux_Lux=0.0 241236: Meteo_Lux_Infrared=0 241239: Meteo_Lux_Broadband=0 241284: DS : Temperature: 23.56 (28-a4-ed-b7-8-0-0-9a) 241287: EVENT: Temp_DS18B20_board#Temperature=23.56 241299: EVENT: Temp_DS18B20_board#Temperature=23.56 Processing time:12 milliSeconds 241324: UDP : C010 connecting to 192.168.1.240:7000 241545: UDP : C010 connecting to 192.168.1.240:7000 241771: UDP : C010 connecting to 192.168.1.240:7000 241993: UDP : C010 connecting to 192.168.1.240:7000 242064: DS : Temperature: 22.81 (28-ff-1e-23-b4-16-5-35) 242067: EVENT: DS18B20#Temperature=22.81 242078: EVENT: DS18B20#Temperature=22.81 Processing time:11 milliSeconds 242102: Meteo_DS18B20_Temperature=22.8 242215: UDP : C010 connecting to 192.168.1.240:7000 242440: UDP : C010 connecting to 192.168.1.240:7000 242660: UDP : C010 connecting to 192.168.1.240:7000 243281: EVENT: BME280_Hum#=0.00 Processing time:10 milliSeconds 243282: EVENT: BME280_Hum#=0.00 243292: EVENT: BME280_Hum#=0.00 Processing time:10 milliSeconds 243315: Meteo_BME280_Hum_Humidity=42.40 243317: Meteo_BME280Hum=0.00 243320: Meteo_BME280Hum=0.00 243713: UDP : C010 connecting to 192.168.1.240:7000 243729: EVENT: Clock#Time=Thu,06:44 243742: EVENT: Clock#Time=Thu,06:44 Processing time:13 milliSeconds 243937: UDP : C010 connecting to 192.168.1.240:7000 244159: UDP : C010 connecting to 192.168.1.240:7000 244381: UDP : C010 connecting to 192.168.1.240:7000 244602: UDP : C010 connecting to 192.168.1.240:7000 244824: UDP : C010 connecting to 192.168.1.240:7000 245008: WD : Uptime 4 ConnectFailures 0 FreeMem 11504 245045: UDP : C010 connecting to 192.168.1.240:7000 245267: UDP : C010 connecting to 192.168.1.240:7000 245495: UDP : C010 connecting to 192.168.1.240:7000 245912: sendData() stats: Count: 7 Avg/min/max 64975.43/20538/82877 usec 245913: Compute formula stats: Count: 7 Avg/min/max 18.86/10/23 usec 245913: setNewTimerAt() stats: Count: 2146 Avg/min/max 348.29/300/431 usec 245913: Delay queue C010 stats: Count: 18 Avg/min/max 2813.89/2660/2951 usec 245914: timeDiff() stats: Count: 1012595 - CPU cycles per call: 8.57 245914: Scheduler stats: (called/tasks/max_length/idle%) 259066/2122/17/64.80 245946: UDP : C010 connecting to 192.168.1.240:7000 246172: UDP : C010 connecting to 192.168.1.240:7000 246394: UDP : C010 connecting to 192.168.1.240:7000 246619: UDP : C010 connecting to 192.168.1.240:7000 246841: UDP : C010 connecting to 192.168.1.240:7000 247062: UDP : C010 connecting to 192.168.1.240:7000 247283: UDP : C010 connecting to 192.168.1.240:7000 247504: UDP : C010 connecting to 192.168.1.240:7000 247726: UDP : C010 connecting to 192.168.1.240:7000 247952: UDP : C010 connecting to 192.168.1.240:7000 248182: UDP : C010 connecting to 192.168.1.240:7000 248403: UDP : C010 connecting to 192.168.1.240:7000 248624: UDP : C010 connecting to 192.168.1.240:7000 248845: UDP : C010 connecting to 192.168.1.240:7000 249073: UDP : C010 connecting to 192.168.1.240:7000 249296: UDP : C010 connecting to 192.168.1.240:7000 249517: UDP : C010 connecting to 192.168.1.240:7000 249741: UDP : C010 connecting to 192.168.1.240:7000 259584: Meteo_BME280_Temperature=24.2 259587: Meteo_BME280_Humidity=42.4 259590: Meteo_BME280_Pressure=1016.2 259629: UDP : C010 connecting to 192.168.1.240:7000 259644: Command: taskvalueset 259646: Command: taskvalueset 259851: UDP : C010 connecting to 192.168.1.240:7000 260072: UDP : C010 connecting to 192.168.1.240:7000 260293: UDP : C010 connecting to 192.168.1.240:7000 260530: UDP : C010 connecting to 192.168.1.240:7000 260752: UDP : C010 connecting to 192.168.1.240:7000 260973: UDP : C010 connecting to 192.168.1.240:7000 261194: UDP : C010 connecting to 192.168.1.240:7000 261420: UDP : C010 connecting to 192.168.1.240:7000 261646: UDP : C010 connecting to 192.168.1.240:7000 261869: UDP : C010 connecting to 192.168.1.240:7000 275012: WD : Uptime 5 ConnectFailures 0 FreeMem 12064 275913: Plugin call 10 p/s U stats: Count: 297 Avg/min/max 1119.79/760/1499 usec 275913: Plugin call 1 p/s stats: Count: 30 Avg/min/max 5704.87/5421/9433 usec 275914: SensorSendTask() stats: Count: 4 Avg/min/max 121679.25/4567/350456 usec 275914: sendData() stats: Count: 1 Avg/min/max 124020.00/124020/124020 usec 275914: Compute formula stats: Count: 1 Avg/min/max 18.00/18/18 usec 275915: setNewTimerAt() stats: Count: 2180 Avg/min/max 349.29/299/428 usec 275915: Delay queue C010 stats: Count: 29 Avg/min/max 2846.03/2584/3712 usec 275915: timeDiff() stats: Count: 1022583 - CPU cycles per call: 8.57 275916: Scheduler stats: (called/tasks/max_length/idle%) 261499/2149/17/65.20 301336: UDP : C010 connecting to 192.168.1.240:7000 301557: UDP : C010 connecting to 192.168.1.240:7000 301778: UDP : C010 connecting to 192.168.1.240:7000 302000: UDP : C010 connecting to 192.168.1.240:7000 302063: DS : Temperature: 22.81 (28-ff-1e-23-b4-16-5-35) 302066: EVENT: DS18B20#Temperature=22.81 302078: EVENT: DS18B20#Temperature=22.81 Processing time:12 milliSeconds 302100: Meteo_DS18B20_Temperature=22.8 302221: UDP : C010 connecting to 192.168.1.240:7000 302970: EVENT: SysTime#SysTime=0.00 302981: EVENT: SysTime#SysTime=0.00 Processing time:11 milliSeconds 302982: EVENT: SysTime#=0.00 302992: EVENT: SysTime#=0.00 Processing time:10 milliSeconds 302994: EVENT: SysTime#=0.00 303228: EVENT: BME280_Press#=0.00 Processing time:13 milliSeconds 303251: Meteo_BME280_Press_Pressure=1016.20 303254: Meteo_BME280Press=0.00 303257: Meteo_BME280Press=0.00 303271: EVENT: BME280_Hum#Humidity=42.40 303308: EVENT: BME280_Hum#=0.00 303319: EVENT: BME280_Hum#=0.00 Processing time:11 milliSeconds 303321: EVENT: BME280_Hum#=0.00 303333: EVENT: BME280_Hum#=0.00 Processing time:12 milliSeconds 303334: EVENT: BME280_Hum#=0.00 303345: EVENT: BME280_Hum#=0.00 Processing time:11 milliSeconds 303371: Meteo_BME280_Hum_Humidity=42.40 303374: Meteo_BME280Hum=0.00 303377: Meteo_BME280Hum=0.00 303797: UDP : C010 connecting to 192.168.1.240:7000 303811: EVENT: Clock#Time=Thu,06:45 303825: EVENT: Clock#Time=Thu,06:45 Processing time:14 milliSeconds 304032: UDP : C010 connecting to 192.168.1.240:7000 304265: UDP : C010 connecting to 192.168.1.240:7000 304487: UDP : C010 connecting to 192.168.1.240:7000 304709: UDP : C010 connecting to 192.168.1.240:7000 304930: UDP : C010 connecting to 192.168.1.240:7000 305008: WD : Uptime 5 ConnectFailures 0 FreeMem 11504 305151: UDP : C010 connecting to 192.168.1.240:7000 305376: UDP : C010 connecting to 192.168.1.240:7000 305912: SensorSendTask() stats: Count: 9 Avg/min/max 108857.34/4488/357887 usec 305913: sendData() stats: Count: 7 Avg/min/max 73942.43/20798/114267 usec 305913: Compute formula stats: Count: 7 Avg/min/max 18.29/10/23 usec 305913: setNewTimerAt() stats: Count: 2137 Avg/min/max 355.63/305/437 usec 305914: Delay queue C010 stats: Count: 18 Avg/min/max 2817.67/2674/2944 usec 305914: timeDiff() stats: Count: 1007814 - CPU cycles per call: 8.57 305914: Scheduler stats: (called/tasks/max_length/idle%) 257721/2113/17/64.50 306045: UDP : C010 connecting to 192.168.1.240:7000 306266: UDP : C010 connecting to 192.168.1.240:7000 306505: UDP : C010 connecting to 192.168.1.240:7000 306726: UDP : C010 connecting to 192.168.1.240:7000 306948: UDP : C010 connecting to 192.168.1.240:7000 307169: UDP : C010 connecting to 192.168.1.240:7000 307395: UDP : C010 connecting to 192.168.1.240:7000 307616: UDP : C010 connecting to 192.168.1.240:7000 307838: UDP : C010 connecting to 192.168.1.240:7000 308065: UDP : C010 connecting to 192.168.1.240:7000 308287: UDP : C010 connecting to 192.168.1.240:7000 308508: UDP : C010 connecting to 192.168.1.240:7000 308729: UDP : C010 connecting to 192.168.1.240:7000 308950: UDP : C010 connecting to 192.168.1.240:7000 309172: UDP : C010 connecting to 192.168.1.240:7000 309396: UDP : C010 connecting to 192.168.1.240:7000 309617: UDP : C010 connecting to 192.168.1.240:7000 309844: UDP : C010 connecting to 192.168.1.240:7000 323548: EVENT: BME280#Pressure=1016.15 323559: EVENT: BME280#Pressure=1016.15 Processing time:11 milliSeconds 323581: Meteo_BME280_Temperature=24.2 323584: Meteo_BME280_Humidity=42.3 323587: Meteo_BME280_Pressure=1016.2 323626: UDP : C010 connecting to 192.168.1.240:7000 323636: Command: taskvalueset 323638: Command: taskvalueset 323848: UDP : C010 connecting to 192.168.1.240:7000 324069: UDP : C010 connecting to 192.168.1.240:7000 324299: UDP : C010 connecting to 192.168.1.240:7000 324521: UDP : C010 connecting to 192.168.1.240:7000 324747: UDP : C010 connecting to 192.168.1.240:7000 324968: UDP : C010 connecting to 192.168.1.240:7000 325195: UDP : C010 connecting to 192.168.1.240:7000 325417: UDP : C010 connecting to 192.168.1.240:7000 325638: UDP : C010 connecting to 192.168.1.240:7000 325860: UDP : C010 connecting to 192.168.1.240:7000 335012: WD : Uptime 6 ConnectFailures 0 FreeMem 12064 335915: Plugin call 10 p/s U stats: Count: 296 Avg/min/max 1126.39/787/1496 usec 335915: Plugin call 1 p/s stats: Count: 30 Avg/min/max 5739.77/5445/9446 usec 335916: SensorSendTask() stats: Count: 4 Avg/min/max 123381.00/4516/357571 usec 335916: sendData() stats: Count: 1 Avg/min/max 123827.00/123827/123827 usec 335916: Compute formula stats: Count: 1 Avg/min/max 18.00/18/18 usec 335917: setNewTimerAt() stats: Count: 2179 Avg/min/max 354.58/305/433 usec 335917: Delay queue C010 stats: Count: 29 Avg/min/max 2828.03/2616/3437 usec 335917: timeDiff() stats: Count: 1015350 - CPU cycles per call: 8.57 335918: Scheduler stats: (called/tasks/max_length/idle%) 258897/2148/17/65.00 361237: Meteo_Lux_Lux=0.0 361239: Meteo_Lux_Infrared=0 361242: Meteo_Lux_Broadband=0 361278: DS : Temperature: 23.56 (28-a4-ed-b7-8-0-0-9a) 361281: EVENT: Temp_DS18B20_board#Temperature=23.56 361293: EVENT: Temp_DS18B20_board#Temperature=23.56 Processing time:12 milliSeconds 361326: UDP : C010 connecting to 192.168.1.240:7000 361547: UDP : C010 connecting to 192.168.1.240:7000 361773: UDP : C010 connecting to 192.168.1.240:7000 361994: UDP : C010 connecting to 192.168.1.240:7000 362064: DS : Temperature: 22.81 (28-ff-1e-23-b4-16-5-35) 362067: EVENT: DS18B20#Temperature=22.81 362078: EVENT: DS18B20#Temperature=22.81 Processing time:11 milliSeconds 362101: Meteo_DS18B20_Temperature=22.8 362220: UDP : C010 connecting to 192.168.1.240:7000 362441: UDP : C010 connecting to 192.168.1.240:7000 362662: UDP : C010 connecting to 192.168.1.240:7000 363281: EVENT: BME280_Hum#=0.00 Processing time:11 milliSeconds 363282: EVENT: BME280_Hum#=0.00 363292: EVENT: BME280_Hum#=0.00 Processing time:10 milliSeconds 363315: Meteo_BME280_Hum_Humidity=42.30 363318: Meteo_BME280Hum=0.00 363321: Meteo_BME280Hum=0.00 363713: UDP : C010 connecting to 192.168.1.240:7000 363730: EVENT: Clock#Time=Thu,06:46 363744: EVENT: Clock#Time=Thu,06:46 Processing time:14 milliSeconds 363935: UDP : C010 connecting to 192.168.1.240:7000 364157: UDP : C010 connecting to 192.168.1.240:7000 364379: UDP : C010 connecting to 192.168.1.240:7000 364600: UDP : C010 connecting to 192.168.1.240:7000 364821: UDP : C010 connecting to 192.168.1.240:7000 365008: WD : Uptime 6 ConnectFailures 0 FreeMem 11504 365042: UDP : C010 connecting to 192.168.1.240:7000 365263: UDP : C010 connecting to 192.168.1.240:7000 365912: sendData() stats: Count: 7 Avg/min/max 65233.86/20396/83600 usec 365913: Compute formula stats: Count: 7 Avg/min/max 18.14/10/23 usec 365913: setNewTimerAt() stats: Count: 2147 Avg/min/max 355.16/305/448 usec 365913: Delay queue C010 stats: Count: 18 Avg/min/max 2831.22/2704/2950 usec 365914: timeDiff() stats: Count: 1007773 - CPU cycles per call: 8.57 365914: Scheduler stats: (called/tasks/max_length/idle%) 257254/2123/17/64.70 365934: UDP : C010 connecting to 192.168.1.240:7000 366155: UDP : C010 connecting to 192.168.1.240:7000 366376: UDP : C010 connecting to 192.168.1.240:7000 366598: UDP : C010 connecting to 192.168.1.240:7000 366820: UDP : C010 connecting to 192.168.1.240:7000 367047: UDP : C010 connecting to 192.168.1.240:7000 367268: UDP : C010 connecting to 192.168.1.240:7000 367494: UDP : C010 connecting to 192.168.1.240:7000 367715: UDP : C010 connecting to 192.168.1.240:7000 367943: UDP : C010 connecting to 192.168.1.240:7000 368164: UDP : C010 connecting to 192.168.1.240:7000 368385: UDP : C010 connecting to 192.168.1.240:7000 368606: UDP : C010 connecting to 192.168.1.240:7000 368827: UDP : C010 connecting to 192.168.1.240:7000 369048: UDP : C010 connecting to 192.168.1.240:7000 369270: UDP : C010 connecting to 192.168.1.240:7000 369497: UDP : C010 connecting to 192.168.1.240:7000 369718: UDP : C010 connecting to 192.168.1.240:7000 386588: Meteo_BME280_Temperature=24.2 386590: Meteo_BME280_Humidity=42.4 386593: Meteo_BME280_Pressure=1016.1 386631: UDP : C010 connecting to 192.168.1.240:7000 386647: Command: taskvalueset 386649: Command: taskvalueset 386852: UDP : C010 connecting to 192.168.1.240:7000 387073: UDP : C010 connecting to 192.168.1.240:7000 387295: UDP : C010 connecting to 192.168.1.240:7000 387517: UDP : C010 connecting to 192.168.1.240:7000 387747: UDP : C010 connecting to 192.168.1.240:7000 387971: UDP : C010 connecting to 192.168.1.240:7000 388192: UDP : C010 connecting to 192.168.1.240:7000 388413: UDP : C010 connecting to 192.168.1.240:7000 388635: UDP : C010 connecting to 192.168.1.240:7000 388856: UDP : C010 connecting to 192.168.1.240:7000 395008: WD : Uptime 7 ConnectFailures 0 FreeMem 12064 395916: Plugin call 10 p/s U stats: Count: 297 Avg/min/max 1122.06/767/1497 usec 395917: Plugin call 1 p/s stats: Count: 30 Avg/min/max 5811.37/5518/9447 usec 395917: SensorSendTask() stats: Count: 4 Avg/min/max 121807.50/4567/350739 usec 395917: sendData() stats: Count: 1 Avg/min/max 123986.00/123986/123986 usec 395918: Compute formula stats: Count: 1 Avg/min/max 19.00/19/19 usec 395918: setNewTimerAt() stats: Count: 2178 Avg/min/max 354.77/305/431 usec 395918: Delay queue C010 stats: Count: 29 Avg/min/max 2822.97/2583/3223 usec 395919: timeDiff() stats: Count: 1009714 - CPU cycles per call: 8.57 395919: Scheduler stats: (called/tasks/max_length/idle%) 257164/2147/17/64.50 421237: Meteo_Lux_Lux=0.0 421240: Meteo_Lux_Infrared=0 421243: Meteo_Lux_Broadband=0 421285: DS : Temperature: 23.56 (28-a4-ed-b7-8-0-0-9a) 421288: EVENT: Temp_DS18B20_board#Temperature=23.56 421301: EVENT: Temp_DS18B20_board#Temperature=23.56 Processing time:13 milliSeconds 421326: UDP : C010 connecting to 192.168.1.240:7000 421547: UDP : C010 connecting to 192.168.1.240:7000 421768: UDP : C010 connecting to 192.168.1.240:7000 423001: Meteo_Dust_PM2.5=11.7 423004: Meteo_Dust_PM10=15.1 423024: EVENT: SysTime#SysTime=0.00 423037: EVENT: SysTime#SysTime=0.00 Processing time:13 milliSeconds 423041: EVENT: SysTime#=0.00 423407: Meteo_BME280Hum=0.00 423410: Meteo_BME280Hum=0.00 423416: Command: taskvalueset 423807: UDP : C010 connecting to 192.168.1.240:7000 423817: EVENT: Clock#Time=Thu,06:47 423829: EVENT: Clock#Time=Thu,06:47 Processing time:12 milliSeconds

Only 4 min tracking.

TD-er commented 5 years ago

Have you set the "Check Reply" to "Ignore Acknowledgement" ? (in the controller settings)

uzi18 commented 5 years ago

please try to. disable. rules for a. moment and check if it is working ok.

Tom-Bom-badil commented 5 years ago

Nope, disabling rules didn't help. Having same isse, see #1.892. /tom

stefbo27 commented 5 years ago

I was looking at the code: element.checkDone returns false for multivalue sensors. Therefore in markProcessed the first value does not get removed from the queue. I dont fully understand the logic behind the checks performed in checkDone so I can't suggest a solution, that does not creates side effects on other controllers... Stefan

TD-er commented 5 years ago

@stefbo27 The general idea of this controller "delay queue" system is as follows:

This last item is a bit of an issue for the controllers which can only send a single value in a message. For the few controllers which have the checkDone function, the sample will be processed until all values are sent. So it is meant to be kept in the queue for as long as all values are being sent.

See this part of the (macro) code: https://github.com/letscontrolit/ESPEasy/blob/0afab53659176167cb85faf7dce5ca0f71a9021b/src/_CPlugin_Helper.h#L325-L352

And for completeness, the checkDone function: https://github.com/letscontrolit/ESPEasy/blob/0afab53659176167cb85faf7dce5ca0f71a9021b/src/_CPlugin_Helper.h#L116-L119

This valuesSent variable is being used here: https://github.com/letscontrolit/ESPEasy/blob/0afab53659176167cb85faf7dce5ca0f71a9021b/src/_C010.ino#L78-L101

So the only thing I can think of why this doesn't work, could be the actual valuesSent is not updated, but just a copy (not a reference) to the same object.

TD-er commented 5 years ago

Hmm, it looks like it is indeed working on a copy instead of the object in the list. So I will try to change that. This will also result in less memory usage, since the object doesn't have to be copied.

TD-er commented 5 years ago

Should be fixed by PR #1926

Tom-Bom-badil commented 5 years ago

Thanks TD-er, will check as soon as nightly build is online. /tom

Tom-Bom-badil commented 5 years ago

Yes, seems fixed - all values are transfered to the controller properly. Thanks again for all your good work! :) /tom

TD-er commented 5 years ago

Glad it now seems to work.