-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Aureol HG04641A - Temperature Station from Lidl (IAN: 307350) #2014
Comments
Looks good already. Get more codes to be sure and put them in a BitBench like this. The temp is likely 12 bits. But we need to known if negative values are flagged, 2's complement, or something else. When the details are clear then you can write a decoder. Look at the last commits, e.g. 63514de |
Oh, also reset the battery and watch what changes. I guess the first byte is a fixed protocol identifier and the second byte random with every battery change. |
In the freezer I am getting -14.1ºC, so it looks like it is 2's complement:
After removing the batteries I get:
I have tried also with old batteries and I get:
So far it looks like:
I also replace the batteries by some old ones and got:
Another neightbour seems to have a similar device, because my station connects to it from time to time. I think is this one:
(it also reports low battery) |
OFFTOPIC (I know this is the wrong place to ask, but probably there is plenty of people who can point me in the right direction) I am trying to read from the sensor above with Arduino. I have a 433Mhz cheap sensor that I bought long ago (2016) -never used-. I tried with Radiohead and RC-switch but I don't get any text from very basic examples. I was expecting to get the a string similar to the ones above: Does anyone experience doing this? Any good tutorial that I can follow to do it? Maybe the sensor is too bad? Is not feasible to do this with arduino? |
Those "1-bit SDRs" are not great. Maybe get a CC1101 or something similar. |
I have another question:
In BitBench, it shows something like: |
Some kind of checksum. |
OFFTOPICJust for the record, in case somebody hits this issue searching for the sensor and arduino. I raised this issue in the arduino forum. Rather than using Radiohead or RC-switch, you just measure the time between pulses. Here it is the code: const int intPin = 2; // Only PINS 2 and 3 can handle interrupts in arduino nano.
volatile bool NewData = false;
volatile byte DataLength = 0; // Received data length in bits
volatile uint8_t myArray[64]; // 256 bits in 4-bit 'nybbles'
uint8_t Received[64]; // 256 bits in 4-bit 'nybbles'
const uint8_t SensorID[4] = {0x1, 0x2, 0xF, 0x4}; // 16 bits in 4-bit 'nybbles'
void setup()
{
Serial.begin(115200);
delay(200);
pinMode(intPin, INPUT_PULLUP);
attachInterrupt(digitalPinToInterrupt(intPin), SignalISR, FALLING);
}
void SignalISR()
{
static unsigned long lastISRTime = 0;
static byte bitIndex = 0;
unsigned long time = micros();
unsigned long elapsed = time - lastISRTime;
lastISRTime = time;
// Don't start accepting new data until the old data was processed
if (NewData)
return;
if (elapsed > 1400 && elapsed < 1580)
{
// Zero Bit
bitIndex++;
}
else if (elapsed > 2400 && elapsed < 2580)
{
// One Bit
size_t nybbleIndex = bitIndex / 4;
myArray[nybbleIndex] |= (0x8 >> (bitIndex % 4));
bitIndex++;
}
else
{
// Not a valid bit width
if (bitIndex > 0)
{
NewData = true;
DataLength = bitIndex;
bitIndex = 0;
}
}
}
void loop()
{
if (NewData)
{
unsigned length;
// Copy the volatile data
noInterrupts();
length = DataLength;
for (byte i = 0; i < (length + 4) / 4; i++)
{
Received[i] = myArray[i];
myArray[i] = 0; // Clear for next time
}
NewData = false;
interrupts();
Serial.print(length);
Serial.print(": ");
if (length == 1)
{
Serial.println("~~glitch~~");
return;
}
for (byte i = 0; i < (length + 3) / 4; i++)
{
Serial.print(Received[i], HEX);
}
Serial.print(' ');
if (length % 4 != 0)
{
Serial.println("Invalid Length: Not multiple of 4");
return;
}
uint8_t checksum = 0;
for (size_t i = 0; i < (length / 4) - 1; i++)
{
checksum += Received[i];
}
if ((checksum & 0x0F) != Received[length / 4 - 1])
{
Serial.print("Wrong checksum: ");
Serial.println((checksum & 0x0F), HEX);
return;
}
int16_t temperature = 0;
if (length == 36
&& Received[0] == SensorID[0] && Received[1] == SensorID[1]
&& Received[2] == SensorID[2] && Received[3] == SensorID[3])
{
temperature = (Received[5] << 12) | (Received[6] << 8) | (Received[7] << 4);
temperature >>= 4; // sign-extend
Serial.print("Temperature = ");
Serial.print(float(temperature) / 10.0);
Serial.println("°C");
// Show battery status
if (Received[4] & 8) {
Serial.print("Battery Low");
} else {
Serial.print("Battery OK");
}
}
Serial.println();
}
} As @merbanan -mentions it is a checksum. It is implemented in the code above by johnwasser. |
@mantielero Are you still working on this? Plans for a PR? |
I am sorry I am no longer working on it. |
I bought this sensor around 2018.
Manual
I am trying to access the data it provides. I live in a very busy area (I detect plenty of sensors from the neighbourhood) so I hope I am doing things right.
Using:
I am getting something like the following:
Given that 8bits is not enough to get beyond 25.5ºC. I don't know if it requires 9 or 12 bits. Probably I should get the sensor in the freezer for a while.
-22.6ºC
This sensor can connect to also to a radiofrequency time server. The manual states:
Here in Spain we don't have that signal, so probably the begining of the signal. So maybe somebody from Germany can complete the missing bits.
Today I first notice
rtl_433
, so I don't know what to do next.The text was updated successfully, but these errors were encountered: