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