-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathconst.py
More file actions
164 lines (153 loc) · 6.37 KB
/
const.py
File metadata and controls
164 lines (153 loc) · 6.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
"""Constants and server descriptors used across the package."""
from __future__ import annotations
from importlib.metadata import version
from types import MappingProxyType
from pyoverkiz.enums import Server
from pyoverkiz.enums.server import APIType
from pyoverkiz.models import ServerConfig
USER_AGENT = f"pyoverkiz/{version('pyoverkiz')}"
COZYTOUCH_ATLANTIC_API = "https://apis.groupe-atlantic.com"
COZYTOUCH_CLIENT_ID = (
"Q3RfMUpWeVRtSUxYOEllZkE3YVVOQmpGblpVYToyRWNORHpfZHkzNDJVSnFvMlo3cFNKTnZVdjBh"
)
NEXITY_API = "https://api.egn.prd.aws-nexity.fr"
NEXITY_COGNITO_CLIENT_ID = "3mca95jd5ase5lfde65rerovok"
NEXITY_COGNITO_USER_POOL = "eu-west-1_wj277ucoI"
NEXITY_COGNITO_REGION = "eu-west-1"
REXEL_BACKEND_API = (
"https://app-ec-backend-enduser-prod.azurewebsites.net/api/enduser/overkiz/"
)
REXEL_OAUTH_CLIENT_ID = "2b635ede-c3fb-43bc-8d23-f6d17f80e96d"
REXEL_OAUTH_SCOPE = "https://adb2cservicesfrenduserprod.onmicrosoft.com/94f05108-65f7-477a-a84d-e67e1aed6f79/ExternalProvider"
REXEL_OAUTH_TENANT = (
"https://consumerlogin.rexelservices.fr/670998c0-f737-4d75-a32f-ba9292755b70"
)
REXEL_OAUTH_POLICY = "B2C_1A_SIGNINONLYHOMEASSISTANT"
REXEL_OAUTH_TOKEN_URL = f"{REXEL_OAUTH_TENANT}/oauth2/v2.0/token?p={REXEL_OAUTH_POLICY}"
REXEL_REQUIRED_CONSENT = "homeassistant"
SOMFY_API = "https://accounts.somfy.com"
SOMFY_CLIENT_ID = "0d8e920c-1478-11e7-a377-02dd59bd3041_1ewvaqmclfogo4kcsoo0c8k4kso884owg08sg8c40sk4go4ksg"
# OAuth client secrets are public by design (embedded in mobile apps)
SOMFY_CLIENT_SECRET = "12k73w1n540g8o4cokg0cw84cog840k84cwggscwg884004kgk" # noqa: S105
LOCAL_API_PATH = "/enduser-mobile-web/1/enduserAPI/"
SERVERS_WITH_LOCAL_API = [
Server.SOMFY_EUROPE,
Server.SOMFY_OCEANIA,
Server.SOMFY_AMERICA,
]
SUPPORTED_SERVERS: MappingProxyType[str, ServerConfig] = MappingProxyType(
{
Server.ATLANTIC_COZYTOUCH: ServerConfig(
server=Server.ATLANTIC_COZYTOUCH,
name="Atlantic Cozytouch",
endpoint="https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Atlantic",
api_type=APIType.CLOUD,
),
Server.BRANDT: ServerConfig(
server=Server.BRANDT,
name="Brandt Smart Control",
endpoint="https://ha3-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Brandt",
api_type=APIType.CLOUD,
),
Server.FLEXOM: ServerConfig(
server=Server.FLEXOM,
name="Flexom",
endpoint="https://ha108-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Bouygues",
api_type=APIType.CLOUD,
),
Server.HEXAOM_HEXACONNECT: ServerConfig(
server=Server.HEXAOM_HEXACONNECT,
name="Hexaom HexaConnect",
endpoint="https://ha5-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Hexaom",
api_type=APIType.CLOUD,
),
Server.HI_KUMO_ASIA: ServerConfig(
server=Server.HI_KUMO_ASIA,
name="Hitachi Hi Kumo (Asia)",
endpoint="https://ha203-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Hitachi",
api_type=APIType.CLOUD,
),
Server.HI_KUMO_EUROPE: ServerConfig(
server=Server.HI_KUMO_EUROPE,
name="Hitachi Hi Kumo (Europe)",
endpoint="https://ha117-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Hitachi",
api_type=APIType.CLOUD,
),
Server.HI_KUMO_OCEANIA: ServerConfig(
server=Server.HI_KUMO_OCEANIA,
name="Hitachi Hi Kumo (Oceania)",
endpoint="https://ha203-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Hitachi",
api_type=APIType.CLOUD,
),
Server.NEXITY: ServerConfig(
server=Server.NEXITY,
name="Nexity Eugénie",
endpoint="https://ha106-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Nexity",
api_type=APIType.CLOUD,
),
Server.REXEL: ServerConfig(
server=Server.REXEL,
name="Rexel Energeasy Connect",
endpoint=REXEL_BACKEND_API,
manufacturer="Rexel",
api_type=APIType.CLOUD,
),
Server.SAUTER_COZYTOUCH: ServerConfig( # duplicate of Atlantic Cozytouch
server=Server.SAUTER_COZYTOUCH,
name="Sauter Cozytouch",
endpoint="https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Sauter",
api_type=APIType.CLOUD,
),
Server.SIMU_LIVEIN2: ServerConfig( # alias of https://tahomalink.com
server=Server.SIMU_LIVEIN2,
name="SIMU (LiveIn2)",
endpoint="https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Somfy",
api_type=APIType.CLOUD,
),
Server.SOMFY_EUROPE: ServerConfig( # alias of https://tahomalink.com
server=Server.SOMFY_EUROPE,
name="Somfy (Europe)",
endpoint="https://ha101-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Somfy",
api_type=APIType.CLOUD,
),
Server.SOMFY_AMERICA: ServerConfig(
server=Server.SOMFY_AMERICA,
name="Somfy (North America)",
endpoint="https://ha401-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Somfy",
api_type=APIType.CLOUD,
),
Server.SOMFY_OCEANIA: ServerConfig(
server=Server.SOMFY_OCEANIA,
name="Somfy (Oceania)",
endpoint="https://ha201-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Somfy",
api_type=APIType.CLOUD,
),
Server.THERMOR_COZYTOUCH: ServerConfig( # duplicate of Atlantic Cozytouch
server=Server.THERMOR_COZYTOUCH,
name="Thermor Cozytouch",
endpoint="https://ha110-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Thermor",
api_type=APIType.CLOUD,
),
Server.UBIWIZZ: ServerConfig(
server=Server.UBIWIZZ,
name="Ubiwizz",
endpoint="https://ha129-1.overkiz.com/enduser-mobile-web/enduserAPI/",
manufacturer="Decelect",
api_type=APIType.CLOUD,
),
}
)