Requesting a garage door sensor type.



  • I have created a sensor for my garage door that has the following functions that I would think would be used for any kind of garage door node:

    • Responds to an incoming message of type V_STATUS with a boolean payload of "1" to tell the garage door opener to toggle open or closed.
    • Sends responses based on the reading of the garage door's upper and lower limit switches. The responses are Open, Closed, Opening, Closing and Obstruction.

    The gateway would only need to remember the door's status (Open, Closed, etc...).

    Any further input on this topic is welcome.


  • Mod

    @dbemowsk what's the difference of a garage door compared to e.g. a roller shutter? (from a controller perspective of course 😉)
    The roller shutter guys can do with the current library, so maybe you can have a look what they're using?



  • @Yveaux That might work. I will look into the roller shutter a little more and post back.



  • @dbemowsk Any info on how your garage project went, and whether you used the roller shutter code? I'm in a similar situation now.. I've got an 8266 "Thing Devboard" (Sparkfun) based garage door controller that I'd like to integrate with MySensors.. Ultimately, I'd LOVE 2 things to show up on Vera: 1: an indication of state (open/closed/in motion) and a pushbutton to let me trigger the relay for open/close..

    I originally started searching in here for a "pushbutton" type interface, since I didn't really want to use an on'/off switch type thing, since it was supposed to be momentary, but then I saw your post about a request for a real "garage door" plug in..

    Just curious what you ended up doing..
    -Steve



  • @172pilot Sorry I never posted back to this. I didn't end up using the roller shutter code. After looking into it more that wasn't quite what I wanted. I wanted to have the node post back the state of the door with [ Open, Opening, Closed, Closing, or Obstruction ]. When I started this, version 2.0 of MySensors was still in development. @awi had pointed me to the new V_TEXT variable and S_INFO sensor type which was new to 2.0. These constants were easy enough to implement in 1.5 by adding these lines:

    // new V_TEXT variable type (development 20150905)
    const int V_TEXT = 47 ;
    // new S_INFO sensor type (development 20150905)
    const int S_INFO = 36 ;
    

    You can see the progress I have made on this project in this post: https://forum.mysensors.org/topic/4059/automated-garage-door/20
    I am still running version 1.5 in my setup. I am hoping to convert to the new 2.0 fairly soon which means I will have to convert the node code for this to 2.0. Just haven't had the time lately to get that done. I am open for comments and suggestions from other users.



  • Old topic but still..

    A variable to specify the position of a door would be handy in my opinion. The V_TRIPPED variable of a door sensor just states Closed or Not Closed. But for bigger and mechanical doors like garage doors there is quite a big step between fully open and closed..


  • Mod

    @Redguy how about using V_PERCENTAGE like in this roller shutter?



  • @Redguy Yeah.. that sounds like the roller shutter code would be good for that.. For mine, although I havent had time to finish it, my logic was that I had a sensor for completely up and one for completely down, and if neither was tripped, I just considered it "in motion".. I did this because I wanted a timer so that if the door was left open for more than a few minutes, it would automatically close... If I am working in the garage, I would just manually press the button to lower the garage door an inch or two, which would tell my sensor NOT to automatically close, because it's already in motion..

    All of my recent troubleshooting has been because for some reason my 8266 seems to want to reboot randomly (sometimes once an hour, sometimes once a day) and when that happens, it triggers the IO pin and opens the garage.. In practice, it would auto-close, but it's still not a good idea for my garage to be opening randomly! 🙂



  • @Redguy That is why I proposed the 5 states (open, closed, opening, closing, and obstruction). These seemed to make the most sense, at least to me. The first 4 are self explanatory. The obstruction however would be used when the garage door safety sensors are tripped and the door had to return to the open position. This can be useful if say you have your garage door automatically closing at night and something is in the way of the door. You could then get a notification of the obstructed doorway so you could go check on it.

    The logic behind the 5 states is pretty easy. You need to remember the last open or closed state of the garage door, which would require 2 sensors on the door. One to indicate fully open, and one to indicate fully closed. Once you know that, you can use this logic:

    • If the garage door opener was triggered and the last state of the door was closed, then the door is opening.
    • If the door opener was triggered and the last state of the door was open, then it is closing.
    • If the door was closing and the door returns to the open position, then there is an obstruction,

    My thinking on why the roller shutter code would not work is because that is designed to say to what degree you want the shutter open. For a garage door, you are not going to tell the door to open 30%. Besides, how would you determine what position the door was in at any given time.



  • @dbemowsk said:

    @Redguy That is why I proposed the 5 states (open, closed, opening, closing, and obstruction).

    That sounds like exactly what I wanted, except that because I wanted to always have an automatic close timer, I decided to take the short cut that if the door wasn't fully opened or closed (neither sensor tripped) the code would basically go idle, so that if I set the door just a little bit lower than fully opened (manually stopping ir) that would be my easy override for the auto-close code, and assuming I hadn't manually interfered, the door would eventually be fully closed or open again.. If it found an obstruction and auto-opened, then being in the open state again would start the auto-close timer.. So, for example if I come home, and close the garage and go in the house, but the cat breaks the beam on the way down, it would automatically attempt to re-close after the standard 3 minute timer..

    I hadn't considered trying to determine if that happened, but I guess if I added enough code to remember if the last state was open or closed, it would be easy to figure out if the close action was aborted..

    Anyway.. Do you have working code?? I think mine actually does work, but I'm just having the 8266 reboot problem for some reason.. I haven't touched it since maybe September, but I should really get it back out and finish this thing up!!
    -Steve



  • @172pilot I have some code that worked most of the time. I would occasionally get some false obstruction notifications, but other than that it worked well for opening and closing the door. The obstruction issues could possibly have been from the way my node was set up and not from the code. I have a thread that I started to document the project. My latest 2.0 code that I used with Domotics is posted at the end of the thread. I had another thread going where I posted some icon files that I created for Domoticz. One of the icon sets that I did was for my garage door controller. I didn't have one for the door position, but it wouldn't be that hard to do one for that. Here is the link to that. The way I had my nightly routine set up in Domotics was that at 11PM every night the system would check to see if the door was open, and close it if it was. Between 11PM and 4AM I had a constant check on the door and if it was open, it would close it again within a minute for security. I didn't do much with the obstruction other than to send push notifications to my phone that there was an obstruction event.

    I have since switched to a Vera Plus controller and am working on converting things for that. I was planning on re-visiting this thread a little bit before I saw your post here. Having a dedicated garage door sensor type and node object in Vera for a garage door would be really nice. My thinking is that the Vera device would have the opener control and door position combined into one device definition file. That is still a big work in progress though.



  • @dbemowsk
    Hi there I built a garage door opener sensor using the "Relay Actuator" sensor from the "Built" section , which is perfect for me. My issue is that I want the relay to activate for half a second to a second and than deactivate, and the existing code on the Relay Actuator Sensor would have to be modified a bit and that's where I get stuck, any input would be greatly appreciated.
    Thanks



  • @dbemowsk I'm on a VeraLite controller, but have been thinking of switching to the plus too.. Having the object type defined in MySensors and Vera would be very nice, but that is beyond anything I've done in either environment.. I'd love to learn though, so if there's any way to contribute, I'm all ears.. forcing garage door functionality into a 'switch' type object just doesn't quite fit the bill..

    One difference between your concept and mine I guess is that my close door timer logic is built into the sensor itself... I didn't want any communication problem with a controller to accidentally leave the garage open. If the sensor is working, it is self sufficient.. One other thing I didn't mention is that I've got an RFID reader on it so that I can open the door with an RFID token.. Not sure how or if this would fit in to a garage door object.. In a perfect world, I'd love to manage the list of active tokens on the host side, so it might make sense to have the RFID section defined as a separate device that then remotely triggers a garage open event..

    All this activity on the thread has inspired me to bring back up my old code and check it out after 3 months of walking away, and I think I may have found my reboot problem - I think I'm using the generic softwareserial to read the RFID reader.. I think there's a specific ESP SoftSerial module that may work better.. Maybe I'm tripping the WDT.

    If there's a place to post my code for comment or inclusion into someone else's code, I'd be happy to do so.. It's messy but maybe having others look at it will help, and/or someone who is more famliar with the MySensors stuff can help put in the hooks to the controller. Right now, I have removed all the MySensors stuff for troubleshooting my basic functionality and reboots..



  • @RoushRS3 said:

    @dbemowsk
    Hi there I built a garage door opener sensor using the "Relay Actuator" sensor from the "Built" section ,

    Yeah.. With that, it's just a device to open/close your door, right? Can you use that to detect the state of the door? (open/closed) And as for the button, yeah.. I haven't looked hard, but I think a "doorbell' kind of device object would be perfect, but I haven't seen that..

    Ultimately, a full implementation of a garage door object would be awesome.. I just wish I knew where to start..



  • @172pilot Mine will detect the state of the door. I tapped into the internal limit switches on my opener to do the detection. That part works well. I like your idea of putting the timer logic on the node itself, but do you have a way to set that from Vera? If not, I would have to reprogram the node if I ever wanted to change that. I do get not wanting to have a controller communication issue not close the door as I have experienced this.



  • @dbemowsk said:

    @172pilot I like your idea of putting the timer logic on the node itself, but do you have a way to set that from Vera? If not, I would have to reprogram the node if I ever wanted to change that.

    I have the timer hardcoded in the node to 3 minutes, but I have a button that disables the timer until the next time the door is closed, which is how the one I've been using for the last 6 years works, but the new version I'm working on, I'm thinking of also making it so that if I manually stop the door between the limits, it wont start the timer..



  • @172pilot So you don't have the node set to close the door at a certain time of the day?



  • @dbemowsk said:

    @172pilot So you don't have the node set to close the door at a certain time of the day?

    Nope.. My current system was an old arduino uno based thing that I only did for the RFID and auto-close timer.. I've never successfully gotten one integrated with Vera or MySensors so it really hasn't been an option.. I probably will once I get all this done.. Hopefully as a Vera Scheduled event



  • @172pilot
    yes it is a sensor/device to open and close, which is controlled via my Vera Lite Controller. I'm using the Door-Window Sensor (with simple Reed Switch) to detect the Door Status, and that works for me, but my issue is with the Relay-Actuator Sensor , it needs tot turn on and then immediately turn off, and it does not do that. I can have it turn on and then immediately turn off using a Scene on my Vera Controller, but it would me way more reliable if it was written in the code. We need the Gods of Mysensors Website to add it to the code.



  • @RoushRS3 said:

    Hi there I built a garage door opener sensor using the "Relay Actuator" sensor from the "Built" section , which is perfect for me. My issue is that I want the relay to activate for half a second to a second and than deactivate, but the existing code on the Relay Actuator Sensor would have to be modified a bit and that's where I get stuck, any input would be greatly appreciated.
    Thanks



  • @RoushRS3 said:

    it needs tot turn on and then immediately turn off, and it does not do that.

    If you look at the code for my garage door node, mine does that. Everything for that is handled by the node This is the code in the main loop that does that:

      //If the relay is on, shut it off
      if ( digitalRead( DOOR_ACTUATOR_RELAY ) == 1) {
        relayOff();                       
      }
    

    In the relayOff method the relay is shut off and then informs the controller that it has been shut off:

    /**
     * relayOff - Used to turn off the door opener relay after the TOGGLE_INTERVAL
     */
    void relayOff() {
    
      digitalWrite( DOOR_ACTUATOR_RELAY, RELAY_OFF );
      //Added this to tell the controller that we shut off the relay
      send( msgOpener.set(0) );
      
    } //End relayOff
    

    So on the controller, you should see the switch turn on, and then immediately shut off.


Log in to reply
 

Suggested Topics

  • 90
  • 13
  • 7
  • 3
  • 2
  • 3

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts