Skip to content

Search the documentation

Kit
Firmware

Dashboard

Smart Home

The house’s web page: the readings, and the switches, sliders and boxes a program adds.

The Dashboard class is reached through this attribute of home.

Always there.

All the attributes of home are in its table.

Starts the house’s web page: on the saved Wi-Fi with no arguments, or as its own Wi-Fi network ssid with password; True when it runs.

start(ssid=None, password=None) -> bool

Used in examples: Web dashboard, Smart house

Stops the house’s web page.

stop()

Used in examples: Web dashboard

True while the house’s web page runs.

is_running() -> bool

Used in examples: Web dashboard, Smart house

The address to type in a browser to open the house’s web page, or None when it does not run.

ip() -> Optional[str]

Used in examples: Web dashboard

Stores the network name and password that start() uses when one of the two is left out.

set_ssid_password(ssid, password)

Adds an on/off switch at the web address path (for example "/light"); returns its number for switch().

add_switch(path) -> int

Used in examples: Web dashboard

Adds a slider at the web address path; returns its number for slider().

add_slider(path) -> int

Used in examples: Web dashboard

Adds a colour picker at the web address path; returns its number for color().

add_color(path) -> int

Used in examples: Web dashboard

Adds a text box at the web address path; returns its number for text().

add_text(path) -> int

Used in examples: Web dashboard

True when the switch that add_switch() numbered number is on.

switch(number) -> Optional[bool]

Used in examples: Web dashboard

Where the slider that add_slider() numbered number is set (0.0 until someone moves it).

slider(number) -> Optional[float]

Used in examples: Web dashboard

The colour picked in the picker that add_color() numbered number, as {"r": ..., "g": ..., "b": ...}.

color(number) -> Optional[Dict[str, int]]

Used in examples: Web dashboard

The text typed into the box that add_text() numbered number ("" until someone types).

text(number) -> Optional[str]

Used in examples: Web dashboard

Shows a temperature on the web page, in degrees Celsius.

update_temperature(v)

Used in examples: Web dashboard

Shows a humidity on the web page, in percent.

update_humidity(v)

Used in examples: Web dashboard

Shows a gas reading on the web page, raw 0 to 4095.

update_gas(v)

Used in examples: Web dashboard

Shows the knob’s position on the web page, raw 0 to 4095.

update_pot(v)

Used in examples: Web dashboard

Shows on the web page whether the motion sensor sees something move (True or False).

update_pir(v)

Used in examples: Web dashboard

Shows a light reading on the web page, raw 0 to 4095.

update_ldr(v)

Used in examples: Web dashboard