Dashboard
Smart HomeThe house’s web page: the readings, and the switches, sliders and boxes a program adds.
How you reach it
Section titled “How you reach it”The Dashboard class is reached through this attribute of home.
home.dashboard
Section titled “home.dashboard”Always there.
All the attributes of home are in its table.
Methods
Section titled “Methods”start(ssid, password)
Section titled “start(ssid, password)”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) -> boolUsed in examples: Web dashboard, Smart house
stop()
Section titled “stop()”Stops the house’s web page.
stop()Used in examples: Web dashboard
is_running()
Section titled “is_running()”True while the house’s web page runs.
is_running() -> boolUsed 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
set_ssid_password(ssid, password)
Section titled “set_ssid_password(ssid, password)”Stores the network name and password that start() uses when one of the two is left out.
set_ssid_password(ssid, password)add_switch(path)
Section titled “add_switch(path)”Adds an on/off switch at the web address path (for example "/light"); returns its number for switch().
add_switch(path) -> intUsed in examples: Web dashboard
add_slider(path)
Section titled “add_slider(path)”Adds a slider at the web address path; returns its number for slider().
add_slider(path) -> intUsed in examples: Web dashboard
add_color(path)
Section titled “add_color(path)”Adds a colour picker at the web address path; returns its number for color().
add_color(path) -> intUsed in examples: Web dashboard
add_text(path)
Section titled “add_text(path)”Adds a text box at the web address path; returns its number for text().
add_text(path) -> intUsed in examples: Web dashboard
switch(number)
Section titled “switch(number)”True when the switch that add_switch() numbered number is on.
switch(number) -> Optional[bool]Used in examples: Web dashboard
slider(number)
Section titled “slider(number)”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
color(number)
Section titled “color(number)”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
text(number)
Section titled “text(number)”The text typed into the box that add_text() numbered number ("" until someone types).
text(number) -> Optional[str]Used in examples: Web dashboard
update_temperature(v)
Section titled “update_temperature(v)”Shows a temperature on the web page, in degrees Celsius.
update_temperature(v)Used in examples: Web dashboard
update_humidity(v)
Section titled “update_humidity(v)”Shows a humidity on the web page, in percent.
update_humidity(v)Used in examples: Web dashboard
update_gas(v)
Section titled “update_gas(v)”Shows a gas reading on the web page, raw 0 to 4095.
update_gas(v)Used in examples: Web dashboard
update_pot(v)
Section titled “update_pot(v)”Shows the knob’s position on the web page, raw 0 to 4095.
update_pot(v)Used in examples: Web dashboard
update_pir(v)
Section titled “update_pir(v)”Shows on the web page whether the motion sensor sees something move (True or False).
update_pir(v)Used in examples: Web dashboard
update_ldr(v)
Section titled “update_ldr(v)”Shows a light reading on the web page, raw 0 to 4095.
update_ldr(v)Used in examples: Web dashboard