-
Notifications
You must be signed in to change notification settings - Fork 785
[Device Support Request] Sonoff SWV-BSP Smart Water Valve #3298
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
Comments
Just got one of these and can provide some of the info missing above: Signature:
Diagnostic info attached. Let me know if there's more info I can provide |
Cluster |
schedule seems to be handled as part of the custom cluster above in the following attribute the logic to serialize/de-serialize its content can be seen here: |
I did find reference in the zigbee2mqtt handler about the SWV valve. It does mention in the list about the water flow and the status which shows if it is leaking, no pressure... It can be found here: |
This is the CL that added much of the code. Notice that they also had to edit the |
I am also interested in this device support. I own the device and can provide any information or perform any test if needed. Thanks! |
Hi all, I've just created PR zigpy/zha#187 for zha, which implements at least the flow rate sensor part of this request. I plan to look at implementing a device handler for |
I've just pushed up #3340 and zigpy/zha#189, which implements device quirk and Home Assistant sensors for valve leak status and water supply status. Other than some device weirdness around having to ensure manufacturer_specific is not set on attribute read, this wasn't too bad to add in the end. This is working nicely for my irrigation setup so far: That should hopefully be everything that was initially requested for this request. There are however other features supported in Zigbee2MQTT (scheduling, shutoff timer etc) that probably could be added as a future enhance, which again I might look at if I get some time. |
Thanks a lot, that is a good improvement. Now a newbie question, when will this quirck be available in Home Assistant? Can I manually upgrade ZHA or do I have to wait for a new HA release? On the other hand, regarding the other features available in Zigbee2MQTT like scheduling (timed and quantitative), I think that is quite important to have them available. Rely in HA for scheduling the irrigation maybe is not the best option as any failure will affect our plants wellbeing :) Been able to define and save the schedules in the SWV device will keep the irrigation working even if HA or the Zigbee network is completely dead. I do not have the skills to do it by my own, but I am available for testing as I own the SWV. |
Is there any chance to get the amount of water (total liters)? That would be super usefull :D |
My two cents regarding scheduling, specifically turn-on scheduling. The device will be fairly simple (e.g., time of day, though it might have another way to schedule). It definitely won't have sun-based scheduling, forecast-based scheduling, etc. So it's kinda a weird User Experience if it supports some on-device scheduling but not others. Now... if you're talking about "time / flow limits" then yes, I agree that's super important. When I turn on the faucet (via HA) then I want to be able to send a "turn off in X" parameter as part of the "on" message. That way if something happens to the network then the device still turns off. I'm a little concerned about my plants, but very concerned about my water running for days. The issue could be something as simple as me rebooting HA at the time that my "turn off" automation is supposed to run. |
nice! but how do we get updates for the ZHA in Hass? i don't see these options in my list |
guys anyone who can tell us how to get the latest updates? |
it seems the related PRs haven't been merged yet |
Any idea when this pr will be merged? Would be great to gain access to the features @benbancroft added already. 😊 |
yeah i have been checking with every update but no luck. i don't know how ZHA works with HASS, but shouldn't it be able to update on it's own? |
guys the new version from HASS came up but still my Sonoff Smart Water Valve just shows on / off switch. nothing more. no i need to do something? |
The pull requests haven't been approved. After they're approved and merged into the production branch then the updated version of zigpy will need to be included in ZHA, and then ZHA will need to be included in HA. In theory, all these things could happen quickly, but they require approval and merging. |
i find it crazy that a pull request would need months. we have had two HA releases since this was fixed. now i have to wait for November (if i am lucky) in order to be able to control my watering safely. two times it has failed me until now and the water left running. |
I can't speak to the approval process. It might have just gotten forgotten about. I don't know why you're having so many problems. If you have an HA automation set up that turns it on, then waits, then turns it off, you should only get failures if: For: b) You could build a "failsafe off" automation to run, e.g., every 15 minutes and turn the water off. The more frequently it runs and the longer your watering period the more likely you are to have issues with this (ie, you'll turn off while it should still be one). If that's a problem, you could add a datetime helper or something as a second check. |
i had two failures 1 was because my HASS crashed..... lucky eh? i also have a friend who had this issue with bad signal so i don't want to be dependent on critical things like that to HASS. since the device supports natively the solution to my problem.... and since it is fixed... i want that hotfix. because to me... this is a hotfix. so having all these steps for "approval" for something that i should be able to access as beta or early-release..... it's annoying. especially when HASS has update for every single thing.... except ZHA. |
First of all, I totally agree with the comments regarding the long waiting till we get the update, but, in addition to that and AFAIK, the PR #3340 only covers basic feedback sensors from the device (flow measurement and leakage status) but no specific commands like "turn on with shutdown timer" as some of you are expecting. Please correct me if I am wrong. |
you are correct. i am hoping that someone will soon figure it out. from what i have read, sonoff made it in a way that when you send the turn on command... you can also pass parameters for water flow and time. the sensors that "exists" at the moment will give me an extra way of checking the system on event changes. i like the simplicity of ZHA but man.... Z2M had these features since day one. i have never gotten to the technical details between these two (ZHA and Z2M). i just found the ZHA easier and faster to use. |
Can we please move the discussion elsewhere, e.g., GH discussions? |
I created PR #3930 that adds these features:
In my environment everything works, could someone help testing it? |
Has an “open for” function already been implemented? So that the valve closes again automatically after a set time? In my opinion, this is a very important safety feature |
With PR #3930, I tried to implement that. It has been labeled "waiting for reviewer response". I'm setting up the system for the spring and plan to use it as a custom quirk. |
it is good seeing someone trying to make this device work properly. i must be missing a lot of knowledge or information because the fact that we have to wait for someone's "approval - review"... and then wait for the next version of HASS that will include the changes.... it is simply nuts. Micz thank you for your effort. I don't know if we are going to magically see the changes when they happen or we have to reconfigure the device but at least you made a progress. |
i took the quirk code from PR #3930 and edited it to hardcode a maximum of 20 minutes valve open time and use it always when the device is turned on, so that even if i forget or connection is lost it turns off after 20 mins. I have this running in my garden with 4 of those devices. it works well for me like this, but the on_time should be a setting in the UI. unfortunately setting the kwargs["on_time"] through the UI did not work in my case. https://gist.github.com/etienne678/e2670600872c5b4021f9ec390edae661 |
@etienne678 which firmware version do you have on the SWVs? |
@micz i updated it through the ewelink app last week before i switched them over to HA / ZHA. |
I have 0x00001004, maybe that's why it's not working. I never tried it with 1003. |
Before starting the work on this quirk I set up a test network with a spare coordinator using zigbee2mqtt to see how the device works there. So the device was updated to 1004. |
Problem description
Currently only opening and closing the valve is possible however the Sonoff hub and Zigbee2MQTT support pulling in if there is an issue with the valve and the flow data from the valve which would be fantastic to be able to use in ZHA.
Solution description
It would be great if a custom quirk could be created however I have struggled to follow along with the details of how to create the custom device handlers. I was hoping the work from Z2M may help point to how to pull the information but the information does not look similar to the Zwave standard where you require the address details which has further complicated me understanding how to write the custom driver. Any help in someone creating this custom handler would be appreciated.
Screenshots/Video
Screenshots/Video
https://youtu.be/ofzIoxliNJo?si=9JpD2oPFi9j76muC
this video shows the details of what is shown in ZHA vs what is shown in Zigbee2MQTT
Device signature
Device signature
[Paste the device signature here]
Diagnostic information
Diagnostic information
[Paste the diagnostic information here]
Logs
Logs
Custom quirk
Custom quirk
Additional information
No response
The text was updated successfully, but these errors were encountered: