Diivoo Water Hose control: It's TAKE APART time!

Well, it’s summer which means time to water the lawn. And why do it manually when I have Home Assistant?

Well… From what I can see there aren’t many (any?) good vendors that sell a nice device to turn the water on/off, and those that are there seem to be a mess of private interfaces, custom apps, and very limited integrations (if any) to HA.

So I guess I have to do it the hard way and hack one of these things. My choice from Amazon was the Diivoo Wifi dual water timer model WT-09W. $50 bucks for a pile of plastic and promise.

This thread will cover my trying to use it (hint: it’s a closed system, doesn’t work, and I would not trust this “gateway” further than I can chuck it), interrogating
it (meet Mr. Screwdriver), and possibly removing it’s miserable excuse for a brain for something a bit more… privacy oriented.

If anyone else has worked on these, please feel free to chime in!

Rants on why vendors just can’t release a Zigbee device with like “Off” and “On” settings will be left for another time. Anyway, on to the show!

1 Like

Reserved for final thoughts.

First step is to try to make it work. I unpacked it, looks nice, plugged 4 AA batteries into it and set it to “pairing” mode. It wants to pair to its “Wifi hub” but my first thought was maybe it’s a Zigbee interface and would just show up in Home Assistant. So I put my Zigbee controller (with 19 other devices) into search mode and turned it on.

No such luck. Either it’s using another interface type or it’s a Zwave or something. Either way that does not work.

Second try was to use the “Tula” app to register it. Apparently Tula is some big Chinese company that’s doing AI, info gathering, and heck knows what else. However it does integrate to Home Assistant with an API key. So I gave that a shot.

No dice. The hub does not connect.

Next up was to download the “official” app. This is something called “HomGar” and to be honest it has a mediocre rating in the Apple store (2). Seems to be based in the UK, but still I have no clue what this thing is doing, who it is talking to, and how. So yeah, not too impressed. And there is no integration to Home Assistant.

sigh So I guess it’s time to open the thing up. Removing the 6 screws from the back of the unit opens it to a world of plastic, and a box with glue on it. Apparently this is their idea of waterproof connectors, I guess ok…

Anyway cutting it out and removing the screws on the inside reveals this:

Fair enough but we’re going to have to gut this thing. Chiseling off the glue/sealant revealed that the three wire pairs go in via small connectors and they are labelled on the box (nice touch). So with the back off we get this:

Next step, pulling the board to see what we have…

Ok, board removed, two chips of note.

Wireless chipset
300a
s949
335

Core processor:
ch578m
06935d26
HDM might be the manufacturer

Final stage drivers?
837
DEN

Aside from the final chips, doesn’t look like much.

So at this point I have two options:

  1. I can figure out what wireless system it uses, and if Z-Wave grab a hub for my HA system and see if I can pair to it. The wireless looks to be an off the shelf integration board, I can’t imagine they spent much time making it secure.

  2. I can mellon-ball it and run things on a Pi.

The Pi option could work: There is a nice integration that allows me to set up a Pi as a GPIO dumper and switch ports on and off from Home Assistant. I have one set up that drives a set of relays for some other experiments. So I could try running the motors right off a 1+ Rpi and see what happens.

Time to start digging around for parts. Comments welcome…

1 Like

So I’ve spent the morning working on option 2: Mellon ball the thing.

First thought was that I could send a 3.6 volt pulse to the drivers in front of the valve solenoids to “do something” but that did not work so I abandoned that line for the moment. And went to plan b:

Plan B is to toggle the buttons on the device automagically. Finding the test points for the buttons was pretty simple, and pressing the button would make the system toggle the water on or off manually. Ok, we can use this.

I set up my Pi B+ with a nice little relay hat and pigpio running in a daemon mode with the HA configuration.yaml file containing a switch device using remote_rpi_gpio. Then I wired the relay so when closed it would connect ground to the test point for one of the buttons.

Trying this manually did nothing. However when I lifted the ground from the test point the Diivoo toggled the water valve. Which means it watches the button and looks for a state change from low to high after being taken to low. Makes sense, you want the valve to open when you press and release the switch since press and hold may do something else.

So wired it up to the relay, restarted HomeAssistant to reconnect the gpio (it does not auto reconnect, need to figure that out) then created a quick script that would set the relay switch to “On”, wait 1 second, then set the relay switch to “Off”.

This turned on the water valve. Doing it again turned off the water valve.

So I have basic control!

Now this is nowhere near perfect. First I have to have a Relay hat to do it, which is a pain. I’m going to see if I can have the wires connect directly to the Rpi GPIO pins and simply toggle the pin low (to “ground” it) and then high (to let it float). This should work as both devices are using 3.6 volt signals. We shall see.

Second problem is it’s not possible to figure out the STATE of the valve. I don’t know if/how the app can tell, or if the app DOES tell. It’s still possible that it sends a positive voltage to open the valve and a negative one to close it (release the latch) but I’m not sure as sending 2 positive signals will toggle the latch and it doesn’t seem to remember the state between reboots. So there is the possibility that HA will get out of sync with the device and turn it “on” when you mean to turn it “off”.

Might need a separate water flow sensor here. Otherwise you could inadvertently flood your yard.

Still, I’m going to take this shooting match outside and try hooking it up. I would like to turn my sprinkler on and off from my bed using Home Assistant…

Edit: Pics!


1 Like

Ok. Wired it up, put it together with the three wires (signal 1, signal 2, ground), took it outside and gave it a try using the wires alone.

Sure enough grounding then un-grounding wire 1 turns on spigot #1. Good.
Grounding and un-grounding wire 2 turns on spigot #2. Good.

I then hooked it up to the sprinkler, turned on spigot #2, and left it running. When I came back an hour later it was OFF

This is Good but interesting. It means that the system has some sort of dead-man timer that if it does not get a command to “water” in a certain period of time it can force the valve closed. My guess is that applying a reverse current to the solenoids does over-ride them and shuts the water off. Which is very good, it means the system can get back into sync or shut down if say Home Assistant crashes or is rebooted while the valve is open.

It also means I need to figure out how long the valve stays open and write my automations to either work in that amount of time “chunks” or send commands every 15 minutes to do… something? Hm, will have to think about that. If I send a pulse while it is open it will simply close. Hm. This is going to require thought…

Latest pic with all three wires set. Nice of them to include the test points, they’re pretty easy to solder #24 gauge wire-wrap wire. I loop the wire through the holes to provide strain relief and route them out the antenna hole (I unsoldered the “antenna” wire as I don’t need it anymore)

Tomorrow I’ll connect a proper wiring block and hook it up to the Pi. Also need to print a water proof case for a Pi… Then after a bit I’ll see about trying it with GPIO pins only. First I want to make it through this heat with a properly watered garden…

Up and running. The Pi really needs a box, but I hooked it up bare to the water valve and created a simple script to toggle the relay closed, wait one second, then open the relay. This trips the valve and it opens for 10 minutes.

10 minutes seems to be the “dead man” time for the controller. My guess is if it doesn’t see another command or a keepalive from the wireless “hub” in that time it assumes the internet is down and shuts off the water. Not a bad thing to be honest, this can keep the system from falling out of sync.

Problem is if I send another toggle of the line within the 10 minutes it will turn the valve off. So the only way to keep it going would be to have it turn on for 10 minutes, run, shut itself off, then get another command.

This will probably drain the 6 volt batteries. Then again 10 minutes of watering is probably enough to soak the top of the ground which is the general idea.

Still, it is delightful to sit in my AC controlled (managed by Home Assistant) room and press a button to have the faucet turn on outside. I love it! It allows me to think about automations like “If the rain sensors don’t detect water in 5 days then start a watering program of 10 minutes of water daily” or something like that. Maybe water the garden with the soaker hose once in the morning, once in the evening if more than 3 days without rain"… The possibilities are endless when you have a system as flexible as this…

I’ll run with this for a week or two and report back. If anyone is reading this and finds it helpful let me know…

Quick update: I replaced the old Pi with a Pico and just soldered the wires directly to ground and the two gpio pins directly (without the relay hat). Works just fine, so you don’t need the relay which reduces the size of the Pi controller to something that can go on the back with tape.

1 Like

This is really cool. I actually just received the 4 valve version of this today and was super disappointed to find out there was no way to integrate it to home assistant. I tried sniffin some packets to see what this thing was sending back to the sever but there was nothing I could use. I am not that gifted when it comes to reverse engineering, so I might just send it back at this point. I was having a hard time finding something like this in the first place. You would think it would be an obvious product to make. Good to see someone wasn’t deterred though.

Indeed, the closed API interfaces are really annoying. My unit is working out well and to be honest running the soaker hose for 10 minutes is more than enough time to water the garden and if I really need to run the sprinkler for 20 minutes I can just make an automation script to pulse the lines, wait 10 minutes, then pulse them again for another 10 minutes of watering.

Far better than turning on the tap and forgetting about it for a day :slight_smile: If you find a unit that works with HA let us know…

SONOFF Zigbee Smart Water Valve…it works like a charm with HA and Z2M :wink:
I’ve been using it for almost a month now (after replacing my ‘old’ Divvoo) and it’s…entirely another world.
No some hacks to interface it with HA, no automatic shutdown triggers after 10 minutes (mine unit also had this, for me, cons), perfect connection all the time…
IMHO, I’m feeling as “reborn” after making the switch between the two…!! :sweat_smile:

Oh that’s good data! Didn’t realize that Sonoff had a water valve, will look for it for the front.

The 10 minute thing is kind of nice oddly enough: It keeps the hose from leaking 24*7 and 10 mins is pretty much all I use the hose for anyway. Still it was a serious (if fun) hack. :slight_smile:

Next up, finding a water flow sensor that doesn’t require cutting pipes and can work without a stupid cloud app…

I have the single valve version which uses a WiFi ↔ 433 mhz hub. I am going to attempt to sniff the 433 mhz and see if I can replicate using an esp32 and 433 mhz transceiver. Its on a long list of things to do though, lol.

Also, there is the tuyalocal (or localtuya) integration that has support for some of the Divoo water valves (WiFI ↔ BT hub style). After adding to tuya acct (via smart life app), you should be able to make it strictly local, bypassing the cloud requirement.