Beam socket protocol

Click on Beam protocol v1.0 to open the PDF-file. You can also view the full text set out below:

Beam socket protocol

Document version V1.0 dated at February 19th, 2016.

The Beam Remote app on iOS and Android uses sockets to connect to a Beam on your home network. It searches for Beam devices with a port scan and then tries to connect the socket. The scan is performed in the same subnet that Beam is on. The same goes for the webinterface, but the difference is that the website www.controlmybeam.com reconnects you to the local IP address of a Beam on your network and uses websockets. Beam uses port number 1346 and 1347 for the web interface. The Beam Remote uses 13456 and 13457 to connect to Beam.

If something is between, replace the whole word with brackets with the relevant value. So user;<username>;<macaddress> becomes user;Thomas;AA:BB:CC:00:22

App to Beam

On connect:

user;<username>;<macaddress>

<username> should be a recognizable user name for that device
<macaddress> should be the macaddress seperated by : (colon)

Mouse events:

mmr;<x>;<y>          Mouse move relative (ex: ‘mmr;10;-20’ moves the pointer 10 px right, 20 px up)
mdr;0;0                 Mouse down relative, sends touch down event.
mur;0;0                 Mouse up relative, sends touch up event.
mtr;0;0                  Mouse touch relative, sends touch down+up event.

For dragging, first send “mdr;0;0”, then “mmr;<x>;<y>” on drag, then “mur;0;0” when released

mw;0;<y>              Mouse wheel, sends scroll event

pd;0;0                   Pen down, needs to be sent before a series of absolute mouse events
pu;0;0                   Pen up, needs to be sent after last abolute mouse event

mma;<x>;<y>      Mouse move absolute, moves the pointer to (<x>,<y> )
mda;<x>;<y>       Mouse down absolute, sends touch down event on position (<x>,<y>)
mua;<x>;<y>       Mouse up absolute, sends touch up event on position (<x>,<y>)
mta;<x>;<y>        Mouse touch absolute, sends touch down+up event on position (<x>,<y>)

Led brightness:

led;<level>;<mode>                                       Changes led brightness.

if <mode> = -1, it sets the brightness one level lower than the current brightness level
if <mode>  = 1, it sets the brightness one level higher than the current brightness level
if <mode> = 3, it sets the brightness level to <x> ( <x> can be 0-3, where 0=off and 3=max)

Volume:

vol;<level>;<mode>                                       Changes media volume.

if <mode> = -1, it sets the media volume one level lower than the current volume
if <mode> = 1, it sets the media volume one level higher than the current volume
if <mode> = 3, it sets the media volume level to <x>  (<x> can be 0-15, where 0=off and 15=max)

Navigation buttons:

b;2                         Home button
b;3                         Back button

Screen controls:

rot;0;0                   Rotates the screen 180 degrees
screen;0;0            Turn Screen on/off

Navigating Beam:

sets;0;0                 Opens the ‘sets’ interface
actions;0;0           Opens the ‘actions’ (if/then) interface
apps;0;0                Opens the ‘all apps’ interface
settings;0;0           Opens the ‘settings’ interface

Input app:

kios;<x>;0              Sends key pressed event of key (iOS keycode)
kand;<x>;0            Sends key pressed event of key (Android keycode)

For enter, <x> = ENTER
For backspace, <x> = BACKSPACE

nav;up;0                 Arrrow up keypad
nav;down;0            Arrow down keypad
nav;left;0                Arrow left keypad
nav;right;0             Arrow right keypad
nav;ok;0                 OK button keypad

Input webinterface:

key;<x>;down        Sends key down event of key <x>.
key;<x>;up             Sends key up event of key <x>.

Renaming Beam:

name;<name>;0    Sets <name> as new name for Beam

Beam to Remote app

Returned when one of these settings has been changed or when a connection is made.

nam;<name>                                   Sends (new) Beam name
led;<x>                                              Sends led brightness level
vol;<x>                                              Sends volume level

 

Keep me up-to-date