I bought a new indoor/outdoor weather station with 3-sensors (http://www.amazon.de/gp/product/B00G1GNY...ge_o01_s00). It looks exactly the same (but black) like the weather station shown on https://wiki.pilight.org/doku.php/tfa. That's why I thought it uses the TFA protocol, but it doesn't.

I spent the whole day to identify the logic behind the raw code and I got it. I just need some help on how to implement the protocol for pilight, or even better if someone can implement it for me

It should be very easy to implement it, because it's nearly identical to the TFA protocol, there are just some differences on the positions and it uses °C instead of °F.

I don't understand what all the values (except RAW) are for, but here is what I found:

- The rawlen is always 76

- The pulselen is mostly 251 and sometimes 252 or 253 (didn't noticed other values)

- The pulse is mostly 7 or 19 and sometimes 8, 18, or 20

Now I split the raw code into two columns (same like for TFA). The values for the first column are always round about 500 and are useless?!

I transfered the second column to a binary code with the following rule:

- values between 1750 and 2016 (min/max I've ever seen in this range) equals 0

- values between 3750 and 3780 (min/max I've ever seen in this range) equals 1

- The last raw value is always round about 8500 (and marks the end?!)

After that I have a binary code of length 37. I recorded several raw codes for different temperatures and humidities. And here is what I found:

The first 5 digits are always 10011, no matter what I do, I think they belong to the ID. The digits from 6 to 14 change after I reinsert the batteries, so these digits must belong to the ID (like in TFA).

The digits 15-16 are for the channel (00=CH1, 01=CH2, 10=CH3).

The digits 17-28 are for the temperature, but it doesn't follow the same rule as the TFA protocol. If all digits are 0, the temperature is 0°C, otherwise, if all digits are 1, the temperature is -0.1°C. If the decimal value increases by 1 the temperature increases by 0.1°C. So for temperature >=0°C you can calcularte the decimal value of these digits and divide it by 10, this results always in the correct temperature in °C. But if the temperature is <0°C you have to invert the binary values, calculate the decimal value, add +1 and divide it by 10. This always results in the correct temperatures if they are negative. Because the first two digits (17-18) of the binary code are only 1 if the temperatures are below 0°C, they can be used to identify this case. The remaining digits from 19 to 28 can then be used to calculate the temperature.

The digits from 29-36 are the humidity in binary code, so it's only required to calculate the decimal value, then you get the humidity in %.

The last digit 37 is probably for the battery. Using completely new batteries, the value is always 0 for all recordings.

Summary:

- 37 binary digits in the form of 10011AAAAAAAAABBCCCCCCCCCCCCDDDDDDDDF

- ID: 1-14

- Channel: bin2dec(15-16)+1

- Temp sign: (17-18) 00=positiv, 11=negative

- If Temp positiv: bin2dec(19-28)/10 [in °C]

- If Temp negativ: -1*(bin2dec(inv(19-28)) + 1)/10 [in °C] or (bin2dec(19-28) - 1024) / 10 [in °C]

- Humidity: bin2dec(29-36) %

- Battery: 37 (0=ok, 1=bad) (not sure if this is really the true behaviour)

These rules result always in the correct values (>40 trials).

It would be really nice if someone is able to implement this or can help me to do so.

Thanks in advance and sorry if my english isn't perfect

I spent the whole day to identify the logic behind the raw code and I got it. I just need some help on how to implement the protocol for pilight, or even better if someone can implement it for me

It should be very easy to implement it, because it's nearly identical to the TFA protocol, there are just some differences on the positions and it uses °C instead of °F.

I don't understand what all the values (except RAW) are for, but here is what I found:

- The rawlen is always 76

- The pulselen is mostly 251 and sometimes 252 or 253 (didn't noticed other values)

- The pulse is mostly 7 or 19 and sometimes 8, 18, or 20

Now I split the raw code into two columns (same like for TFA). The values for the first column are always round about 500 and are useless?!

I transfered the second column to a binary code with the following rule:

- values between 1750 and 2016 (min/max I've ever seen in this range) equals 0

- values between 3750 and 3780 (min/max I've ever seen in this range) equals 1

- The last raw value is always round about 8500 (and marks the end?!)

After that I have a binary code of length 37. I recorded several raw codes for different temperatures and humidities. And here is what I found:

The first 5 digits are always 10011, no matter what I do, I think they belong to the ID. The digits from 6 to 14 change after I reinsert the batteries, so these digits must belong to the ID (like in TFA).

The digits 15-16 are for the channel (00=CH1, 01=CH2, 10=CH3).

The digits 17-28 are for the temperature, but it doesn't follow the same rule as the TFA protocol. If all digits are 0, the temperature is 0°C, otherwise, if all digits are 1, the temperature is -0.1°C. If the decimal value increases by 1 the temperature increases by 0.1°C. So for temperature >=0°C you can calcularte the decimal value of these digits and divide it by 10, this results always in the correct temperature in °C. But if the temperature is <0°C you have to invert the binary values, calculate the decimal value, add +1 and divide it by 10. This always results in the correct temperatures if they are negative. Because the first two digits (17-18) of the binary code are only 1 if the temperatures are below 0°C, they can be used to identify this case. The remaining digits from 19 to 28 can then be used to calculate the temperature.

The digits from 29-36 are the humidity in binary code, so it's only required to calculate the decimal value, then you get the humidity in %.

The last digit 37 is probably for the battery. Using completely new batteries, the value is always 0 for all recordings.

Summary:

- 37 binary digits in the form of 10011AAAAAAAAABBCCCCCCCCCCCCDDDDDDDDF

- ID: 1-14

- Channel: bin2dec(15-16)+1

- Temp sign: (17-18) 00=positiv, 11=negative

- If Temp positiv: bin2dec(19-28)/10 [in °C]

- If Temp negativ: -1*(bin2dec(inv(19-28)) + 1)/10 [in °C] or (bin2dec(19-28) - 1024) / 10 [in °C]

- Humidity: bin2dec(29-36) %

- Battery: 37 (0=ok, 1=bad) (not sure if this is really the true behaviour)

These rules result always in the correct values (>40 trials).

It would be really nice if someone is able to implement this or can help me to do so.

Thanks in advance and sorry if my english isn't perfect