Skip to content

fix(outdoor-pt): restore S340 (T8170) disable→app sync broken by #873#919

Closed
stephanevalk wants to merge 1 commit into
bropat:masterfrom
stephanevalk:pr/outdoor-pt-s340-app-sync
Closed

fix(outdoor-pt): restore S340 (T8170) disable→app sync broken by #873#919
stephanevalk wants to merge 1 commit into
bropat:masterfrom
stephanevalk:pr/outdoor-pt-s340-app-sync

Conversation

@stephanevalk

Copy link
Copy Markdown

Problem

Disabling a SoloCam S340 (T8170) from a third-party client (Home Assistant
via eufy-security-ws) no longer syncs the disabled state to the Eufy mobile
app
. This worked before v4.0.0.

Fixes #916.

Root cause

PR #873 added an isOutdoorPanAndTiltCamera() branch to enableDevice() that
routes all OUTDOOR_PT_CAMERA (device type 48) devices through the wrapped
CMD_INDOOR_ENABLE_PRIVACY_MODE_S350 (param 6250) envelope, replacing the
legacy raw CMD_DEVS_SWITCH (param 1035) command.

That change was validated on the eufyCam S4 (T8172), but the S340 (T8170)
shares the same device type while still relying on the legacy 1035 path. With
only the 6250 envelope sent:

  • the S340 toggles physically, but
  • the HomeBase 3 never updates param 1035 and never pushes the change to the
    Eufy app, so the app's enabled state goes stale.

Fix

In enableDevice(), for OUTDOOR_PT_CAMERA send both P2P commands:

  • raw CMD_DEVS_SWITCH (1035) — the HB3 processes it, updates 1035, and
    pushes to the app (S340 / pre-v4 behavior).
  • the CMD_INDOOR_ENABLE_PRIVACY_MODE_S350 (6250) envelope — kept for the S4.

Each model acts on the command it understands and ignores the other, so both
keep working.

Also restores the DeviceEnabled read mapping for type 48 to
DeviceEnabledSoloProperty (1035) — the param the S340 and the Eufy app
actually read/write.

Testing

Verified on a HomeBase 3 + SoloCam S340 (T8170) via eufy-security-ws:

  • Disable from HA → camera turns off and the Eufy app reflects "Turned off"
    live
    (no app restart needed).
  • Re-enable from HA → camera turns on and the app updates.

Note for maintainer

Type 48 covers two physically different models (S340/T8170 and S4/T8172) that
share one property mapping. The write path is purely additive and safe for both.
The single shared DeviceEnabled read mapping can only point at one param; this
PR points it at 1035 (what the S340 and the app use). If S4 users depend on the
6250 read mapping from #873, a model-specific (T8170 vs T8172) split may be
preferable — happy to adjust.

…pat#873

PR bropat#873 routes all OUTDOOR_PT_CAMERA (type 48) devices through the wrapped
CMD_INDOOR_ENABLE_PRIVACY_MODE_S350 (6250) envelope. This was validated on
the eufyCam S4 (T8172) but breaks the SoloCam S340 (T8170): the S340 still
relies on the legacy CMD_DEVS_SWITCH (1035) path. With only 6250 sent, the
S340 toggles physically but the HomeBase 3 no longer updates param 1035, so
the Eufy app's enabled state goes stale.

Fix: in enableDevice() send BOTH P2P commands for type 48 - the raw
CMD_DEVS_SWITCH (1035) for the S340 and the 6250 envelope for the S4. Each
model acts on the command it understands and ignores the other. Also map
DeviceEnabled back to the 1035 (DeviceEnabledSoloProperty) param the S340
and the Eufy app actually read.

Fixes bropat#916
@github-actions

Copy link
Copy Markdown

Thanks for your contribution! 🙏

However, this pull request targets the master branch. All contributions should target the develop branch instead.

Please re-open this PR against develop:

gh pr edit 919 --base develop

Or create a new PR targeting develop from the GitHub UI.

@github-actions github-actions Bot closed this Jun 17, 2026
@stephanevalk

Copy link
Copy Markdown
Author

Re-opened against develop as requested: #920. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enableDevice for outdoor PT cameras (type 48) does not sync state to Eufy cloud — Eufy app shows no change

1 participant