bulbs

Public

@imjah

Download board files

Files for version 1. Pick what you came for.

Share bulbs

Check access before sharing the link.

Who can open this board

Anyone can open this board. No sign-in is required.

This link opens the latest version. Copying it does not grant additional access.

Loading 3D model… large boards can take a moment.

README

Bulbs

Not mature yet project of RGB lights that can be controlled from your phone or local terminal.

Applications

There are several clients available.

bulbs-tui

TUI application written in rust created by @mtvrsh.

Source

bulbs-cli

CLI application written in python.

Source

Driver API

MethodEndpointUsageReturns
GET/ledGet LED statusstatus
GET/led/onGet LED power statustrue if LED power is ON, false otherwise
PUT/led/onPower on LEDs
GET/led/offGet LED power statustrue if LED power is OFF, false otherwise
PUT/led/offPower off LEDs
GET/led/colorGet LED colorcolor
PUT/led/color/{value}Set LED color
GET/led/brightnessGet LED brightnessbrightness
PUT/led/brightness/{value}Set LED brightness

Installation

Make sure you have just, python and pip installed. From api directory:

  1. Install dependencies
just
  1. Flash MicroPython on your ESP8266 board
# Your board should be accessible from /dev/ttyUSB0 

just flash <your-firmware-release.bin>
  1. Install API
just sync
  1. Reboot the board

Usage

GET /led/color

Request

No parameters needed.

Response

On success, 200 OK and color object.

Example

Request

curl http://$DEVICE_IP/led/color

Response 200 OK

{
	"color": "#000000"
}

PUT /led/color/{value}

Request

Value as hex color without leading #.

Response

On success, 200 OK.

On invalid input, 400 Bad Request with message object.

Example

Request

curl -X PUT http://$DEVICE_IP/led/color/5a1010

Response 200 OK

GET /led/brightness

Request

No parameters needed.

Response

On success, 200 OK and brightness object.

Example

Request

curl http://$DEVICE_IP/led/brightness

Response 200 OK

{
	"brightness": 1.0
}

PUT /led/brightness/{value}

Request

Value as number from 0 to 1.

Response

On success, 200 OK.

On invalid input, 400 Bad Request with message object.

Example

Request

curl -X PUT http://$DEVICE_IP/led/brightness/0.5

Response 200 OK


Status object

KeyValue typeValue description
onbooleanPower state
colorstringHex color
brightnessfloatNumber from 0 to 1

Color object

KeyValue typeValue description
colorstringHex color

Brightness object

KeyValue typeValue description
brightnessfloatNumber from 0 to 1

Message object

KeyValue typeValue description
messagestringActivities description
Comments

No comments yet. Be the first to ask about this board.

Ask about this board

Sign in to BoardRepo

New here? Signing in creates your account; there is no separate sign-up.