User Tools

Site Tools


beamish_switch_v5_0

Differences

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

Link to this comparison view

beamish_switch_v5_0 [2015/11/27 22:09] (current)
Line 1: Line 1:
 +**Beamish Switches**
 +
 +^Feature^Support^
 +|Sending|{{http://​wiki.pilight.org/​lib/​images/​supported.gif}}|
 +|Receiving|{{http://​wiki.pilight.org/​lib/​images/​supported.gif}}|
 +|Config|{{http://​wiki.pilight.org/​lib/​images/​supported.gif}}|
 +
 +==== Supported Brands ====
 +^Brand^Protocol^
 +|Beamish 4-AE4|beamish_switch|
 +
 +==== Sender Arguments ====
 +<​code>​
 +-t --on                    send a toggle state signal to the device
 +-f --off                   send a toggle state signal to the device
 +-i --id=id ​                ​control the device with this system id (1 ... 65535)
 +-u --unit=unit ​            ​control the device with this unit code (1 ... 4)
 +-a --all                   send on/off command to all device units belonging to this system id
 +</​code> ​
 +
 +==== Config ====
 +<​code>​
 + "​living":​ {
 + "​name":​ "​Living",​
 + "​switch":​ {
 + "​name":​ "​Switch",​
 + "​protocol":​ [ "​beamish_switch"​ ],
 + "​id":​ [{
 +                                "​id":​ 8,
 + "​unit":​ 2
 + }],
 + "​state":​ "​off"​
 + }
 + }
 +</​code>​
 +
 +==== Optional Settings ====
 +
 +^Setting^Default^Format^Description^
 +|gui-readonly|0|0 or 1|Enable, Disable controlling this device from the GUIs|
 +
 +==== Protocol ====
 +
 +The beamish_switch protocol sends 50 pulses like this
 +<​code>​
 +323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 323 1292 1292 323 323 1292 323 1292 323 1292 323 1292 323 1292 1292 323 1292 323 323 1292 323 1292 323 1292 323 1292 323 10982
 +</​code>​
 +
 +The last two pulses are the ''​footer''​. These are meant to identify the pulses as genuine. We don't use them for further processing. The next step is to transform this output into 24 groups of 2 pulses (and thereby dropping the ''​footer''​ pulse).
 +
 +<​code>​
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +1292 323 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +1292 323 
 +1292 323 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 1292 
 +323 10982
 +</​code>​
 +
 +If we now analyse these groups we can distinguish two types of groups:
 +  - ''​323 1292''​
 +  - ''​1292 323''​
 + 
 +The 1st group is defined by a short-long sequence (logical 0)
 +The 2nd group is defined by a long-short sequence (logical 1)
 +
 +<​code>​
 +Binary representation:​
 +000000000000100000110000
 +</​code>​
 +
 +We can group the sequence of bits into the following groups A and B:
 +
 +<​code>​
 +AAAAAAAAAAAAAAAA BBBB BBBB
 +0000000000001000 0011 0000
 +</​code>​
 +
 +Each of the groups of bits (A and B) has a specific meaning:
 +
 +^Group^Bit #^config name^Range^Description^
 +|A|1 to 16|"​id":​|1 to 65535|SystemCode id|
 +|B|17 to 24|"​unit":​|1 to 4|Button Code unit|
 +The protocol driver creates the binary presentation as required by the device
 +
 +||||1100 0000|-u 1  Button A Toogle device status|
 +||||0011 0000|-u 2  Button B Toogle device status|
 +||||0000 1100|-u 3  Button C Toogle device status|
 +||||0000 0011|-u 4  Button D Toogle device status|
 +||||0000 1111|-a -t Button ALL ON|
 +||||1100 0011|-a -f Button ALL OFF|
 +
 +So this code represents:
 +<​code>​
 +{
 +        "​code":​ {
 +                "​id":​ 8,
 +                "​unit":​ 2
 +        },
 +        "​origin":​ "​receiver",​
 +        "​protocol":​ "​beamish_switch",​
 +        "​uuid":​ "​0000-00-00-00-000000",​
 +        "​repeats":​ 2
 +}
 +</​code>​
 +**Examples**
 +
 +CLI command:
 +<​code>​
 +pilight-send -p beamish_switch -i 8 -u 1
 +{
 +        "​code":​ {
 +                "​systemcode":​ 2,
 +                "​id":​ 8,
 +                "​unit":​ 1
 +        },
 +        "​origin":​ "​receiver",​
 +        "​protocol":​ "​beamish_switch",​
 +        "​uuid":​ "​0000-00-00-00-000000",​
 +        "​repeats":​ 2
 +}
 +
 +pilight-send -p beamish_switch -i 8 -a -t
 +{
 +        "​origin":​ "​sender",​
 +        "​protocol":​ "​beamish_switch",​
 +        "​code":​ {
 +                "​id":​ 8,
 +                "​all":​ 1,
 +                "​state":​ "​on"​
 +        },
 +        "​repeat":​ 1,
 +        "​uuid":​ "​0000-00-00-00-000000"​
 +}
 +</​code>​
 +
 +** Known Limitations **
 +
 +As the device will not report its state, and the same Button on the original remote control toogles the state of the device, the GUI may show the wrong status of the device.
  
beamish_switch_v5_0.txt ยท Last modified: 2015/11/27 22:09 (external edit)