Module reference

main

class CoffeeMachine(api=None, *args, **kwargs)[source]

Bases: flask_restplus.resource.Resource

Set and get power status for the coffee machine.

get()[source]

Get the current status of the coffee machine.

post()[source]

Update the power state of the coffee machine.

endpoint = 'senseo_coffee_machine'
mediatypes()
methods = {'GET', 'POST'}
class CoffeeRun(api=None, *args, **kwargs)[source]

Bases: flask_restplus.resource.Resource

Start a coffee.

post()[source]

Send command to start coffee according to the requested size.

endpoint = 'coffee_coffee_run'
mediatypes()
methods = {'POST'}
main()[source]

Execute the Senseo APi.

pisenseo

exception SenseoPreconditionError(message: str)[source]

Bases: Exception

Define a specific error for non-readyness coffee machine.

exception SenseoCoffeeSizeError(size)[source]

Bases: Exception

Define a specific error for invalid coffee size.

class SenseoClassic(config_file: str)[source]

Bases: object

Define the setup and methods for the Senseo Classic.

May works on other kind of Senseo machine but not tested.

is_led_on()[source]

Return a boolean according to the current led status.

Returns:led powered status
Return type:Boolean
is_powered_on()[source]

Is the Senseo up?

Returns:Power status of the Senseo
Return type:Boolean
is_ready()[source]

Is the Senseo heat enough?

Returns:Heat status of the Senseo
Return type:Boolean
single_press(button: int)[source]

Press a specific button for a short period.

Parameters:button (int) – Button to press
start()[source]

Power on the Senseo.

stop()[source]

Power off the Senseo.

coffee(size: int)[source]

Start a coffee run according the selected number of mugs.

Parameters:size (integer) – Number of mug selected. 1 or 2.