Water valve Sonoff SWB-BSP

Could the « water flow » feature be added?

What model is this?

It’s the first one at the top left: SWV

ok so you just want the flow (water flow rate)?

Can you take a screenshot of the Exposures and Status view of your valve? Just to check what I can add other useful exposures in Gladys

From what I’ve seen regarding the flow rate, each manufacturer has its own name for this feature, unlike switches or other « simple » functions, for example.

On the development side, I don’t know if it’s possible, but it would be great to have a « group » where you can put all the names that will be given (I hope I’m being clear…).

I have a Sonoff SWV and here are all the states including the flow:

{
    "auto_close_when_water_shortage": "ENABLE",
    "battery": 48,
    "current_device_status": "normal_state",
    "daily_irrigation_volume": 12,
    "flow": 0,
    "irrigation_end_time": 1783243880,
    "irrigation_start_time": 1783243462,
    "last_seen": "2026-07-05T16:19:47+02:00",
    "linkquality": 132,
    "real_time_irrigation_duration": 600,
    "real_time_irrigation_volume": 535,
    "state": "OFF",
    "update": {
        "installed_version": 4100,
        "latest_release_notes": null,
        "latest_source": "https://raw.githubusercontent.com/Koenkk/zigbee-OTA/master/images/Sonoff/zbswv_v1.0.4.ota",
        "latest_version": 4100,
        "state": "idle"
    }
}

On my side, I retrieve the real_time_irrigation_duration and real_time_irrigation_volume via a virtual MQTT device, but I wouldn’t say no to automatic retrieval either :wink:

Does this type of device work well? What is the purpose of the feature below?

Works great for me for automatic watering of the vegetable garden and plants, and if I have water in my tanks, I activate the pump to avoid using the urban network (with a manual bypass for the tank<>urban).

This is the volume of water (in liters) that passes in real time: very practical for adding 300 liters to the pool and automatically stopping the valve :wink:

It would indeed be great to also retrieve this data and have it feed into a graph

I’ll take care of it as soon as possible

When I have an image available, @mutmut, could you test it? Because I don’t have any equipment to test with.

no problem!

Here is the test image: docker pull willde71/gladys-test:zigbee-sonoff-swv which will be available within 20 minutes.

This is a first draft, there are surely points to correct as I can’t test it.

I’d be happy to test since I have this valve! However, you need to explain how to do it properly, given that I haven’t used SSH commands much.

Hi @Chris75 :waving_hand:

These manipulations require good technical skills, and you should definitely not perform them on your production mini-PC, as they can result in data loss :warning:

If you still want to help, the best thing to do is to set up a test environment on a computer.

You can install Docker and then run a test container by following this tutorial:

After that, in this specific case, I think the feature will arrive very quickly in Gladys in production, so maybe don’t bother :wink:

Okay, I understand and I won’t take that risk!
But can I install Docker on a Windows 11 PC?

You can use Docker Desktop on Windows, but there are some limitations. In practice, Docker only works natively on Linux: Docker Desktop therefore launches a Linux virtual machine on your Windows PC.

As a result, Gladys will start up, but all features that require direct network access (device discovery, certain protocols, etc.) will not work properly.

On the other hand, to test the Zigbee2MQTT integration, it should work if you connect it to your existing external MQTT broker.

oops: it’s not very simple for me yet, but I’ll try it on a PC that’s not at risk!
However, I didn’t quite understand how I could retrieve my Zigbee devices in this Gladys test instance?

You can configure the Zigbee2MQTT integration of your test instance to connect to the MQTT broker of your production instance, the one to which your devices are already connected.

This way, you test the new behavior with exactly the same equipment as in your production environment, without having to re-pair them.

It’s risk-free for your production instance. :slightly_smiling_face:

Thanks. So if I understand correctly: on the test instance, I configure ZigBee2mqtt as shown in the picture below, even if the test instance is running on a different PC than the production one?