User Tools

Site Tools


beamish_switch

This is an old revision of the document!


Beamish Switches

FeatureSupport
Sending
Receiving
Config

Supported Brands

BrandProtocol
Beamish 4-AE4beamish_switch

Sender Arguments

-t --on                    send a toggle state signal to the device
-f --off                   send a toggle state signal to the device
-s --systemcode=systemcode control all devicemembers of this code (1 ... 15)    
-i --id=id                 control the device with this system id (1 ... 4095)
-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

Config

	"living": {
		"name": "Living",
		"switch": {
			"name": "Switch",
			"protocol": [ "beamish_switch" ],
			"id": [{
				"systemcode": 2,
                                "id": 8,
				"unit": 2
			}],
			"state": "off"
		}
	}

Optional Settings

SettingDefaultFormatDescription
gui-readonly00 or 1Enable, Disable controlling this device from the GUIs

Protocol

The beamish_switch protocol sends 50 pulses like this

232 696 696 232 232 696 232 696 696 232 696 232 232 696 696 232 696 232 696 232 232 696 696 232 696 232 696 232 232 696 232 696 696 232 696 232 232 696 232 696 232 696 232 696 232 696 232 696 232 7888

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 12 groups of 4 pulses (and thereby dropping the footer pulse).

232 696 696 232 
232 696 232 696 
696 232 696 232 
232 696 696 232 
696 232 696 232 
232 696 696 232 
696 232 696 232 
232 696 232 696 
696 232 696 232 
232 696 232 696 
232 696 232 696 
232 696 232 696 
232 7888

If we now analyse these groups we can distinguish three types of groups:

  1. 232 696 696 232
  2. 232 696 232 696
  3. 696 232 696 232

The 1st group is defined by a short-long-long-short sequence (logical 0) The 2nd group is defined by a short-long-short-long sequence (logical 1) The 3rd group is defined by a long-short-long-short sequence (logical 0)

Binary representation:
010000010111

We can group the sequence of bits into the following groups A to C:

AAAA BBBB CCCC
0100 0001 0111

Each of the groups of bits (A to C) has a specific meaning:

GroupBit #config nameRangeDescription
A1 to 4“systemcode”:1 to 15SystemCode
B5 to 8“id”:1 to 15GroupCode id
C9 to 12“unit”:1 to 4DeviceCode unit
0111Button A Toogle device status
1011Button B Toogle device status
1101Button C Toogle device status
1110Button D Toogle device status
0011Button All Devices ON
1001Button All Devices OFF

So this code represents:

{
        "code": {
                "systemcode": 2,
                "id": 8,
                "unit": 2
        },
        "origin": "receiver",
        "protocol": "beamish_switch",
        "uuid": "0000-00-00-00-000000",
        "repeats": 2
}

Examples

CLI command:

pilight-send -p beamish_switch -s 2 -i 8 -u 1 -t
{
        "code": {
                "systemcode": 2,
                "id": 8,
                "unit": 2
        },
        "origin": "receiver",
        "protocol": "beamish_switch",
        "uuid": "0000-00-00-00-000000",
        "repeats": 2
}

pilight-send -p beamish_switch -s 2 -i 8 -a -t
{
        "origin": "sender",
        "protocol": "beamish_switch",
        "code": {
                "systemcode": 2,
                "id": 8,
                "all": 1,
                "state": "on"
        },
        "repeat": 1,
        "uuid": "0000-00-00-00-000000"
}
beamish_switch.1408883328.txt.gz · Last modified: 2015/11/27 21:08 (external edit)