Skip to content

Models

models

Typed views of the cloud JSON payloads.

Field names on the wire are the Java field names of the app's Gson models (no naming policy, nulls omitted). Yes/no flags are the strings "S"/"N". Each model keeps the raw JSON it was built from so write endpoints (which often re-post whole objects, e.g. room-setup) can echo unknown fields back unchanged.

JsonDict module-attribute

JsonDict = dict[str, Any]

Installation dataclass

Installation(
    id_installation: int,
    id_installation_device: int,
    inst_code: str,
    description: str,
    firmware_version: str,
    active_timer: bool,
    workdays: str,
    installation_order: int,
    raw: JsonDict,
)

A Daisy box paired to the account (account-installation-list).

id_installation instance-attribute

id_installation: int

id_installation_device instance-attribute

id_installation_device: int

inst_code instance-attribute

inst_code: str

description instance-attribute

description: str

firmware_version instance-attribute

firmware_version: str

active_timer instance-attribute

active_timer: bool

workdays instance-attribute

workdays: str

installation_order instance-attribute

installation_order: int

raw class-attribute instance-attribute

raw: JsonDict = field(repr=False)

hardware_version property

hardware_version: str

Install#getHardwareVersion: workdays when it looks like x.y.z.

from_json classmethod

from_json(data: JsonDict) -> Installation

firmware_at_least

firmware_at_least(version: str) -> bool

Install#isEqualOrGreaterThan: hardware 2.0.0 and later always qualify.

Command dataclass

Command(
    id_installation_device_command: int,
    id_installation_device: int,
    id_devicetype_command_model: int,
    command_action: str,
    command_param: str,
    lowlevel_command: str,
    command_index: int,
    raw: JsonDict,
)

A command a device accepts (element of deviceCommandList / CommandCloud).

id_installation_device_command instance-attribute

id_installation_device_command: int

id_installation_device instance-attribute

id_installation_device: int

id_devicetype_command_model instance-attribute

id_devicetype_command_model: int

command_action instance-attribute

command_action: str

command_param instance-attribute

command_param: str

lowlevel_command instance-attribute

lowlevel_command: str

command_index instance-attribute

command_index: int

raw class-attribute instance-attribute

raw: JsonDict = field(repr=False)

from_json classmethod

from_json(data: JsonDict) -> Command

Timer dataclass

Timer(
    id_installation_device_timer: int,
    id_installation_device_command: int,
    timer_order: int,
    timer_date: str,
    active: bool,
    days: str,
    twilight: bool,
    sun_event: int,
    twilight_offset: int,
    command_param: str,
    raw: JsonDict,
)

A device timer (TimerCloud).

id_installation_device_timer instance-attribute

id_installation_device_timer: int

id_installation_device_command instance-attribute

id_installation_device_command: int

timer_order instance-attribute

timer_order: int

timer_date instance-attribute

timer_date: str

active instance-attribute

active: bool

days instance-attribute

days: str

twilight instance-attribute

twilight: bool

sun_event instance-attribute

sun_event: int

twilight_offset instance-attribute

twilight_offset: int

command_param instance-attribute

command_param: str

raw class-attribute instance-attribute

raw: JsonDict = field(repr=False)

from_json classmethod

from_json(data: JsonDict) -> Timer

to_json

to_json() -> JsonDict

DeviceInfo dataclass

DeviceInfo(
    id_installation_device: int,
    id_devicemodel: int,
    id_devicetype: int,
    device_code: int,
    device_index: int,
    device_order: int,
    label: str,
    sub_model: str,
    favorite: bool,
    feedback: bool,
    direct_only: bool,
    active_timer: bool,
    commands: list[Command],
    timers: list[Timer],
    raw: JsonDict,
)

A device as configured in the cloud (DeviceCloud).

id_installation_device instance-attribute

id_installation_device: int

id_devicemodel instance-attribute

id_devicemodel: int

id_devicetype instance-attribute

id_devicetype: int

device_code instance-attribute

device_code: int

device_index instance-attribute

device_index: int

device_order instance-attribute

device_order: int

label instance-attribute

label: str

sub_model instance-attribute

sub_model: str

favorite instance-attribute

favorite: bool

feedback instance-attribute

feedback: bool

direct_only instance-attribute

direct_only: bool

active_timer instance-attribute

active_timer: bool

commands instance-attribute

commands: list[Command]

timers instance-attribute

timers: list[Timer]

raw class-attribute instance-attribute

raw: JsonDict = field(repr=False)

from_json classmethod

from_json(data: JsonDict) -> DeviceInfo

to_setup_json

to_setup_json() -> JsonDict

Device entry for a room-setup payload (commands and timers stripped).

Room dataclass

Room(
    id_installation_room: int,
    id_roomtype: int,
    description: str,
    order: int,
    devices: list[DeviceInfo],
    raw: JsonDict,
)

A room and its devices (RoomCloud).

id_installation_room instance-attribute

id_installation_room: int

id_roomtype instance-attribute

id_roomtype: int

description instance-attribute

description: str

order instance-attribute

order: int

devices instance-attribute

devices: list[DeviceInfo]

raw class-attribute instance-attribute

raw: JsonDict = field(repr=False)

from_json classmethod

from_json(data: JsonDict) -> Room

to_setup_json

to_setup_json(id_installation: int) -> JsonDict

Body for room-setup (session fields are added by the client).

StatusItem dataclass

StatusItem(
    status_item: str,
    status_value: str,
    statusitem_code: str,
    lowlevel_statusitem: str,
    id_installation_device_statusitem: int,
    id_devicetype_statusitem_model: int,
)

One entry of status-device-list.

status_item instance-attribute

status_item: str

status_value instance-attribute

status_value: str

statusitem_code instance-attribute

statusitem_code: str

lowlevel_statusitem instance-attribute

lowlevel_statusitem: str

id_installation_device_statusitem instance-attribute

id_installation_device_statusitem: int

id_devicetype_statusitem_model instance-attribute

id_devicetype_statusitem_model: int

code property

code: str

The item name; the app switches on statusItem.

from_json classmethod

from_json(data: JsonDict) -> StatusItem

ScenarioStep dataclass

ScenarioStep(
    id_installation_device_command: int,
    command_index: int,
    command_param: str,
)

A step of a scenario (idInstallationDeviceCommand + value).

id_installation_device_command instance-attribute

id_installation_device_command: int

command_index instance-attribute

command_index: int

command_param instance-attribute

command_param: str

from_json classmethod

from_json(data: JsonDict) -> ScenarioStep

to_json

to_json() -> JsonDict

Scenario dataclass

Scenario(
    id_installation_scenario: int,
    description: str,
    icon: int,
    order: int,
    id_installation_room: int,
    steps: list[ScenarioStep],
    id_installation_device: int,
    raw: JsonDict,
)

A scenario (ScenarioCloud).

id_installation_scenario instance-attribute

id_installation_scenario: int

description instance-attribute

description: str

icon instance-attribute

icon: int

order instance-attribute

order: int

id_installation_room instance-attribute

id_installation_room: int

steps instance-attribute

id_installation_device instance-attribute

id_installation_device: int

raw class-attribute instance-attribute

raw: JsonDict = field(repr=False)

from_json classmethod

from_json(data: JsonDict) -> Scenario

NetParam dataclass

NetParam(ip: str, ssid: str)

Parsed NET_PARAM status item of the box: "IP: a.b.c.d NameNet: ssid".

ip instance-attribute

ip: str

ssid instance-attribute

ssid: str

parse classmethod

parse(value: str) -> NetParam | None

yn

yn(value: Any) -> bool

Decode a Teleco "S"/"N" flag.

to_yn

to_yn(value: bool) -> str