aioamazondevices 6.4.5__py3-none-any.whl → 9.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ """aioamazondevices const package."""
@@ -1,114 +1,10 @@
1
- """Constants for Amazon devices."""
1
+ """aioamazondevices devices."""
2
2
 
3
- import logging
4
-
5
- _LOGGER = logging.getLogger(__package__)
6
-
7
- HTTP_ERROR_199 = 199
8
- HTTP_ERROR_299 = 299
9
-
10
- TO_REDACT = {
11
- "address",
12
- "address1",
13
- "address2",
14
- "address3",
15
- "city",
16
- "county",
17
- "customerId",
18
- "deviceAccountId",
19
- "deviceAddress",
20
- "deviceOwnerCustomerId",
21
- "given_name",
22
- "name",
23
- "password",
24
- "postalCode",
25
- "searchCustomerId",
26
- "state",
27
- "street",
28
- "user_id",
29
- }
30
-
31
- # Amazon APP info
32
- AMAZON_APP_BUNDLE_ID = "com.amazon.echo"
33
- AMAZON_APP_ID = "MAPiOSLib/6.0/ToHideRetailLink"
34
- AMAZON_APP_NAME = "AioAmazonDevices"
35
- AMAZON_APP_VERSION = "2.2.663733.0"
36
- AMAZON_DEVICE_SOFTWARE_VERSION = "35602678"
37
- AMAZON_DEVICE_TYPE = "A2IVLV5VM2W81"
38
- AMAZON_CLIENT_OS = "18.5"
39
-
40
- DEFAULT_SITE = "https://www.amazon.com"
41
- DEFAULT_HEADERS = {
42
- "Accept-Charset": "utf-8",
43
- "Accept-Encoding": "gzip",
44
- "Connection": "keep-alive",
45
- }
46
- CSRF_COOKIE = "csrf"
47
- REQUEST_AGENT = {
48
- "Amazon": f"AmazonWebView/AmazonAlexa/{AMAZON_APP_VERSION}/iOS/{AMAZON_CLIENT_OS}/iPhone", # noqa: E501
49
- "Browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0", # noqa: E501
50
- }
51
-
52
- REFRESH_ACCESS_TOKEN = "access_token" # noqa: S105
53
- REFRESH_AUTH_COOKIES = "auth_cookies"
54
-
55
- URI_DEVICES = "/api/devices-v2/device"
56
- URI_DND = "/api/dnd/device-status-list"
57
- URI_SIGNIN = "/ap/signin"
58
- URI_NEXUS_GRAPHQL = "/nexus/v1/graphql"
59
-
60
- SENSOR_STATE_OFF = "NOT_DETECTED"
61
-
62
- # File extensions
63
- SAVE_PATH = "out"
64
- HTML_EXTENSION = ".html"
65
- JSON_EXTENSION = ".json"
66
- BIN_EXTENSION = ".bin"
3
+ from .http import AMAZON_DEVICE_TYPE
67
4
 
68
5
  SPEAKER_GROUP_FAMILY = "WHA"
69
6
  SPEAKER_GROUP_MODEL = "Speaker Group"
70
7
 
71
- SENSORS: dict[str, dict[str, str | None]] = {
72
- "temperatureSensor": {
73
- "name": "temperature",
74
- "key": "value",
75
- "subkey": "value",
76
- "scale": "scale",
77
- },
78
- "motionSensor": {
79
- "name": "detectionState",
80
- "key": "detectionStateValue",
81
- "subkey": None,
82
- "scale": None,
83
- },
84
- "lightSensor": {
85
- "name": "illuminance",
86
- "key": "illuminanceValue",
87
- "subkey": "value",
88
- "scale": None,
89
- },
90
- }
91
-
92
- ALEXA_INFO_SKILLS = [
93
- "Alexa.Calendar.PlayToday",
94
- "Alexa.Calendar.PlayTomorrow",
95
- "Alexa.Calendar.PlayNext",
96
- "Alexa.Date.Play",
97
- "Alexa.Time.Play",
98
- "Alexa.News.NationalNews",
99
- "Alexa.FlashBriefing.Play",
100
- "Alexa.Traffic.Play",
101
- "Alexa.Weather.Play",
102
- "Alexa.CleanUp.Play",
103
- "Alexa.GoodMorning.Play",
104
- "Alexa.SingASong.Play",
105
- "Alexa.FunFact.Play",
106
- "Alexa.Joke.Play",
107
- "Alexa.TellStory.Play",
108
- "Alexa.ImHome.Play",
109
- "Alexa.GoodNight.Play",
110
- ]
111
-
112
8
  DEVICE_TO_IGNORE: list[str] = [
113
9
  AMAZON_DEVICE_TYPE, # Alexa App for iOS
114
10
  "A2TF17PFR55MTB", # Alexa App for Android
@@ -133,6 +29,9 @@ DEVICE_TO_IGNORE: list[str] = [
133
29
  "A133UZ2CB0IB8", # Sony Soundbar Sony HT-A5000 - issue #486
134
30
  "A2M9HB23M9MSSM", # Smartwatch Amazfit Bip U Pro - issue #507
135
31
  "A1P7E7V3FCZKU6", # Toshiba Corporation TV 32LF221U19 - issue #531
32
+ "A1NPP2J03FTS0I", # Eero Pro 6 - issue #602
33
+ "A14AIWB3T3AS1Z", # Samsung Soundbar HW-Q950A - issue #603
34
+ "APHEAY6LX7T13", # Samsung Refrigerator RS22T5561SR/AA - issue #577
136
35
  ]
137
36
 
138
37
  DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
@@ -220,6 +119,10 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
220
119
  "model": "Life P66970",
221
120
  "hw_version": "A16",
222
121
  },
122
+ "A20E9PVI3HANVQ": {
123
+ "manufacturer": "Marshall",
124
+ "model": "Marshall Uxbridge",
125
+ },
223
126
  "A25521KS9QCAMD": {
224
127
  "model": "Fire Tablet HD 7",
225
128
  "hw_version": "Gen4",
@@ -476,4 +379,42 @@ DEVICE_TYPE_TO_MODEL: dict[str, dict[str, str | None]] = {
476
379
  "model": "Echo Plus",
477
380
  "hw_version": "Gen2",
478
381
  },
382
+ "A1JJ0KFC4ZPNJ3": {
383
+ "model": "Echo Input",
384
+ "hw_version": "Gen1",
385
+ },
386
+ "A2V9UEGZ82H4KZ": {
387
+ "model": "Fire Tablet HD 10",
388
+ "hw_version": "Gen13",
389
+ },
390
+ "ALCIV0P5M8TZ0": {
391
+ "manufacturer": "Sonos Inc.",
392
+ "model": "Sonos Beam",
393
+ "hw_version": None,
394
+ },
395
+ "A1MKGHX5VQBDWX": {
396
+ "manufacturer": "Denon",
397
+ "model": "Denon Home 150",
398
+ "hw_version": None,
399
+ },
400
+ "A2X8WT9JELC577": {
401
+ "manufacturer": "ecobee Inc.",
402
+ "model": "ecobee 4 Smart Thermostat with Voice Control",
403
+ "hw_version": None,
404
+ },
405
+ "AA1IN44SS3X6O": {
406
+ "manufacturer": "ecobee Inc.",
407
+ "model": "ecobee SmartThermostat Premium",
408
+ "hw_version": None,
409
+ },
410
+ "A2ZJ8HST6J24XH": {
411
+ "manufacturer": "Sonos Inc.",
412
+ "model": "Sonos Roam 2",
413
+ "hw_version": None,
414
+ },
415
+ "A3M91KUSTM6A3P": {
416
+ "manufacturer": "Ford",
417
+ "model": "Ford SYNC 4",
418
+ "hw_version": None,
419
+ },
479
420
  }
@@ -0,0 +1,36 @@
1
+ """aioamazondevices HTTP const."""
2
+
3
+ HTTP_ERROR_199 = 199
4
+ HTTP_ERROR_299 = 299
5
+
6
+ ARRAY_WRAPPER = "generatedArrayWrapper"
7
+
8
+ # Amazon APP info
9
+ AMAZON_APP_BUNDLE_ID = "com.amazon.echo"
10
+ AMAZON_APP_ID = "MAPiOSLib/6.0/ToHideRetailLink"
11
+ AMAZON_APP_NAME = "AioAmazonDevices"
12
+ AMAZON_APP_VERSION = "2.2.663733.0"
13
+ AMAZON_DEVICE_SOFTWARE_VERSION = "35602678"
14
+ AMAZON_DEVICE_TYPE = "A2IVLV5VM2W81"
15
+ AMAZON_CLIENT_OS = "18.5"
16
+
17
+ DEFAULT_SITE = "https://www.amazon.com"
18
+ DEFAULT_HEADERS = {
19
+ "Accept-Charset": "utf-8",
20
+ "Accept-Encoding": "gzip",
21
+ "Connection": "keep-alive",
22
+ }
23
+ CSRF_COOKIE = "csrf"
24
+ REQUEST_AGENT = {
25
+ "Amazon": f"AmazonWebView/AmazonAlexa/{AMAZON_APP_VERSION}/iOS/{AMAZON_CLIENT_OS}/iPhone", # noqa: E501
26
+ "Browser": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0", # noqa: E501
27
+ }
28
+
29
+ REFRESH_ACCESS_TOKEN = "access_token" # noqa: S105
30
+ REFRESH_AUTH_COOKIES = "auth_cookies"
31
+
32
+ URI_DEVICES = "/api/devices-v2/device"
33
+ URI_DND = "/api/dnd/device-status-list"
34
+ URI_NOTIFICATIONS = "/api/notifications"
35
+ URI_SIGNIN = "/ap/signin"
36
+ URI_NEXUS_GRAPHQL = "/nexus/v1/graphql"
@@ -0,0 +1,44 @@
1
+ """aioamazondevices Additional entities const."""
2
+
3
+ SENSOR_STATE_OFF = "NOT_DETECTED"
4
+
5
+ SENSORS: dict[str, dict[str, str | None]] = {
6
+ "temperatureSensor": {
7
+ "name": "temperature",
8
+ "key": "value",
9
+ "subkey": "value",
10
+ "scale": "scale",
11
+ },
12
+ "motionSensor": {
13
+ "name": "detectionState",
14
+ "key": "detectionStateValue",
15
+ "subkey": None,
16
+ "scale": None,
17
+ },
18
+ "lightSensor": {
19
+ "name": "illuminance",
20
+ "key": "illuminanceValue",
21
+ "subkey": "value",
22
+ "scale": None,
23
+ },
24
+ }
25
+
26
+ ALEXA_INFO_SKILLS = [
27
+ "Alexa.Calendar.PlayToday",
28
+ "Alexa.Calendar.PlayTomorrow",
29
+ "Alexa.Calendar.PlayNext",
30
+ "Alexa.Date.Play",
31
+ "Alexa.Time.Play",
32
+ "Alexa.News.NationalNews",
33
+ "Alexa.FlashBriefing.Play",
34
+ "Alexa.Traffic.Play",
35
+ "Alexa.Weather.Play",
36
+ "Alexa.CleanUp.Play",
37
+ "Alexa.GoodMorning.Play",
38
+ "Alexa.SingASong.Play",
39
+ "Alexa.FunFact.Play",
40
+ "Alexa.Joke.Play",
41
+ "Alexa.TellStory.Play",
42
+ "Alexa.ImHome.Play",
43
+ "Alexa.GoodNight.Play",
44
+ ]
@@ -0,0 +1,97 @@
1
+ """aioamazondevices GraphQL queries."""
2
+
3
+ QUERY_DEVICE_DATA = """
4
+ query getDevicesBaseData {
5
+ listEndpoints(
6
+ listEndpointsInput: {
7
+ displayCategory: "ALEXA_VOICE_ENABLED"
8
+ includeHouseholdDevices: true
9
+ }
10
+ )
11
+ {
12
+ endpoints {
13
+ endpointId: id
14
+ friendlyNameObject { value { text } }
15
+ manufacturer { value { text } }
16
+ model { value { text} }
17
+ serialNumber { value { text } }
18
+ softwareVersion { value { text } }
19
+ creationTime
20
+ enablement
21
+ displayCategories {
22
+ all { value }
23
+ primary { value }
24
+ }
25
+ alexaEnabledMetadata {
26
+ iconId
27
+ isVisible
28
+ category
29
+ capabilities
30
+ }
31
+ legacyIdentifiers {
32
+ dmsIdentifier {
33
+ deviceType { value { text } }
34
+ }
35
+ chrsIdentifier { entityId }
36
+ }
37
+ legacyAppliance { applianceId }
38
+ }
39
+ }
40
+ }
41
+ """
42
+
43
+ QUERY_SENSOR_STATE = """
44
+ fragment EndpointState on Endpoint {
45
+ endpointId: id
46
+ friendlyNameObject { value { text } }
47
+ features {
48
+ name
49
+ properties {
50
+ name
51
+ type
52
+ accuracy
53
+ error { type message }
54
+ __typename
55
+ ... on Illuminance {
56
+ illuminanceValue { value }
57
+ timeOfSample
58
+ timeOfLastChange
59
+ }
60
+ ... on Reachability {
61
+ reachabilityStatusValue
62
+ timeOfSample
63
+ timeOfLastChange
64
+ }
65
+ ... on DetectionState {
66
+ detectionStateValue
67
+ timeOfSample
68
+ timeOfLastChange
69
+ }
70
+ ... on TemperatureSensor {
71
+ name
72
+ value {
73
+ value
74
+ scale
75
+ }
76
+ timeOfSample
77
+ timeOfLastChange
78
+ }
79
+ }
80
+ }
81
+ }
82
+
83
+
84
+ query getEndpointState($endpointIds: [String]!) {
85
+ listEndpoints(
86
+ listEndpointsInput: {
87
+ latencyTolerance: LOW,
88
+ endpointIds: $endpointIds,
89
+ includeHouseholdDevices: true
90
+ }
91
+ ) {
92
+ endpoints {
93
+ ...EndpointState
94
+ }
95
+ }
96
+ }
97
+ """
@@ -0,0 +1,61 @@
1
+ """aioamazondevices: schedules."""
2
+
3
+ NOTIFICATION_ALARM = "Alarm"
4
+ NOTIFICATION_MUSIC_ALARM = "MusicAlarm"
5
+ NOTIFICATION_REMINDER = "Reminder"
6
+ NOTIFICATION_TIMER = "Timer"
7
+ NOTIFICATIONS_SUPPORTED = [
8
+ NOTIFICATION_ALARM,
9
+ NOTIFICATION_MUSIC_ALARM,
10
+ NOTIFICATION_REMINDER,
11
+ NOTIFICATION_TIMER,
12
+ ]
13
+
14
+ RECURRING_PATTERNS: dict[str, str] = {
15
+ "XXXX-WD": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR",
16
+ "XXXX-WE": "FREQ=WEEKLY;BYDAY=SA,SU",
17
+ "XXXX-WXX-1": "FREQ=WEEKLY;BYDAY=MO",
18
+ "XXXX-WXX-2": "FREQ=WEEKLY;BYDAY=TU",
19
+ "XXXX-WXX-3": "FREQ=WEEKLY;BYDAY=WE",
20
+ "XXXX-WXX-4": "FREQ=WEEKLY;BYDAY=TH",
21
+ "XXXX-WXX-5": "FREQ=WEEKLY;BYDAY=FR",
22
+ "XXXX-WXX-6": "FREQ=WEEKLY;BYDAY=SA",
23
+ "XXXX-WXX-7": "FREQ=WEEKLY;BYDAY=SU",
24
+ }
25
+
26
+ WEEKEND_EXCEPTIONS = {
27
+ "TH-FR": {
28
+ "XXXX-WD": "FREQ=WEEKLY;BYDAY=MO,TU,WE,SA,SU",
29
+ "XXXX-WE": "FREQ=WEEKLY;BYDAY=TH,FR",
30
+ },
31
+ "FR-SA": {
32
+ "XXXX-WD": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,SU",
33
+ "XXXX-WE": "FREQ=WEEKLY;BYDAY=FR,SA",
34
+ },
35
+ }
36
+
37
+ # Countries grouped by their weekend type
38
+ COUNTRY_GROUPS = {
39
+ "TH-FR": ["IR"],
40
+ "FR-SA": [
41
+ "AF",
42
+ "BD",
43
+ "BH",
44
+ "DZ",
45
+ "EG",
46
+ "IL",
47
+ "IQ",
48
+ "JO",
49
+ "KW",
50
+ "LY",
51
+ "MV",
52
+ "MY",
53
+ "OM",
54
+ "PS",
55
+ "QA",
56
+ "SA",
57
+ "SD",
58
+ "SY",
59
+ "YE",
60
+ ],
61
+ }
@@ -1,4 +1,5 @@
1
- """Generated by update_sounds_list.py [2025-08-28 15:45]."""
1
+ """aioamazondevices sounds."""
2
+ # Generated by update_sounds_list.py [2025-10-23 10:03].
2
3
 
3
4
  SOUNDS_LIST = {
4
5
  "air_horn_03": "Air horn",