Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

WebSocket API

Tobias Blum edited this page May 21, 2016 · 8 revisions

WebSocket connection

WebSocket server runs at port 81: ws://esp8266_01.local:81/

Payload: #<hexrgb>

Where <hexrgb> is the color as HEX, e.g. 04d2ff

Set default color of the lamp.

Result: OK
Payload: *<hexrgb>

Where <hexrgb> is the color as HEX, e.g. 04d2ff

Set default color of the lamp and light all LEDs in that color.

Result: OK
Payload: !<numled><hexrgb>

Where <numled> is the number of the led, e.g. 01.
Where <hexrgb> is the color as HEX, e.g. 04d2ff.

Light single LEDs in the given color.

Result: OK
Payload: ?<delay>

Where <delay> is the delay in ms.

Set delay in ms.

Result: OK
Payload: %<brightness>

Where <brightness> is the brightness as value 0-255.

Set brightness.

Result: OK
Payload: =<lightmode>

Where <lightmode> is one of the following:
- off (Turn all LEDs off.)
- all (Turn all LEDs on in the given or previously set color.)
- wipe (Turn all LEDs on in the given or previously set color, with wipe effect.)
- rainbow (Starts rainbow effect.)
- rainbowCycle (Starts rainbow cycle effect.)
- theaterchase (Starts theaterchase effect in the given or previously set color.)
- theaterchaseRainbow (Starts theaterchase effect with changing colors.)
- tv (Starts TV simulator.)


Set brightness.

Result: OK
Clone this wiki locally