Skip to content
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

Device ID = 0x0000 Problem #2

Open
wolfer649 opened this issue May 23, 2017 · 5 comments
Open

Device ID = 0x0000 Problem #2

wolfer649 opened this issue May 23, 2017 · 5 comments

Comments

@wolfer649
Copy link

It turns out that if the Device ID = 0x0000, every frame is treated as an ID frame because the CRC is good for all of them. In fact, a valid ID frame also has '00" for the low order two bits of the LSB.
(My March, 2017 Blueline sensor's out-of-box Device ID was 0x0000, naturally.)
The easy workaround is to hold the sensor's reset button for 10-ish seconds to force it to assume a new ID.

@CapnBry
Copy link
Owner

CapnBry commented May 24, 2017

Well that does make sense then, that there are 4 types of packets that are indicated in that byte. I don't have my test setup any longer, but it would be in data[0] correct? So the new code would look like this (OOK_PACKET_TXID is 0):

  if (g_DiscoverPeriod && 
    (decoder.data.raw[0] & 3) == OOK_PACKET_TXID &&
    crc8(decoder.data.raw, 3) == 0)

@wolfer649
Copy link
Author

wolfer649 commented May 24, 2017 via email

@CapnBry
Copy link
Owner

CapnBry commented May 24, 2017

Great! Changes pushed to github for the TXID packet type thing, but I am not sure how to validate the CRC if it is saying all the packets pass due to it being 0.

It should be able to just run directly on the Adafruit, it is just SPI bus and I believe the !CS line is the standard. You'll just need to bring out that OOK data line, which no off-the-shelf module has attached. Good luck with your build, I recently switched from using this to getting an EmonTx because I got a solar system so there was no way to tell how much was being used by the house if just measuring at the meter.

Hydro is crazy expensive in Ontario. My friend out in Bourget pays over $100 just for service out at her farm and then time of use power at peak time is like costing a loonie just to microwave a cup of tea!

@wolfer649
Copy link
Author

wolfer649 commented May 28, 2017 via email

@CapnBry
Copy link
Owner

CapnBry commented May 29, 2017

Oh my bad I didn't realized you said a Feather M0. Yeah that's a whole different ball of wax when it comes to timing pulses. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants