python-amazon-echo 0.3.3__tar.gz → 0.3.4__tar.gz
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.
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/CHANGELOG.md +13 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/PKG-INFO +10 -7
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/README.md +9 -6
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/pyproject.toml +1 -1
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/__init__.py +1 -1
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/const.py +1 -1
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/endpoints.py +5 -1
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/test_client.py +15 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/test_models.py +1 -1
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/.gitignore +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/LICENSE +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/__main__.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/auth.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/client.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/exceptions.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/local.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/models.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/phrases.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/push.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/src/amazon_echo/py.typed +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/__init__.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/conftest.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/automations.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/devices.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/graphql_endpoints.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/graphql_smart_home.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/history.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/notifications.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/np_player.json +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/test_auth.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/test_local.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/test_push.py +0 -0
- {python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/test_smart_home.py +0 -0
|
@@ -4,6 +4,19 @@ All notable changes to this project are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.3.4] - 2026-11-16
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `ambient_mode_supported` in the endpoint states: Fire TV lists ambient mode but
|
|
12
|
+
never reports its state, so callers can still offer the control. Ambient
|
|
13
|
+
mode, smart-home power and brightness were verified live.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- README: `set_background_image` documented as not working on current
|
|
18
|
+
accounts (verified live); `send_mobile_push` delivery not confirmed.
|
|
19
|
+
|
|
7
20
|
## [0.3.3] - 2026-11-16
|
|
8
21
|
|
|
9
22
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-amazon-echo
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: Async Python client for Amazon Echo / Alexa devices: state, settings, media, notifications, lists, HTTP/2 push and LAN discovery
|
|
5
5
|
Project-URL: Homepage, https://github.com/hudsonbrendon/python-amazon-echo
|
|
6
6
|
Project-URL: Repository, https://github.com/hudsonbrendon/python-amazon-echo
|
|
@@ -245,28 +245,31 @@ with mocked HTTP.
|
|
|
245
245
|
| `create_reminder`, `delete_notification` | live (a reminder 320 days ahead was created and deleted) |
|
|
246
246
|
| `create_alarm` | music alarm verified live on 2026-11-16 (`music=`, reusing a Spotify music alarm made by voice): created on an Echo Plus with the requested date and time, then deleted. A plain alarm is ported, not replayed live |
|
|
247
247
|
| `create_alarm(music=…)` (music alarm that reuses the station of an existing one) | ported from Alexa Media Player's request, never sent |
|
|
248
|
-
| `play_music(timer=…)` (stop after that many seconds) |
|
|
248
|
+
| `play_music(timer=…)` (stop after that many seconds) | verified live on 2026-11-16 (Spotify): the music stopped by itself, though not at the exact second (25 s asked → stopped at 26 s; 20 s asked → about 38 s) |
|
|
249
249
|
| `create_timer` | verified live on an Echo Plus (pt-BR): a 12-minute timer, with and without a name, created and deleted. It is a typed request with the duration in words; English phrases are unit-tested only |
|
|
250
250
|
| `set_wake_word` | ported |
|
|
251
|
-
| `speak`, `announce`, `text_command`, `play_sound`, `play_music`, `
|
|
251
|
+
| `speak`, `announce`, `text_command`, `play_sound`, `play_music`, `info_skill`, `set_volume` | verified live on 2026-11-16 on an Echo Plus, through Home Assistant; the voice history shows each request and Alexa's answer |
|
|
252
|
+
| `launch_skill`, `run_routine`, `stop`, `send_drop_in_notification` | ported, not replayed live |
|
|
253
|
+
| `send_mobile_push` | sent live three times on 2026-11-16 (with and without the device fields, the second identical to Alexa Media Player's request); Amazon accepted all three but none reached the owner's phone. The phone's Alexa app registration lists no enabled notification types, so the cause is most likely on the phone; not proven |
|
|
252
254
|
| `media_command`, `bluetooth_connect`, `bluetooth_disconnect`, `reboot` | ported |
|
|
253
255
|
| `get_lists`, `get_list_items` | live read |
|
|
254
256
|
| `add_list_item`, `update_list_item`, `delete_list_item` | ported |
|
|
255
257
|
| `get_voice_history` | live read |
|
|
256
|
-
| `call_feature` |
|
|
258
|
+
| `call_feature` | verified live on 2026-11-16 (see the two rows below) |
|
|
257
259
|
| `get_endpoint_states` with the 0.2.0 query (illuminance, motion, humidity, air quality) | live read: a few hundred endpoints, no GraphQL error. Four devices advertise a light sensor and report no value; no device of the account reports motion, humidity or air quality, so those are unit tested only |
|
|
258
260
|
| `get_smart_home_endpoints` | live read; power, brightness, colour, colour temperature, temperature, battery, contact, motion and lock states and the operation names all parsed |
|
|
259
261
|
| `parse_endpoint_update` (smart-home push) | ported, not replayed live — no push stream on the test session |
|
|
260
|
-
| Smart-home operations through `call_feature`
|
|
262
|
+
| Smart-home operations through `call_feature` | `turnOn`, `turnOff` and `setBrightness` verified live on 2026-11-16 on a Tuya lamp linked to Alexa (Amazon reported each new state; the lamp was put back as it was). `setColor`, `setColorTemperature`, `setMode`, `lock`, `unlock` are ported, not replayed live; the payload of `setColorTemperature` is inferred |
|
|
263
|
+
| Fire TV ambient mode (`call_feature(…, "toggle", "turnOn"/"turnOff", instance="FTV.AmbientMode")`) | verified live on 2026-11-16 on a Fire TV Stick 4K Max: ADB showed the ambient app in front after `turnOn` and the previous app back after `turnOff`. Amazon lists the feature but never reports its state, so `get_endpoint_states` gives `ambient_mode_supported` with `ambient_mode` None |
|
|
261
264
|
| `get_communication_preferences` | verified live on an Echo Plus. The service is flaky for this account: on 2026-11-16 it answered HTTP 503 to roughly nine requests out of ten, on both the `.com` and the marketplace host |
|
|
262
265
|
| `set_communications`, `set_announcements`, `set_drop_in` | verified live on 2026-11-16 with no-op writes (the value just read) on an Echo Plus, read back unchanged; each took up to six attempts because of the 503s above |
|
|
263
266
|
| `get_device_preferences`, `get_kids_mode`, `get_children`, `get_kids_profile` | live read |
|
|
264
267
|
| `set_kids_mode` | ported, not replayed live — it changes how a device behaves |
|
|
265
268
|
| `get_guard` | live for an account without Guard (the appliance list is read, no panel is found, None); the state read is ported — the test account has no Guard |
|
|
266
269
|
| `set_guard` | ported, not replayed live — Guard was not touched |
|
|
267
|
-
| `
|
|
270
|
+
| `send_sequence`, `announce(method=…)` | ported, not replayed live |
|
|
268
271
|
| `enable_alarm`, `disable_alarm`, `skip_next_alarm` | ported, not replayed live |
|
|
269
|
-
| `set_background_image` |
|
|
272
|
+
| `set_background_image` | **does not work any more**: tried live on 2026-11-16 on an Echo Show 5, Amazon answers 200 but the background stays Amazon's (`/api/background-image` still reads `CURATIONS_SEASONAL`); a PUT answers 404. The current Alexa app uploads the picture through a native module instead. Kept for accounts where it still works |
|
|
270
273
|
| `PushClient` | handshake live (HTTP/2, 200, multipart boundary). the stream is then closed within ~1 s because the test session shares its registration with a running `alexa_media` (one stream per registration, see *Known limitations*); event parsing is unit tested only |
|
|
271
274
|
| `probe_local`, `is_reachable` | live (two Echo models answer, a smart TV of another brand returns None) |
|
|
272
275
|
|
|
@@ -221,28 +221,31 @@ with mocked HTTP.
|
|
|
221
221
|
| `create_reminder`, `delete_notification` | live (a reminder 320 days ahead was created and deleted) |
|
|
222
222
|
| `create_alarm` | music alarm verified live on 2026-11-16 (`music=`, reusing a Spotify music alarm made by voice): created on an Echo Plus with the requested date and time, then deleted. A plain alarm is ported, not replayed live |
|
|
223
223
|
| `create_alarm(music=…)` (music alarm that reuses the station of an existing one) | ported from Alexa Media Player's request, never sent |
|
|
224
|
-
| `play_music(timer=…)` (stop after that many seconds) |
|
|
224
|
+
| `play_music(timer=…)` (stop after that many seconds) | verified live on 2026-11-16 (Spotify): the music stopped by itself, though not at the exact second (25 s asked → stopped at 26 s; 20 s asked → about 38 s) |
|
|
225
225
|
| `create_timer` | verified live on an Echo Plus (pt-BR): a 12-minute timer, with and without a name, created and deleted. It is a typed request with the duration in words; English phrases are unit-tested only |
|
|
226
226
|
| `set_wake_word` | ported |
|
|
227
|
-
| `speak`, `announce`, `text_command`, `play_sound`, `play_music`, `
|
|
227
|
+
| `speak`, `announce`, `text_command`, `play_sound`, `play_music`, `info_skill`, `set_volume` | verified live on 2026-11-16 on an Echo Plus, through Home Assistant; the voice history shows each request and Alexa's answer |
|
|
228
|
+
| `launch_skill`, `run_routine`, `stop`, `send_drop_in_notification` | ported, not replayed live |
|
|
229
|
+
| `send_mobile_push` | sent live three times on 2026-11-16 (with and without the device fields, the second identical to Alexa Media Player's request); Amazon accepted all three but none reached the owner's phone. The phone's Alexa app registration lists no enabled notification types, so the cause is most likely on the phone; not proven |
|
|
228
230
|
| `media_command`, `bluetooth_connect`, `bluetooth_disconnect`, `reboot` | ported |
|
|
229
231
|
| `get_lists`, `get_list_items` | live read |
|
|
230
232
|
| `add_list_item`, `update_list_item`, `delete_list_item` | ported |
|
|
231
233
|
| `get_voice_history` | live read |
|
|
232
|
-
| `call_feature` |
|
|
234
|
+
| `call_feature` | verified live on 2026-11-16 (see the two rows below) |
|
|
233
235
|
| `get_endpoint_states` with the 0.2.0 query (illuminance, motion, humidity, air quality) | live read: a few hundred endpoints, no GraphQL error. Four devices advertise a light sensor and report no value; no device of the account reports motion, humidity or air quality, so those are unit tested only |
|
|
234
236
|
| `get_smart_home_endpoints` | live read; power, brightness, colour, colour temperature, temperature, battery, contact, motion and lock states and the operation names all parsed |
|
|
235
237
|
| `parse_endpoint_update` (smart-home push) | ported, not replayed live — no push stream on the test session |
|
|
236
|
-
| Smart-home operations through `call_feature`
|
|
238
|
+
| Smart-home operations through `call_feature` | `turnOn`, `turnOff` and `setBrightness` verified live on 2026-11-16 on a Tuya lamp linked to Alexa (Amazon reported each new state; the lamp was put back as it was). `setColor`, `setColorTemperature`, `setMode`, `lock`, `unlock` are ported, not replayed live; the payload of `setColorTemperature` is inferred |
|
|
239
|
+
| Fire TV ambient mode (`call_feature(…, "toggle", "turnOn"/"turnOff", instance="FTV.AmbientMode")`) | verified live on 2026-11-16 on a Fire TV Stick 4K Max: ADB showed the ambient app in front after `turnOn` and the previous app back after `turnOff`. Amazon lists the feature but never reports its state, so `get_endpoint_states` gives `ambient_mode_supported` with `ambient_mode` None |
|
|
237
240
|
| `get_communication_preferences` | verified live on an Echo Plus. The service is flaky for this account: on 2026-11-16 it answered HTTP 503 to roughly nine requests out of ten, on both the `.com` and the marketplace host |
|
|
238
241
|
| `set_communications`, `set_announcements`, `set_drop_in` | verified live on 2026-11-16 with no-op writes (the value just read) on an Echo Plus, read back unchanged; each took up to six attempts because of the 503s above |
|
|
239
242
|
| `get_device_preferences`, `get_kids_mode`, `get_children`, `get_kids_profile` | live read |
|
|
240
243
|
| `set_kids_mode` | ported, not replayed live — it changes how a device behaves |
|
|
241
244
|
| `get_guard` | live for an account without Guard (the appliance list is read, no panel is found, None); the state read is ported — the test account has no Guard |
|
|
242
245
|
| `set_guard` | ported, not replayed live — Guard was not touched |
|
|
243
|
-
| `
|
|
246
|
+
| `send_sequence`, `announce(method=…)` | ported, not replayed live |
|
|
244
247
|
| `enable_alarm`, `disable_alarm`, `skip_next_alarm` | ported, not replayed live |
|
|
245
|
-
| `set_background_image` |
|
|
248
|
+
| `set_background_image` | **does not work any more**: tried live on 2026-11-16 on an Echo Show 5, Amazon answers 200 but the background stays Amazon's (`/api/background-image` still reads `CURATIONS_SEASONAL`); a PUT answers 404. The current Alexa app uploads the picture through a native module instead. Kept for accounts where it still works |
|
|
246
249
|
| `PushClient` | handshake live (HTTP/2, 200, multipart boundary). the stream is then closed within ~1 s because the test session shares its registration with a running `alexa_media` (one stream per registration, see *Known limitations*); event parsing is unit tested only |
|
|
247
250
|
| `probe_local`, `is_reachable` | live (two Echo models answer, a smart TV of another brand returns None) |
|
|
248
251
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-amazon-echo"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.4"
|
|
8
8
|
description = "Async Python client for Amazon Echo / Alexa devices: state, settings, media, notifications, lists, HTTP/2 push and LAN discovery"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -118,7 +118,8 @@ def parse_features(
|
|
|
118
118
|
|
|
119
119
|
Keys: ``reachable``, ``temperature`` (°C), ``humidity`` (%),
|
|
120
120
|
``illuminance`` (lx), ``motion``, ``contact`` (True = open), ``battery``
|
|
121
|
-
(%), ``remote_battery`` (%), ``volume``, ``ambient_mode
|
|
121
|
+
(%), ``remote_battery`` (%), ``volume``, ``ambient_mode`` (with
|
|
122
|
+
``ambient_mode_supported``, set even when Amazon gives no state), ``power``,
|
|
122
123
|
``brightness`` (0-100), ``color`` (``hue`` 0-360, ``saturation`` and
|
|
123
124
|
``brightness`` 0-1), ``color_temperature`` (K), ``lock`` (``LOCKED`` /
|
|
124
125
|
``UNLOCKED`` / ``JAMMED``), ``mode`` with ``mode_instance`` and
|
|
@@ -134,6 +135,9 @@ def parse_features(
|
|
|
134
135
|
# two features can carry a battery: keep the one that reads
|
|
135
136
|
if value is not None or state.get(key) is None:
|
|
136
137
|
state[key] = value
|
|
138
|
+
if name == "toggle" and instance == AMBIENT_MODE_INSTANCE:
|
|
139
|
+
# Fire TV lists the feature but never reports its state (observed)
|
|
140
|
+
state["ambient_mode_supported"] = True
|
|
137
141
|
options = dig(feature, "configuration", "modeOptions")
|
|
138
142
|
if name == "mode" and options:
|
|
139
143
|
state["mode_instance"] = instance
|
|
@@ -1706,3 +1706,18 @@ async def test_get_media_idle_without_sessions(client, session, office):
|
|
|
1706
1706
|
session.add("GET", "/api/np/player", {"playerInfo": {}})
|
|
1707
1707
|
session.add("GET", "/api/np/list-media-sessions", {"mediaSessionList": []})
|
|
1708
1708
|
assert (await client.get_media(office)).state == "idle"
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
def test_ambient_mode_supported_without_state():
|
|
1712
|
+
from amazon_echo.endpoints import parse_features
|
|
1713
|
+
|
|
1714
|
+
state = parse_features(
|
|
1715
|
+
[
|
|
1716
|
+
{
|
|
1717
|
+
"name": "toggle",
|
|
1718
|
+
"instance": "FTV.AmbientMode",
|
|
1719
|
+
"properties": [{"name": "toggleState", "type": "RETRIEVABLE"}],
|
|
1720
|
+
}
|
|
1721
|
+
]
|
|
1722
|
+
)
|
|
1723
|
+
assert state == {"ambient_mode_supported": True}
|
|
@@ -7,7 +7,7 @@ from amazon_echo import Device, Notification, PushEvent
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
def test_public_api():
|
|
10
|
-
assert amazon_echo.__version__ == "0.3.
|
|
10
|
+
assert amazon_echo.__version__ == "0.3.4"
|
|
11
11
|
for name in amazon_echo.__all__:
|
|
12
12
|
assert hasattr(amazon_echo, name)
|
|
13
13
|
assert issubclass(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_amazon_echo-0.3.3 → python_amazon_echo-0.3.4}/tests/fixtures/graphql_smart_home.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|