bernardn / python-libgqe Goto Github PK
View Code? Open in Web Editor NEWA library for interfacing GQ Electronics measurement devices
License: GNU General Public License v2.0
A library for interfacing GQ Electronics measurement devices
License: GNU General Public License v2.0
Thanks for releasing a very nice opensource program.
I was attempting to use it on the GQ-EMF 390v2 Re 3.72 and was getting the error after reading the first record of
Exception in SPIR : Invalid SPI data chunk at address 0x14 : b'Z\x02'
I checked using just a raw dump of the data and it appears that Re 3.72 has an undocumented change to what's returned by SPIR to add two more bytes, so instead of a 12 byte data grab, you now need 14.
A sample grab of raw data ( See https://github.com/AJRepo/gq_emf_scripts ) gives us raw data
55aa1705100e3737
aa550013404f8042c43119485a02
aa550013404f8042c43119485a02
aa550013404f8042c43119485a02
aa550013404f8042c43119485a02
aa550013ce1f8142ab9c0b485a02
aa5500148d567e42947efc475a08
aa55001362cc8042947efc475a08
aa55001365fd7e4280b721485a02
aa55001321037e420e021e485a02
aa550013f6788042947efc475a08
...
Looks like the 5a 02 is a new field "possible source"
https://www.gqelectronicsllc.com/forum/topic.asp?TOPIC_ID=9175
// Possible Source
char sbuf[16];
memset(sbuf,0,16);
if(DATA[i] == 0x5A)
{
unsigned char s = DATA[i+1];
i+=2;
if(s == 0) sprintf(sbuf, "---");
else if(s == 1) sprintf(sbuf, "Smart Meter");
else if(s == 2) sprintf(sbuf, "Cell Tower");
else if(s == 3) sprintf(sbuf, "Microwave");
else if(s == 4) sprintf(sbuf, "WiFi/Phone");
else if(s == 5) sprintf(sbuf, "Static");
else if(s == 6) sprintf(sbuf, "AC EF");
else if(s == 7) sprintf(sbuf, "Power Line");
else sprintf(sbuf, "Mixed");
}
Looks like libgqe/protocol/GQRFC1701/v1_00/SPIR.py is where it specifies 12 bytes for each data grab.
Wondering if you can help with that update?
Thanks!
GETCFG shares code amongst the different protocols, and should therefore be generalised.
This issue is an architectural one and has no incidence on functionality
python-libgqe/libgqe/communicator.py
Line 30 in 0fd1568
Line 92 in 9c3daa7
revision
should be used instead of vers
For model GQ-EMF390v2 to be recognized, add these to python-libgqe-master/libgqe/unit/__init__.py at line 80.
model = model.replace('v2','')
cmodel = cmodel.rstrip('v')
Commands in versioned protocols are importing main classes importing themselves all available commands. Fix by loading versioned Protocol class instead.
This issue is an architectural one and has no incidence on functionality.
When a SPI record is spread over 2 chunks, its timestamp is reset to zero. The timestamp should therefore be saved between chunks.
should be cfg_get
python-libgqe/libgqe/protocol/__init__.py
Line 112 in 9c3daa7
When a SPI record is spread over 2 chunks, its timestamp is reset to zero. The timestamp should therefore be saved between chunks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.