fix(outdoor-pt): restore S340 (T8170) disable→app sync broken by #873#920
Open
stephanevalk wants to merge 1 commit into
Open
fix(outdoor-pt): restore S340 (T8170) disable→app sync broken by #873#920stephanevalk wants to merge 1 commit into
stephanevalk wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 toenableDevice()thatroutes all
OUTDOOR_PT_CAMERA(device type 48) devices through the wrappedCMD_INDOOR_ENABLE_PRIVACY_MODE_S350(param6250) envelope, replacing thelegacy raw
CMD_DEVS_SWITCH(param1035) 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
1035path. Withonly the
6250envelope sent:1035and never pushes the change to theEufy app, so the app's enabled state goes stale.
Fix
In
enableDevice(), forOUTDOOR_PT_CAMERAsend both P2P commands:CMD_DEVS_SWITCH(1035) — the HB3 processes it, updates1035, andpushes to the app (S340 / pre-v4 behavior).
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
DeviceEnabledread mapping for type 48 toDeviceEnabledSoloProperty(1035) — the param the S340 and the Eufy appactually read/write.
Testing
Verified on a HomeBase 3 + SoloCam S340 (T8170) via eufy-security-ws:
live (no app restart needed).
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
DeviceEnabledread mapping can only point at one param; thisPR points it at
1035(what the S340 and the app use). If S4 users depend on the6250read mapping from #873, a model-specific (T8170 vs T8172) split may bepreferable — happy to adjust.