EasyBulb API Documentation v1.0

Server details

The current server IP is:

http://api.easybulb.com/v1/

Example:

http://api.easybulb.com/v1/rgbw/on

Authentication

The current API has no authentication as such, but relies on the user providing their MAC address as a HTTP header within each request.

MAC: DE:AD:BE:EF:CA:FE

Making requests

Requests are either GET, POST or DELETE.

If a request is successful it will return...

{
	'success':true
}

If a request fails it will return...

{
	'sucess':false,
	'error':'Error message here'
}

End-points

All end-points accepting the “groupId” parameter can have the “groupId” omitted to send the command to all bulbs.

GET rgbw/on/<groupId>
GET rgbw/off/<groupId>
GET white/on/<groupId>
GET white/off/<groupId>

Mood mode (RGBW only)

GET rgbw/moodon/<groupId>
GET rgbw/moodoff/<groupId>

Changing colour (RGBW)

POST rgbw/colour/<groupId>

Example body:

{'colour':75} // available values for color are between 0 and 255.

Changing brightness (RGBW)

POST rgbw/brightness/<groupId>

Example body:

{'brightness':5} // available values for brightness are between 2 and 20

White bulb adjustments

GET white/blue/<groupId>
GET white/yellow/<groupId>
GET white/brightnessup/<groupId>
GET white/brightnessdown/<groupId>

Timers

GET timers/

Return example:

{
	"status": "success",
	"timers": [
	{
		"repeats": 31,
		"group": 0,
		"onTime": "09:00:00",
		"monitorType": 4,
		"offTime": "17:00:00",
		"id": 1
	},
	{
		"repeats": 31,
		"group": 0,
		"onTime": "04:00:00",
		"monitorType": 4,
		"offTime": "05:00:00", "id": 2
	}
	]
}

The repeats value is set using integer flags so you can check the days by using a binary & operand with the following values:

Monday : 1
Tuesday : 2
Wednesday : 4
Thursday : 8
Friday : 16
Saturday : 32
Sunday : 64

So in the above example repeats 31 will return true for values of Monday through Friday meaning it is set to repeat on weekdays.

POST timers/

Post body example:

{
	"onTime":"09:00:00.000000",
	"offTime":"17:00:00.000000",
	"repeats": 31,
	"group":0,
	"monitorType":4
}
DELETE timers/<timedId>

Sleep mode

GET sleep/

Return example:

[
{
	"monitorType": 4,
	"sleepAfter": 360,
	"group": 0,
	"id": 1,
	"startTime": "2014-05-28 09:18:16.587603"
},
{
	"monitorType": 4,
	"sleepAfter": 1800,
	"group": 0,
	"id": 2,
	"startTime": "2014-05-28 09:18:31.164407"
}
]

POST sleep/

Body example:

{
	"sleepAfter":1800,
	"group":0,
	"monitorType":4
}
DELETE sleep/<sleepId>