AC Powered Alternative to the ECOLINK dwzwave2-5-eco for sensing Contact state

Like many Hubitat users, I have a ECOLINK DWZWAVE2.5-ECO I use to read the state of a contact.

In my case the contact is a NC relay attached to a septic pump monitoring system. This relay simply controls the flashing light and obnoxious audible alert when the tank becomes too full, and requires an out of cycle pump operation.

Inevitably, this alert only happens at 2 AM in a Driving Rainstorm, but I digress.

I've been using the DWZWAVE for along time, and it has been relatively trustworthy -- but ultimately it's designed to be a battery powered device. I have been using a battery eliminator which takes USB 5VDC and drops it to 3VDC. This works, but the DWZWAVE continues to report "battery", and because of the design, it tries to read the 3VDC as 10% battery.

An annoyance to be sure, and the ECOLINK works, but I'm on a (probably pointless) quest to eliminate battery powered devices in "critical" tasks. In this particular use case, the battery powered device makes me nervous, because battery devices often fail silently, and while I run a variety of tools to monitor battery power -- I have seen far to many fail due to a dead battery while the hub thinks the battery is still 100%.

In any case, I have been running into Tuya devices through @kkossev's many contributions and incidentally on Amazon and AliExpress. One that caught my eye is this: Tuya GDO.

This is a Zigbee 3 device with a Relay, and a sensor input for a contact sensor (in this case, it comes with a Magnetic Contact for use on the garage door). It is a tiny device (about 2" square by 1" thick.

Model: PJ-ZGD01
AC 110-240V 50/60Hz

It should be usable pretty much world-wide.

I joined it to my Zigbee mesh last night, downloaded and installed a couple different drivers:

First a driver by @albertjmulder here

And then one by @kkossev here

Either works, but (for obvious reasons) both present info about the state of the "Garage Door" and include some code to control the relay (switch) and set some states.

I ran some basic tests using a wire and simulating a contact sensor on the sensor ports. Works a treat.

I will install it in the Septic Controller this evening or Friday and run some more tests, but I fully expect this to be my Go-To device for reading contacts where I can use an AC powered device.

I'm working on a Frankenstein merger of @albertjmulder's simple driver and @kkossev's more sophisticated/feature rich driver, such that the new driver will simply report contact state and power source.

I can't say with certainty (that is until I run the thing for a while in the Septic Controller Cabinet), but it seems to me that this little device is pretty close to perfect if you have a contact sensor you want to read and a nearby source of AC Power.

Bottom line -- if you're looking for a AC Powered Device to read contact sensors. The Many named Tuya Garage Door Opener might just be a good choice.

S.

1 Like

I use a SONOFF ZBMINI and a relay to monitor my well pump.
It's basically a contact sensor with a linked AC output. I do not use the output but I could use it as a pilot light to indicate pump running. It reports the contact state using the generic zigbee switch driver.
There is also a version that does not need a neutral but that one does not repeat.
These are not really advertised as such but can be used as contact sensor zigbee inputs.

1 Like

I didn't look at the MIni close enough -- I saw it when was wandering the Interwebs.

I might add one to the collection! Thank You.

S.

Is there any need to run in a power outage? I use several of the Ecolinks and I think it's useful to get have them operational when there is no AC at the moment.

1 Like

I have a whole house battery system (Tesla) and I load shed to get down to only powering the critical systems -- which covers the Septic Pump and the Home Automation (to a point). But if the house battery dies...

At that point, I have to trust that the 1500 Gallons of tankage is enough for a few hours! :slight_smile:

If I had no backup battery, and was running all my hubs on UPS, I think your suggestion would be extremely on point, if only to keep an eye on the state of things for when power came back up, or I drug the generator out of the garage, and needed to prioritize the things I needed to power up....

Scott

Maybe a UPS for your battery eliminator? Even a small one might suffice -- example:
https://www.amazon.com/dp/B0B42M2377?ref=ppx_yo2ov_dt_b_fed_asin_title&th=1

(Not quite a true UPS, but it supplies DC while charging from AC and has a
claimed 5,000mAh capacity)

1 Like

Good Idea -- but (in my case) unnecessary with the House Battery.

Truth be told -- I just hate small battery powered devices -- if I can AC power them and keep the WAF at an acceptable level I will. I'm moving all my interior motion sensors to SONOFF SNZB-06P Presence sensors (USB powered) as well. With any luck, the only battery powered devices I'll have left are a few contact sensors on doors, and (ironically) the door Locks.

Scott

Shelly I4 has 4 inputs and they have AC line powered version.
There is HE driver for this one.
The potential problem - Contact Sensor must be AC line voltage tollerant.
There is a low voltage DC Shelly I4 version which could be powered by small 5V USB adapter.

1 Like

Good find. I missed the I4 - ah, I see. That's interesting, I wouldn't have thought to use that for contact sensors. It lables those ports SW1 -> SW4, that and the drawing make me think Switch or relay rather than contact.

Certainly an interesting device!

S

sounds like all you need is a voltage regulator that you can tweak to the right voltage to make it look like a full battery. 3.0V is considered 10%, just like in this chart. It needs to be 3.4V when attached to the load, or 3.7v when it has no load attached. Look on AliExpress or amazon for a voltage regulator with an LED display so you can tune the pot to 3.4V with a flathead screw driver. The Complete Guide to Lithium-Ion Battery Voltage Charts - ItekEnergy.

something like this:

p.s. if you are worried about power outage, use a car battery (12v) voltage to feed into this voltage regulator. Keep the car battery on a battery maintainer.

1 Like

Aside from Shelly Plus I4 other Shellies can be used. For example Shelly Plus 2.

It has 2 inputs and 2 relays. Each input->relay pair can be configured to work in 'detached' mode (independently). And also Shellies support local scripting (up to 10 JavaScript scenarios).

Thus it is possible not only to monitor septic sensor contact, but to control warning signal and pump.
The control logic can be implemented with both HEs RM and/or local script (continue to function even if hub faced some issues)

Basically pump can be programmed (with Shelly module) to run on both occasions periodically and urgently with periodic cycles taking ToD into consideration (like not running at night, and flexible pump cycle duration).

1 Like

Thanks Alex -- yes, I figured that the battery sensors were determining state of charge by voltage. I've got some adjustable voltage USB converters coming. I'll use them in some Third Reality Waters sensors I have converted. The battery eliminators I have used are pretty much a flat 3VDC, which results in the battery warnings on some devices (like the Aeotec Door Sensor).

The new units have Pots for adjusting the voltage, and an LED display exactly as you suggest!

That's a pretty nice Buck converter there -- the input output ranges are fantastic! Nice find.

It's kind of funny really -- I'm NOT. I posted this here for others to see mostly because over the last 2 or 3 years, I've seen many posts on this community about devices that can read contact sensors -- for garages mostly, but every now and then, someone asks for a device with a connector for external contact sensors for other random purposes. Usually the ECOLink DWZwave2.5-ECO pops up, and a couple of other (mostly battery powered) options.

Recently, Zooz made available the Zen16 & 17, and as noted several times in this thread some of the Shelly's are good options.

In my use case -- I have 26 kWh of on-line Battery and a load shedding plan. Often, I don't even know my neighborhood has had a power outage! For additional capacity, I also have a 5.1 kWh standalone EG4 LL LifePO4 battery and just picked up an Eg4 ChargeVerter.

My GOAL is to eliminate battery devices because they often mis-report, many fail silently, and I'm tired of paying for batteries -- let alone wandering around the house changing them.

Having said that, I'm glad you and others are posting alternate solutions, as this thread is turning into a nice collection of possible solutions for people trying to solve similar problems.

S.

1 Like

This is a good point. (and good idea). So -- my Septic alarm is mandated by the county, and while I'm fairly comfortable monitoring it, I'm a bit reluctant to mess with it beyond that. Sure, I could put a Shelly, or a Zen16/17 in there and take over the pump control, however, the system has a PID controller and a dosing plan, which I don't want to mess with, as I really don't want to pay fines to the county for screwing up my approved septic dosing.

I only monitor it, because in situations where we have an extraordinary amount of rain, the tank can get ground water in it, resulting in the alarm going off and annoying me and the neighbors. I simply have to go out, flip the switch to manual, and pump the excess water into the drain field. This happens about once every 18 months or so (at most), and as we are continuing to work on rainwater management with our landscaping, the rate of incidence has been going down.

In line with your suggestion however, I have considered, and may yet implement a relay to control the Auto -> Manual switch to turn the pump on from my tablet at 2 in the morning instead of going out in the rain and manually doing it! :slight_smile:

Thanks for posting this suggestion!

S.

Most often, I find that 3V powered contact sensors will not cut it because of the length of the wire between the contacts and the MCU. In cases like this, send 12V or 24V down the wire and use 12V or 24V (apropro) triggered relays which trigger when the contacts are closed. The COM terminal of these relays will be GND and the NO terminal of these relays goes into the GPIO line of the MCU with internal pull up resisters,
So get a 12V DC power supply and one of those step down bucks. Use the 12V to send power down the contact sensor line and set step down buck output voltage down to the MCU voltage (i.e .3.3) to power the MCU. You can use a ESP8266 MCU which are a about $1 and has built in wifi. Run tasmota on it and you can send the contact status back to Habitat via MakerAPI servicing a Virtual Contact Driver instance.

1 Like

For this reason I am using optocoupler placed right near sensor and input side of optocoupler is used in a current loop (10mA is a usual value) mode. Current Loop could be created from any DC (or even AC) power source including a 3V PS if higher voltage is not available.

@alex1 & @vitaliy_kh you guys are hard core!

I appreciate the ideas. However for my part, I think my use cases must be crazy easy compared to what you guys are solving for!

My MCU was mere inches from the contacts, so there is no significant loss between the MCU and the contact. And I have 120VAC in the enclosure. The Tuya GDO runs on AC, is Zigbee 3.0 and costs $11. @kkossev & @albertjmulder both offer drivers, and I was easily able to slim down either of them to eliminate the Door States and door handling code.

I was also able to grab some spares, so if this Tuya device fails, it'll be 5 mins to replace it!!!!

Thanks for the suggestions. I'll file them away, because...there's always another project!

S.

1 Like

good find with the Tuya GDO. I wonder how much voltage they send over the contact sensor line. Would be nice to know if you could put a volt meter between one of the terminals and ground. In my case, I had a building with three doors across the front of it. For cabling I choose to run the contact sensor lines through an ethernet. I then used two cheap 2 to 1 ethernet passive couplers/splitter to fork out a termination for each door and use the 2nd output of the split extend another ethernet cable run to the next door. Repeat at the second door with the other splitter to terminate the 2nd door and extend the signals to the third. Then, at the termination points at each door I used a female ethernet to terminal screw adapter to attach the ethernet wire pair of interest to the door contact pairs. This method only used up 4 wires of the 8 in the able. One for the 12V power to power each contact input, and one for each door contact return line. What will I use the other for, who knows but it's nice to have options for future use and not have to run three separate cables from single MCU to three seperate doors. I use ethernet cable all over the place as it has many uses and easy to fork and extend the signal lines. I used Ethernet cable with the 2 to one splitter concept for all for the three garage door motor triggers as well.

1 Like

Talking about electrical noise voltage is not a primary concern. High impedance input can easily catch a noise on a long wire which is nothing more than antenna. That is why "current loop signaling" was used for very old telegraph communication and it is still used for sensors in security systems..

I'll hook up one of the spares and check with my meter.

Probably tomorrow...

S

1 Like

Ok. Feel free to LOL at my Volt Meter skills!

The power to the device is through a non-polarized, non-grounded plug.

Setting the meter to DC (200VDC range) and measuring across S1 -> S2, I get 285 millivolts.

Measuring S1 or S2 to Ground of the AC outlet, I get 51.2VDC.

Setting the meter to resistance, 2000K Ohms range, and measuring across S1 ->S2 I get 246.

Perhaps that tells you something....for me, well, no sparks, so I'm happy. LOL.

S

1 Like