-
-
Notifications
You must be signed in to change notification settings - Fork 126
Add support for Zigbee Smart Water Valve (SWV-BSP) #646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Zigbee Smart Water Valve (SWV-BSP) #646
Conversation
a0a46cd to
f222d32
Compare
f222d32 to
3dc9331
Compare
|
Hi @etienne678 Thanks for taking the time to make this PR. Question: any reason why you chose a switch accessory rather than a homekit water valve accessory? |
Hi @bwp91 , |
|
Here is an example: homebridge-ewelink/lib/device/simulation/valve-one.js Lines 52 to 60 in ed18368
|
This commit refactors the Zigbee Smart Water Valve (SWV-BSP) implementation to use the HomeKit Valve service instead of the Switch service.
This change provides a more semantically accurate and feature-rich representation of the water valve in HomeKit, including:
- **Valve Service**: Switched from Switch to the more appropriate Valve service.
- **Valve Characteristics**: Implemented support for key Valve characteristics:
- `Active`: For on/off control.
- `InUse`: To indicate active watering.
- `ValveType`: Set to Irrigation (1).
- `SetDuration`: To configure watering duration.
- `RemainingDuration`: To display remaining watering time.
- **Timer Functionality**: Added automatic valve shut-off after the set duration, enhancing irrigation control.
- **State Management**: Maintained robust state caching and error handling from previous Switch implementation.
This update provides an improved user experience for controlling Zigbee Smart Water Valves within HomeKit, aligning with the intended functionality of a valve accessory.
|
@bwp91 the Valve device does not appear in the automation section in the home app. |
did you manage to sort this at all? |
|
Tried around for two days now, didn’t work unfortunately.
… On 15. Feb 2025, at 09:37, Ben ***@***.***> wrote:
bwp91
left a comment
(homebridge-plugins/homebridge-ewelink#646)
@bwp91 the Valve device does not appear in the automation section in the home app. can you see why? when i use the switch solution it does show up.
did you manage to sort this at all?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
<https://github.com/bwp91> <#646 (comment)> <https://github.com/notifications/unsubscribe-auth/AAICNCBDQW5WJS52QFU57432P3VEVAVCNFSM6AAAAABW6UHRUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRQG44TGNJWG4>
bwp91
left a comment
(homebridge-plugins/homebridge-ewelink#646)
<#646 (comment)>
@bwp91 <https://github.com/bwp91> the Valve device does not appear in the automation section in the home app. can you see why? when i use the switch solution it does show up.
did you manage to sort this at all?
—
Reply to this email directly, view it on GitHub <#646 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAICNCBDQW5WJS52QFU57432P3VEVAVCNFSM6AAAAABW6UHRUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNRQG44TGNJWG4>.
You are receiving this because you were mentioned.
|
|
You can use the Eve for HomeKit app to create scenes for valves |
|
ooh, ok, then Valve isn't even supposed to be available for automations within the apple home app? that would explain a lot. i tried everything to make it appear there and finally gave up when it just would not work. on antother note, I tried to display other values for the default run time for the irrigation in the apple home app, because i think for irrigation valves it would be good if the user could set the duration in smaller increments as well. i tried with something like this: ´´´ |
|
I think these are a set list for all valve types, whether the accessory is native to homekit as a valve, or via homebridge. If using a valid values array did not work, then I would not know what else to suggest. Are you happy with this PR as it is? |
|
ok, thanks.
I have my garden irrigation with 4 of these Valves now working for 2 days with the changes in this PR. i currently run commit e4363e5. i tested a lot and so far it all works fine. But: I never coded a device for homebridge before and running water is involved, so i would be very happy if you could check to make sure it is done correctly before this sets someones house under water :D |
|
thank you for taking the time to do this! |
no problem. thank you for the plugin, it is great. |

Add support for Zigbee Smart Water Valve (SWV-BSP)
This PR adds support for the Zigbee Smart Water Valve (SWV-BSP) device, as requested in issue #645.
Implementation Details
Added UIID 7027 support in constants.js
Implemented basic switch functionality in zigbee-water-valve.js
Device works through Sonoff Zigbee Pro Bridge
Device Information
Device logs showing the data structure:
{
"bindInfos": {},
"subDevId": "b95a33feff1227847027",
"parentid": "10023e03d6",
"fwVersion": "1.0.2",
"battery": 100,
"trigTime": "1739203803000",
"supportPowConfig": 1,
"subDevRssi": -3,
"exceptionReport": [],
"hasException": false,
"switch": false,
"realIrrigationVolume": 0,
"realIrrigationVolumeGal": 0,
"todayWaterUsage": 0,
"todayWaterUsageGal": 0,
"controlMode": "manual",
"runningMode": 2
}
Functionality
✅ Basic on/off control from HomeKit
✅ State updates from eWeLink app reflected in HomeKit
✅ Multiple devices tested and working
Future Improvements
While this PR implements basic on/off functionality, the device has additional features that could be added in the future:
Water usage tracking
Irrigation volume monitoring
Battery level reporting
Testing
Tested with multiple SWV-BSP devices connected through a Sonoff Zigbee Pro Bridge. All devices are properly recognized and can be controlled through both HomeKit and the eWeLink app.