Skip to content

fix(devices): route mutation PUTs to /2.3 endpoint (partial fix for #102)#108

Merged
fulviofreitas merged 2 commits into
masterfrom
draft-fix/issue-102-29805143701
Jul 21, 2026
Merged

fix(devices): route mutation PUTs to /2.3 endpoint (partial fix for #102)#108
fulviofreitas merged 2 commits into
masterfrom
draft-fix/issue-102-29805143701

Conversation

@ff-renovate

@ff-renovate ff-renovate Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Partially closes #102.

Summary

Device-mutation PUTs on /2.2/networks/{id}/devices/{id} are silently no-ops — the Eero backend returns 200 OK but the change never persists. The /2.3/ endpoint processes the same PUT correctly.

Adds DEVICE_UPDATE_ENDPOINT = "https://api-user.e2ro.com/2.3" and a private _update_device() helper. All four device-mutation methods now build absolute 2.3 URLs; reads and all other resources continue to use the 2.2 base URL.

What this actually fixes (verified live)

Tested against a real account, this branch vs master:

Method On master (2.2) On this branch (2.3)
pause_device 200 OK, paused unchanged ✅ Persists (round-trip via get_device)
set_device_nickname 200 OK, nickname unchanged ✅ Persists (round-trip via get_device)
set_device_priority 200 OK, no state change ❌ Still no state change — see #111
block_device 200 OK, no state change ❌ Still no state change — see #109

What this does NOT fix — separate follow-ups

Verification against a real account revealed that two of the four "silent no-op" mutations are broken for a different reason than the 2.2/2.3 version drift — the payload / field mapping is wrong. These need their own investigation and are being tracked separately:

Third-party corroboration

The 2.2 → 2.3 device-write drift has been independently reported by three other Eero clients, all with the same fix:

Tests

Adds v2.3 URL-targeting assertions to all four device-mutation tests in tests/api/test_devices.py. All existing tests pass; CI green after the Black fixup commit.

Follow-up refactor (deferred, not blocking)

Discussion during review flagged that a (host, version) split of the endpoint constants could ergonomically handle future drift. Not scoped here — one data point isn't enough to justify the refactor. Full proposal + trigger conditions logged in .claude/docs/api-endpoint-versioning.md.


Original draft opened by the draft-fix workflow; fixup + live-verification + honest scoping done in the current session.

fulviofreitas added a commit that referenced this pull request Jul 21, 2026
Collapses three multi-line _update_device() calls back to single lines so
they fit within the 100-char line length. Whitespace-only; no semantic
change. Unblocks the Lint & Format check on PR #108.
@fulviofreitas fulviofreitas changed the title [draft-fix] [Bug]: pause_device/block_device are silent no-ops (PUT targets /2.2 instead of /2.3) fix(devices): route mutation PUTs to /2.3 endpoint (partial fix for #102) Jul 21, 2026
@fulviofreitas
fulviofreitas marked this pull request as ready for review July 21, 2026 20:51
github-actions Bot and others added 2 commits July 21, 2026 22:55
Collapses three multi-line _update_device() calls back to single lines so
they fit within the 100-char line length. Whitespace-only; no semantic
change. Unblocks the Lint & Format check on PR #108.
@fulviofreitas
fulviofreitas force-pushed the draft-fix/issue-102-29805143701 branch from 5e5b67f to d438477 Compare July 21, 2026 22:55
@fulviofreitas
fulviofreitas merged commit 8dd7d5a into master Jul 21, 2026
11 checks passed
@fulviofreitas
fulviofreitas deleted the draft-fix/issue-102-29805143701 branch July 21, 2026 22:57
ff-renovate Bot pushed a commit that referenced this pull request Jul 21, 2026
## [5.0.12](v5.0.11...v5.0.12) (2026-07-21)

### 🐛 Bug Fixes

* **devices:** route mutation PUTs to /2.3 endpoint ([#108](#108)) ([8dd7d5a](8dd7d5a)), closes [#109](#109) [#111](#111) [#110](#110)
@ff-renovate

ff-renovate Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

🎉 This PR is included in version 5.0.12 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: pause_device/block_device are silent no-ops (PUT targets /2.2 instead of /2.3)

1 participant