climateapp script

climateapp

class climateapp.CommandlineAppDisplay(app)[source]

Bases: object

_initialize_values()[source]
aircondition_state
broker_connectionstatus
close()[source]
enginespeed
indoortemperature
loop()[source]
redraw()[source]
resource_online
vehiclespeed
class climateapp.GraphicalAppDisplay(app)[source]

Bases: climateapp.CommandlineAppDisplay

DISPLAY_TITLE = 'Climate app'
TEMPLATE_AIRCONDITION = 'Air condition: {}'
TEMPLATE_CONNECTION = 'Connection status: {}'
TEMPLATE_ENGINESPEED = 'Engine speed: {:.0f} RPM'
TEMPLATE_TEMPERATURE = 'In-car temperature: {:.1f} deg C'
TEMPLATE_VEHICLESPEED = 'Vehicle speed: {:.1f} km/h'
_button_off_handler(event)[source]
_button_on_handler(event)[source]
close()[source]

Close the GUI

loop()[source]

Update the GUI

redraw()[source]
climateapp.init_climateapp()[source]
climateapp.loop_climateapp(app)[source]
climateapp.main()[source]
climateapp.on_broker_connectionstatus_info(app, broker_connected)[source]

Callback for use when the broker connection status info is available.

climateapp.on_incoming_data(app, messagetype, servicename, signalname, payload)[source]

Callback for use when receiving a MQTT message.

Sets display fields.

climateapp.on_resource_presence(app, messagetype, servicename, signalname, payload)[source]

Callback for use when receiving a MQTT message.

Sets the presence information (on the display) about the resource in use.