Wi-Fi Dog Door challenges

I’m working on automating a remotely operated Pet Door (see photos below) which slides open and closed (Right - Open, Left - Closed). Currently a wooden door, mounted on sliding drawer rails, over an existing dog door that allows smooth movement side to side.

The movement of the door will be by a motor which drives a threaded rod and either pushes the door closed, or pulls the door open (there is power adjacent to the opening). This motor will be controlled by a Shelly 1, Wi-Fi relay, tucked in the wall outlet… any time power is applied by this relay, the door will move to the opposite position of where it is currently, until it triggers a stop switch that is already built into the motor. So if the door starts off as Open, and I toggle the Shelly on… the door will move all the way to Closed, and then the motor automatically resets and shuts off… so will the Shelly relay (likely by my own automation). The next time the relay applies power… the door will move all the way to Open, and then reset and shut itself off again.
And on, and on, and on, back and forth.

I intend on putting two Aqara ZigBee door switches at the end of travel in each direction, with one magnet on the actual door to activate either switch. Neither switch will be tied into the function of the door, they are only there to advise which, of three possible positions the door is at… Closed, to the Left (we’ll call door switch one), Open, to the Right (we’ll call door switch two), or if for some bizarre reason the door should stop in between switches (power outage during travel or some other failure) then neither switch would be toggled as closed, and I would want a notification of this unusual condition.
Sounds simple enough to me.

The end goal will be some kind of Button or Indicator on my dashboard that not only toggles the Shelly relay on (and then off again a short time later - so the motor resets) but this button would also reflect the state of the door, based on the condition of either or both door sensors.

My question to the wise folks here is… what would be the best way to implement this?

I think I can figure out one or two automations for toggling the Wi-Fi smart plug, and sending the door one direction or the other, but I’m too new to Home Assistant to get my head around a dashboard button or toggle etc… that would be used to show the current position of the door.

Thank you in advance for your thoughts

Covers are supported in home assistant backend, esphome and in the ha frontend.

Covers… covers… gotta read more about covers.
Thanx.

1 Like

This is simply a garage door use-case sideways, isn’t it? I have used a Shelly 1 for both the trigger of the motor and a reed sensor for the closed position.

As others already said, i’d use cover intergration and shelly 2.5, flashed with esphome - it’s two relay device and it can monitor current through motor. Consequently it detects when motor is shut down and sends state to HA. Door position is calculated by time door is needed from fully close to fully open (you enter this time in shelly’s esphome fw) and it’s shown with percentage.
I guess this is the best setup (unless you have power outages very frequently). No need for any extra door switches then, only shelly and motor.

can you share your final product?

Well… I “chickened” out. Due to time constraints, I decided to implement a 12v, string operated, winch type device designed for Chicken Coop doors that my son picked up for $99. I put a Shelly 1 inside of a dedicated single wall outlet (so nobody would try to use it for a vacuum cleaner or something). I wrote a simple script that fires up the outlet, waits 20 seconds (long enough for door to open or close) and then turns off, hence resetting to change direction for the next operation. I use the two door sensors to let me know if it’s currently open or closed, and I have a camera in the vicinity to verify that the dog is inside, and the door operated correctly.

In the future, I will return to the horizontal wooden door on sliders, and probably implement a simple linear actuator with a 12v transformer and WiFi relay for directional control. I can then remove the Shelly and use it elsewhere.


Oh, and I still have some cable management to do.

Link to goofy chicken coop door device:

Jim

Okay, I’m back at it now. I’ve gone back to the horizontal sliding door approach, but with a much simpler, off the shelf (ish) design. I used a 12v, Linear Actuator that travels 12 inches and has auto stops built in.

3D printed a new control box, with the original 12v transformer and a new 2-channel Wi-Fi Relay. Integrated through the Tuya App. The Tuya software allows me to interlock the relays so they cannot both be on at the same time (took me a while to figure that out), and I can reverse the travel easily. I also bought the relay that had a RF remote control fob, but don’t really need/use it. The door travels pretty slowly, and the darn thing is capable of lifting 300+ pounds, so I built a failsafe into the wall mount so that if my dog were to get trapped by the door, it would push its own mount off the wall plate… freeing the dog. I doubt seriously that this would ever happen, since I can locate the dog first by using my cameras, but you never know.

Here are a few photos of the semi-finished project (still awaiting paint, and getting rid of that hideous 1980’s textured wallpaper:

And since I can’t embed a video I made a link to YouTube for it.
(Warning, Audio may trigger Alexa devices… sorry).

Here are links to the products I chose:

https://www.amazon.com/dp/B09P1BFGLR

https://www.amazon.com/dp/B07L7XCSDW?th=1
(Used the 12" version, obviously)

For those that are wondering about the actuator placement… I was limited by two things.
First, I wanted the rightmost bracket to hit a stud in the wall.
Second, I could only open the door until it reached the outlet that powered the device.
I did remove the Shelly relay from inside the wall and wired directly to the Transformer, since control is now Wi-Fi within the control box and not at the outlet. (For the record, I had a heck of a time keeping that Shelly relay connected to the Wi-Fi extender that was just across the room - go figure - I know people speak very highly of the Shelly devices, but I was not impressed with this one).
If my drywall skills were better, I would have moved the outlet box to the other side of the stud, allowing me to mount the actuator more centered on the door, but that’s a bit of work just for aesthetics.

This past Tuesday was the test day, and it worked perfectly. I have a motion sensor in between the outside flap and the inside flap of the dog door, and I’m working on an automation that would automatically reverse the door travel if there was motion sensed when closing. Between that and the slip mounted bracket… I’m pretty comfortable with the safety aspect.

Jim

By the way… if anyone is looking for a Chicken Coop Door device… I’ve got one for half price, plus shipping. :grinning:

Jim

Would you be willing to show how you programmed the relay? I’m going to try this in my home. Thanks!