GithubHelp home page GithubHelp logo

python-libgqe's People

Contributors

ajrepo avatar bernardn avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

python-libgqe's Issues

GQ-EMF 390v2 Re 3.72 changed SPIR response. Exception in SPIR : Invalid SPI data chunk at address 0x14 : b'Z\x02'

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!

Protocol - Duplicate code in GETCFG

GETCFG shares code amongst the different protocols, and should therefore be generalised.

This issue is an architectural one and has no incidence on functionality

Add support for GQ-EMF390v2

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')

Protocol - Wrong class inheritance scheme

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.