# -*- coding: utf-8 -*-
# pylint: disable=too-many-locals
"""Global constants for HekrAPI module"""

#: Default application ID used within requests via cloud and local transports
DEFAULT_APPLICATION_ID = 'hekr_python_connector'
DEFAULT_APPLICATION_NAME = 'hekr_python_connector'
DEFAULT_APPLICATION_VERSION = '1.0.0.0'
DEFAULT_APPLICATION_TYPE = 'hekr'
DEFAULT_OS_VERSION = 9

#: First character of every presumably valid raw datagram
FRAME_START_IDENTIFICATION = 0x48

#: Default port to send UDP datagrams to
DEFAULT_DEVICE_PORT = 10000

#: Default amount of attempts a request should retry doing itself
DEFAULT_REQUEST_RETRIES = 2

#: Seconds count before attempting to perform next request iteration
DEFAULT_RETRY_DELAY = 1

#: Default host for controlling devices via websocket
DEFAULT_WEBSOCKET_HOST = 'fra-hub.hekreu.me'
DEFAULT_WEBSOCKET_PORT = 186

#: Default connection timeout
DEFAULT_TIMEOUT = 10.0

#: Device actions in requests/responses
ACTION_DEVICE_AUTH_REQUEST = 'appDevAuth'
ACTION_DEVICE_AUTH_RESPONSE = 'appDevAuthResp'
ACTION_CLOUD_AUTH_REQUEST = 'appLogin'
ACTION_CLOUD_AUTH_RESPONSE = 'appLoginResp'
ACTION_HEARTBEAT_REQUEST = 'heartbeat'
ACTION_HEARTBEAT_RESPONSE = 'heartbeatResp'
ACTION_COMMAND_REQUEST = 'appSend'
ACTION_COMMAND_RESPONSE = 'appSendResp'
ACTION_DEVICE_MESSAGE = 'devSend'
