livebox:universalrfrx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
livebox:universalrfrx [2013/06/17 07:16] – [The receiver] brettlivebox:universalrfrx [2017/09/15 12:37] (current) brett
Line 5: Line 5:
 {{:livebox:urfrx-block-diagram.png}} {{:livebox:urfrx-block-diagram.png}}
  
 +With the virtual serial port mode this makes it possible to combine the HAHCentral sketch with the RFRX receiver code module.  One piece of hardware can be used to communicate with the [[hah_hahnode|HAHNodes]] and with the 433MHz RF receiver hardware.
 +
 +It would also allow you to combine say the RFGateway sketch using the Nanode hardware with the RF hardware and have the xap-serial message being dumped directly onto the Ethernet.  Many options available with these architecture choices.
 ===== The receiver ===== ===== The receiver =====
  
 The hardware to slurp and detect what looks like a valid RF signal from all the background noise.  With this hardware we don't pre-code what RF signals we are going to look for, which is what most purpose built RF receivers do. The hardware to slurp and detect what looks like a valid RF signal from all the background noise.  With this hardware we don't pre-code what RF signals we are going to look for, which is what most purpose built RF receivers do.
  
-The beautiful part of this design is the separation of the signal gatherer from the decoder We simply look for a signal that has a lead-in >10ms and repeats more than once.   If this condition is met we emit the pulse stream for a repeating block out to the serial port for the decoder to deal with.+The source: https://github.com/dbzoo/hah/tree/master/userapps/arduino You will also need the RFRX Library .
  
-Here is a pulse train that meet this condition.+<note>The RFRX library is part of the HAHCentral sketch so by attaching a RF receiver to this existing hardware you can get this functionality for very little extra cost.  Just the cost of a RF Rx unit, which is about 3-4 quid.</note> 
 + 
 +The beautiful part of this design is the separation of the signal gatherer from the decoder.  We look for a signal that has a lead-in >10ms and repeats more than once.   If this condition is met we emit the pulse stream for a repeating block out to the serial port for the decoder to deal with. 
 + 
 +Here is a pulse train that meets this condition.
  
 {{:livebox:pulse_train.png?640|Sample Pulse train}} {{:livebox:pulse_train.png?640|Sample Pulse train}}
  
-The first block would be stored and when the 2nd block is encountered its compared to the 1st, as they match it would then be emitted as sequence of pulse durations, -ve for LO and +ve for high, down the serial port to a decoder.+The first block would be stored and when the 2nd block is encountered it'compared to the 1st, as they match it would then be emitted as sequence of pulse durations, -ve for LO and +ve for HI, down the serial port to a decoder.
      
 Sample output. Sample output.
Line 25: Line 32:
 </code> </code>
  
-This pulse sequence be visualized using a helper:+This pulse sequence can be visualized using a helper:
   * http://www.dbzoo.com/public/rf-plot.html   * http://www.dbzoo.com/public/rf-plot.html
 and if all has gone well it should look like the picture we captured using our Logic Analyzer directly attached to the RF receiver pin. and if all has gone well it should look like the picture we captured using our Logic Analyzer directly attached to the RF receiver pin.
Line 47: Line 54:
 The signal processor to match a signal against a list of pre-configured patterns. The signal processor to match a signal against a list of pre-configured patterns.
  
 +Using the web page we enter the ON and OFF signal we want to watch for.   If there is only a single RF pattern, i.e. it's a toggle for ON followed by OFF, only supply a single RF pattern, don't repeat it in the ON and OFF fields. Just ON will do.
  
 +{{:livebox:urfrx-screen.png|}}
 +
 +The /etc/xap-livebox.ini file may also be edited by hand to input this information.
 +
 +<code>
 +[urfrx]
 +devices=1
 +rf1.label=RF 1
 +rf1.off=0101017E0434046001600A01271018401014
 +rf1.on=010201820436046A015601700436045001700101271018100001820339
 +enable=1
 +serialport=/dev/ttyUSB0
 +vserial=1
 +</code>
 +
 +  * vserial - Virtual Serial port (1) or Directly connected hardware (0)
 +  * enable - Start this service automatically 
 +
 +Each RF<number>.STATE pattern is created as a BSC endpoint.  When a signal comes in that matches our definition the endpoint will have its state changed accordingly and an xAPBSC.event will be generated.
 +
 +A sample event when a signal comes in that matches the rf1.on pattern.
 +<code>
 +xap-header
 +{
 +v=12
 +hop=1
 +uid=FF00EE02
 +class=xAPBSC.event
 +source=dbzoo.livebox.urfrx:rf.1
 +}
 +input.state
 +{
 +state=on
 +}
 +</code>
  • livebox/universalrfrx.1371453360.txt.gz
  • Last modified: 2013/06/17 07:16
  • by brett