-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No BituSec in Debug #11
Comments
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. #include <efergy.h> #include <ESP8266WiFi.h> |
I refreshed the library files and recompiled everything here again tonight and am getting the uSec timing now sometimes. 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 |
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.
|
I wonder if the library efergy::mainloop() could check that the Sb is between 400 & 600uS instead of > 480uS ?? 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)
The text was updated successfully, but these errors were encountered: