Benutzer-Werkzeuge

Webseiten-Werkzeuge


hardware:vaillantvrt340f

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
hardware:vaillantvrt340f [2017/05/03 22:41] reinholdhardware:vaillantvrt340f [2017/05/11 21:46] (aktuell) reinhold
Zeile 2: Zeile 2:
   - [[hardware:vaillantvrt340f|Part 1: The physical layer - Reading the wireless signal and extracting the bytes]]   - [[hardware:vaillantvrt340f|Part 1: The physical layer - Reading the wireless signal and extracting the bytes]]
   - [[hardware:vaillantvrt340f_protocol|Part 2: Decoding the protocol]]   - [[hardware:vaillantvrt340f_protocol|Part 2: Decoding the protocol]]
-  - __(Part 3: Including a wireless receiver in OpenHAB - Yet to be done)__+  - //[[hardware:vaillantvrt340f_implementing|Part 3: Including the device in rtl_433 and potentially in RFLink or OpenHAB]]//
  
 +{{:hardware:vaillant_calormatic340f:vaillant-thermostat-calormatic-340f-front.jpg?direct&400|}}
  
-In our appartment, we have a wireless heating control system made by Vaillant (probably 8-10 years old). Since I recently started into Smart Home and Home Automation (well, so far, i have mainly set up a huge net of all different kinds of sensors and some light bulbs, as I have hardly anything that could be controlled wirelessly), of course I wanted to figure out how the wireless device works and in particular whether I could include it into my OpenHAB-based home network of things...+In our apartment, we have a wireless heating control system made by Vaillant (probably 8-10 years old). Since I recently started into Smart Home and Home Automation (well, so far, i have mainly set up a huge net of all different kinds of sensors and some light bulbs, as I have hardly anything that could be controlled wirelessly), of course I wanted to figure out how the wireless device works and in particular whether I could include it into my [[http://www.openhab.org|OpenHAB]]-based home network of things...
  
-To detect and analyze the wireless signals, I'm using an RTL282x-based DVB-T dongle together with the RTL-SDR software.+To detect and analyze the wireless signals, I'm using an RTL282x-based DVB-T dongle together with the [[http://www.rtl-sdr.com/|RTL-SDR]] software.
  
 ===== Figuring out the Frequency ===== ===== Figuring out the Frequency =====
Zeile 202: Zeile 203:
 ===== UPDATE: Bit stuffing -- but WHY? ===== ===== UPDATE: Bit stuffing -- but WHY? =====
  
-During my tests of the wireless control, I collected various different signals. Trying to group them into octets for bytes, except for one nonet 101111101 (the second part will reveal that this is the only grouping that makes sense!):+During my tests of the wireless control, I collected various different signals. Trying to group them into octets for bytes, I ended up with a dilemma: I realized that the second-to-last byte should be 0xFF and the one before was probably some kid of checksum. That left me with 9 bits before that checksum byte:
  
-| ''000000000000000001111110101101100110111100000000000001000000000000000000000100010010110100000000\ __101111101__\ 1000001011111111000000000'' | +<html> 
-| ''000000000000000001111110101101100110111100000000000001000000000010000000000100010010110100000000\ __101111101__\ 0000001011111111000000000'' | +<pre>00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 00000000 00010001 00101101 00000000 <span style="color: red; font-weight: bold">101111101</span> 10000010 11111111 000000000 
-| ''000000000000000001111110101101100110111100000000000001000000000000000000000100010000000000000000\ __101111101__\ 1010111111111111000000000'' | +00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 10000000 00010001 00101101 00000000 <span style="color: red; font-weight: bold">101111101</span> 00000010 11111111 000000000 
-| ''000000000000000001111110101101100110111100000000000001000000000010000000000100010000000000000000\ __101111101__\ 0010111111111111000000000'' | +00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 00000000 00010001 00000000 00000000 <span style="color: red; font-weight: bold">101111101</span> 10101111 11111111 000000000 
-| ''000000000000000001111110101101100110111100000000000001000000000000000000000000010000000000000000\ __101111101__\ 1011111011111111\ 10000000000'' | +00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 10000000 00010001 00000000 00000000 <span style="color: red; font-weight: bold">101111101</span> 00101111 11111111 000000000 
-| ''000000000000000001111110101101100110111100000000000001000000000000000000000000010111110000000000\ __010111110__\ 1111101101111111\ __11__0000000'' | +00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 00000000 00000001 00000000 00000000 <span style="color: red; font-weight: bold">101111101</span> 10111110 11111111 <span style="color: red; font-weight: bold">1</span>000000000 
-| ''000000000000000001111110101101100110111100000000000001000000000010000000000000010111110000000000\ __010111110__\ 1011111001111111\ __11__0000000'' |+00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 00000000 00000001 01111100 00000000 <span style="color: red; font-weight: bold">010111110</span> 11111011 01111111 <span style="color: red; font-weight: bold">11</span>0000000 00 
 +00000000 00000000 01111110 10110110 01101111 00000000 00000100 00000000 10000000 00000001 01111100 00000000 <span style="color: red; font-weight: bold">010111110</span> 10111110 01111111 <span style="color: red; font-weight: bold">11</span>0000000 00 
 +</pre></html>
  
 The first four observations were among the most frequent signals. The first four observations were among the most frequent signals.
Zeile 218: Zeile 221:
 As my reasoning in part 2 shows, that extra byte must be before the final three bytes, but after the fifth-to-last one. So we have the 9-bit sequence 101111101 that we must make sense of. Even worse, the last two observations appear to be shifted by one additional bit after a bit sequence of 01111100. As my reasoning in part 2 shows, that extra byte must be before the final three bytes, but after the fifth-to-last one. So we have the 9-bit sequence 101111101 that we must make sense of. Even worse, the last two observations appear to be shifted by one additional bit after a bit sequence of 01111100.
  
-After some googling, I stumbled upon the [[https://en.wikipedia.org/wiki/High-Level_Data_Link_Control#Framing|framing approach in the High-Level Data Link Control]], where the frames start with 0x7e=01111110 and the bit stuffing in the data part means that after five consecutive 1 bits, an extra 0 bit is included, which must be removed at the receiving end. Indeed, the 101111101 bit sequence is the only appearance of five consecutive 1 bits in the first few examples. Some other signals also contained sequences of 5 (but not more) consecutive 1 bits, followed by a seemingly spurious zero... Bit stuffing would explain this spurious 0 bit and even demand to remove it before interpreting the signal. If we do bit unstuffing on our signals, suddenly the signal aligns perfectly into octets to form bytes:+After some googling, I stumbled upon the [[https://en.wikipedia.org/wiki/High-Level_Data_Link_Control#Framing|framing approach in the High-Level Data Link Control]], where the frames start with 0x7e=01111110 and the bit stuffing in the data part means that after five consecutive 1 bits, an extra 0 bit is included, which must be removed at the receiving end. Indeed, the 101111101 bit sequence is the only appearance of five consecutive 1 bits in the first few examples. Some other signals also contained sequences of 5 (but not more) consecutive 1 bits, followed by a seemingly spurious zero... Bit stuffing would explain this spurious 0 bit and even demand to remove it before interpreting the signal. If we do bit unstuffing on our signals (again, using a little helper utility [[https://github.com/kainhofer/vaillant-calormatic340f/blob/master/Vaillant_decode_bitstuff.c|Vaillant_decode_bitstuff.c]]), suddenly the signal aligns perfectly into octets to form bytes:
  
 | ''00000000\ 00000000\ 01111110\ 10110110\ 01101111\ 00000000\ 00000100\ 00000000\ 00000000\ 00010001\ 00101101\ 00000000\ 10111111\ 10000010\ 11111111\ 00000000'' | | ''00000000\ 00000000\ 01111110\ 10110110\ 01101111\ 00000000\ 00000100\ 00000000\ 00000000\ 00010001\ 00101101\ 00000000\ 10111111\ 10000010\ 11111111\ 00000000'' |
hardware/vaillantvrt340f.1493844080.txt.gz · Zuletzt geändert: 2017/05/03 22:41 von reinhold

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki