Last active
August 6, 2017 09:53
-
-
Save probonopd/cd6606b255a8e60bf23f to your computer and use it in GitHub Desktop.
Turns out one of my neighbors has a weather station; I would like to receive its data using Arduino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Turns out one of my neighbors has a weather station | |
| # I would like to receive its data using Arduino | |
| # sudo ./src/rtl_433 | |
| Sensor temperature event: | |
| protocol = Prologue | |
| button = 0 | |
| battery = Ok | |
| temp = 16.3 | |
| humidity = 89 | |
| channel = 1 | |
| id = 5 | |
| rid = 18 | |
| hrid = 12 | |
| 51 28 0a 35 90 | |
| # sudo ./src/rtl_433 -a | |
| *** signal_start = 171624322, signal_end = 171856726 | |
| signal_len = 232404, pulses = 265 | |
| Iteration 1. t: 41 min: 5 (3) max: 77 (262) delta 293 | |
| Iteration 2. t: 41 min: 5 (3) max: 77 (262) delta 0 | |
| Pulse coding: Short pulse length 5 - Long pulse length 77 | |
| Short distance: 522, long distance: 1021, packet distance: 2346 | |
| p_limit: 41 | |
| [00] {39} ff ff ff ff fe : 11111111 11111111 11111111 11111111 11111110 | |
| [01] {37} ff ff ff ff f8 : 11111111 11111111 11111111 11111111 11111000 | |
| [02] {37} ff ff ff ff f8 : 11111111 11111111 11111111 11111111 11111000 | |
| [03] {38} ff ff ff ff 7c : 11111111 11111111 11111111 11111111 01111100 | |
| [04] {37} ff ff ff ff f8 : 11111111 11111111 11111111 11111111 11111000 | |
| [05] {37} ff ff ff ff f8 : 11111111 11111111 11111111 11111111 11111000 | |
| [06] {39} ff ff f7 fd fe : 11111111 11111111 11110111 11111101 11111110 | |
| [07] {1} 80 : 10000000 | |
| *** signal_start = 180374602, signal_end = 180607027 | |
| signal_len = 232425, pulses = 262 | |
| Iteration 1. t: 92 min: 80 (55) max: 104 (207) delta 802 | |
| Iteration 2. t: 92 min: 80 (55) max: 104 (207) delta 0 | |
| Distance coding: Pulse length 92 | |
| Short distance: 506, long distance: 999, packet distance: 2322 | |
| p_limit: 92 | |
| [00] {38} 14 4a 02 89 64 : 00010100 01001010 00000010 10001001 01100100 | |
| [01] {36} 51 28 0a 25 90 : 01010001 00101000 00001010 00100101 10010000 | |
| [02] {36} 51 28 0a 25 90 : 01010001 00101000 00001010 00100101 10010000 | |
| [03] {36} 51 28 0a 25 90 : 01010001 00101000 00001010 00100101 10010000 | |
| [04] {36} 51 28 0a 25 90 : 01010001 00101000 00001010 00100101 10010000 | |
| [05] {36} 51 28 0a 25 90 : 01010001 00101000 00001010 00100101 10010000 | |
| [06] {36} 51 28 0a 25 90 : 01010001 00101000 00001010 00100101 10010000 | |
| [07] {0} 00 : 00000000 | |
| Looking at the source code, it says: | |
| /* Prologue sensor protocol | |
| * | |
| * the sensor sends 36 bits 7 times, before the first packet there is a pulse sent | |
| * the packets are pwm modulated | |
| * | |
| * the data is grouped in 9 nibles | |
| * [id0] [rid0] [rid1] [data0] [temp0] [temp1] [temp2] [humi0] [humi1] | |
| * | |
| * id0 is always 1001,9 | |
| * rid is a random id that is generated when the sensor starts, could include battery status | |
| * the same batteries often generate the same id | |
| * data(3) is 0 the battery status, 1 ok, 0 low, first reading always say low | |
| * data(2) is 1 when the sensor sends a reading when pressing the button on the sensor | |
| * data(1,0)+1 forms the channel number that can be set by the sensor (1-3) | |
| * temp is 12 bit signed scaled by 10 | |
| * humi0 is always 1100,c if no humidity sensor is available | |
| * humi1 is always 1100,c if no humidity sensor is available | |
| * | |
| * The sensor can be bought at Clas Ohlson | |
| */ | |
| C Code tp decode: | |
| https://github.com/merbanan/rtl_433/blob/master/src/devices/prologue.c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment