Open mr-sneezy opened 3 years ago
Had a look at the Bit Pattern you received. The correct number of bits of received, which is a good thing and we are on the right track. I'm not sure why the BituSec is all 0 - This means all received bits are 0 micro seconds in length. Can you post me the version of ArduinoJSON, you are using and a copy of the includes you have in your Arduino Sketh file. Just want to try to re-create this one. Thanks
Using Arduinojson 6.18.3 here.
I refreshed the library files and recompiled everything here again tonight and am getting the uSec timing now sometimes. I note that the Sb pulse time sometimes is very large (1000uS+), I suspect that is from my 433Mhz weather station on the roof...
Raw data seems a bit odd in that what I thought would be ID bytes are not consistent. Maybe got that idea wrong.
[00d 00:00.01s] _debug=ON - T=Timeout, S=Start, b=bit, o=Rxtimeout, L=loop routine, E=End of Packet [00d 00:00.01s] Efergy Monitor has intitialized. [00d 00:00.01s] ADDED TX 1234 with 12 events logged, status will change@ 50mA, report@ 90 seconds Arduino Source File: efergy_advanced.ino Connecting to Wifi.....Connected. (192.168.0.156) [00d 00:00.20s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:00.38s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:00.56s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:02.08s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:02.08s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[508,73,23,69,73,133,70,139,23,61,67,142,129,48,37,90,77,75,59,62,142,125,62,64,60,49,55,70,142,141,64,70,70,75,81,72,138,124,61,73,68,83,138,58,142,58,70,70,139,145,121,89,62,67,70,70,66,149,62,73,140,127,142,65,138,60,135,63]} {"RAW":[10,50,24,24,24,81,224,157]} [00d 00:02.26s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:02.26s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[545,70,71,63,78,151,71,138,68,56,132,124,69,142,67,63,71,60,146,129,70,61,64,49,58,69,142,140,65,69,70,71,77,63,140,139,70,64,66,70,64,150,68,134,63,72,69,142,133,69,67,67,66,75,82,149,62,142,132,63,130,58,69,70,72,67,50,97]} {"RAW":[10,104,96,96,96,163,2,208]} [00d 00:02.44s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:03.02s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:03.20s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:03.20s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[514,69,73,72,70,146,69,132,65,72,141,139,77,135,67,64,102,64,139,140,69,63,136,64,73,141,72,55,67,57,57,81,69,73,142,69,129,138,136,138,140,134,67,23,69,67,131,144,60,132,66,67,71,61,66,47,147,67,146,131,67,129,55,64,63,134,28,27]} {"RAW":[10,105,100,128,95,134,129,104]} [00d 00:03.56s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:04.14s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:04.14s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[514,61,84,79,98,132,55,142,58,70,142,143,58,129,66,66,69,58,141,126,70,63,138,66,71,140,141,68,67,68,72,69,72,147,68,145,139,63,132,76,108,49,70,72,138,142,48,64,64,67,69,64,67,62,75,149,67,146,72,140,136,73,140,65,140,45,45,130]} {"RAW":[26,104,100,192,181,24,2,181]} [00d 00:04.25s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:04.25s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[1290,115,87,93,50,72,156,68,78,77,45,68,46,43,165,59,67,37,164,56,45,62,91,76,31,48,26,24,40,25,93,24,47,57,54,138,37,52,57,72,54,43,22,72,61,52,29,55,47,146,147,55,21,61,24,60,63,64,67,146,105,45,30,54,53,55,157,27]} {"RAW":[228,4,68,4,32,0,192,48]} [00d 00:04.28s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:04.28s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[1540,55,118,97,181,51,99,152,69,24,72,164,96,84,55,121,67,138,28,55,65,31,52,29,124,48,42,46,45,22,99,28,30,43,34,24,45,131,36,37,75,76,45,64,66,39,22,65,36,31,64,169,34,26,75,65,55,65,33,37,27,51,43,117,87,34,40,34]} {"RAW":[118,50,129,4,8,0,32,3]} [00d 00:04.32s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:04.32s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[512,73,73,78,73,151,100,130,97,84,147,141,72,136,66,66,66,63,144,117,73,53,144,67,58,142,141,64,61,72,78,63,65,143,70,142,104,145,138,63,52,138,138,66,58,127,64,140,64,56,79,75,72,61,157,67,140,57,63,141,75,79,73,69,67,34,30,86]} {"RAW":[15,104,100,192,188,202,5,32]} [00d 00:04.50s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:04.50s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[507,63,28,55,54,144,70,139,72,64,142,139,55,27,54,28,69,68,72,74,145,128,69,56,144,73,59,137,142,32,53,70,70,60,57,71,149,67,142,142,95,129,135,73,66,56,60,138,69,28,61,142,62,76,72,66,73,78,140,69,72,74,141,138,67,148,66,127]} {"RAW":[10,96,25,48,23,194,32,70]} [00d 00:05.08s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:05.26s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,T [00d 00:06.02s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:06.02s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[518,69,56,39,71,149,69,144,93,72,140,138,64,142,69,66,66,55,142,137,66,65,130,63,65,111,136,52,75,63,81,76,54,143,142,70,71,67,56,140,68,137,69,64,75,149,116,69,55,76,84,76,73,138,78,72,147,139,133,65,141,65,54,71,51,83,38,39]} {"RAW":[11,104,100,192,194,140,9,208]} [00d 00:06.38s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:06.38s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[510,75,76,71,68,144,70,78,28,68,72,58,63,61,41,68,143,72,60,79,73,148,141,59,63,126,66,66,139,150,66,75,69,77,84,79,142,23,65,132,121,63,57,141,119,46,138,64,125,138,66,139,134,55,64,60,139,77,133,67,69,54,71,138,144,144,37,37]} {"RAW":[8,1,12,152,19,53,177,67]} [00d 00:06.47s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:06.47s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[512,31,61,58,54,54,21,65,53,57,32,35,34,105,94,53,48,97,83,66,57,63,28,33,26,41,73,105,51,114,40,50,36,124,262,130,40,33,64,46,26,37,40,40,33,50,75,74,35,82,29,183,50,26,22,48,44,60,40,55,43,43,22,38,94,76,75,22]} {"RAW":[0,12,128,40,224,0,32,1]} [00d 00:06.56s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:06.56s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[534,61,71,70,145,61,151,79,66,136,113,65,133,65,66,72,72,144,141,67,58,124,65,66,56,80,133,78,72,78,57,72,75,141,143,61,69,66,73,66,162,79,147,89,71,69,142,64,70,75,73,73,64,72,142,55,142,110,64,70,150,136,133,123,27,21,64,44]} {"RAW":[20,208,200,64,193,100,5,158]} [00d 00:07.32s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:07.32s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[537,54,75,76,78,144,22,69,142,76,67,141,86,69,134,61,56,86,72,129,135,66,69,144,53,73,135,78,46,67,58,69,76,121,77,144,139,59,70,68,78,54,21,54,72,62,142,143,137,137,70,61,58,83,64,76,71,71,132,42,75,61,46,147,68,144,65,130]} {"RAW":[9,52,178,64,176,7,128,66]} [00d 00:07.50s] Sb,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,E [00d 00:07.50s] Received Data failed Checksum - or incomplete packetCS{"BituSec":[508,66,76,72,75,145,70,139,72,65,145,138,70,132,63,70,70,71,139,138,55,70,142,67,69,142,138,60,70,64,49,70,72,140,67,124,141,124,141,63,139,57,138,130,64,43,63,73,57,55,64,70,73,73,88,144,66,144,138,126,65,71,69,148,135,27,24,66]} {"RAW":[10,104,100,192,189,96,6,227]}
OK, Will do some analysis on that in the next few days. As a matter of interest, could you turn debug off [DEBUG 0] and see if you get anything?
Will do now. BTW. I get these warnings when compiling, especially the first time after starting the IDE fresh. The middle one sounds like an array out of range warning or similar ?
D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp: In member function 'long unsigned int efergy::RXdecodeMA()':
D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp:78:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null]
78 | return NULL; // Return Null if value is invalid/out of range (TEST THIS)
| ^~~~
D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp: In member function 'void efergy::RXdecodeRAW()':
D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp:149:22: warning: iteration 66 invokes undefined behavior [-Waggressive-loop-optimizations]
149 | if (_incomingtime[k] != 0) {
| ~~~~~~~~~~~~~~~^
D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp:148:20: note: within this loop
148 | for (int k = 1; k <= LIMIT; k++) { //Start at 1 because the first bit (0) is our long 500uS start
I wonder if the library efergy::mainloop() could check that the Sb is between 400 & 600uS instead of > 480uS ?? This would stop it recording the weather stations frames in debug most likely.
OK, I ran with DEBUG 0. Nothing received in serial monitor after the IP address in ten minutes...
Hi, I have done a little bit of work around the timing. I don't receive the warnings on compile that you are getting with the most recent Arduino Libraries, so unable to replicate/confirm, but have done some tweaks to the library to hopefully resolve. I have also added in the uSec range change. Whilst this won't impact the operation, it will reduce the packets being logged to your console.
Using the new library, and have set Debug 5. Output has changed but no pulse timing values (all 0). I'll post this but continue trying a few things.
Debug serial now looks like this after some transmissions.
[00d 00:00.01s] DEBUG IS ON - T=Timeout, S=Start, b=bit, o=Rxtimeout, L=loop routine, E=End of Packet [00d 00:00.01s] Efergy Monitor has intitialized. [00d 00:00.01s] ADDED TX 1234 with 12 events logged, status will change@ 50mA, report@ 90 seconds Arduino Source File: efergy_advanced.ino Connecting to Wifi.....Connected. (192.168.0.156) [00d 00:00.13s] Received Data failed Checksum - or incomplete packet Bit Pattern=SbbXbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbXbbbXbbbbbbbbbbbbbbbbbbE {"BituSec":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55]} {"RAW":[0,0,0,0,0,0,0,0]}
Also I have a compiler warning. Probably not related but worth me mentioning.
D:\Documents\Arduino\Projects\efergy_advanced\efergy_advanced.ino: In function 'void setup()': D:\Documents\Arduino\Projects\efergy_advanced\efergy_advanced.ino:50:27: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] 50 | char *SOURCE_FILENAME = __FILE__; | ^~~~~~~~ D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp: In member function 'long unsigned int efergy::RXdecodeMA(unsigned char*)': D:\Documents\Arduino\libraries\efergy_v2-master\efergy.cpp:100:10: warning: converting to non-pointer type 'long unsigned int' from NULL [-Wconversion-null] 100 | return NULL; // Return Null if value is invalid/out of range (TEST THIS)