Code Monkey home page Code Monkey logo

Comments (24)

beanpowered avatar beanpowered commented on July 17, 2024

I'm also having this issue. Upon starting homebridge, the garage door(s) open, and the relays stay engaged. The only way to disengage the relays (without disabling this plug-in and restarting homebridge) is to send an output pin low command to it.

from homebridge-gpio-garagedoor.

danb5 avatar danb5 commented on July 17, 2024

This problem lies with the onoff dependancy that is being used. It is causing the relays to stay opened. It is listed as an issue on that github page but nothing on a fix. Anyone have any ideas?

from homebridge-gpio-garagedoor.

 avatar commented on July 17, 2024

@danb5 Thanks for the info, i was wondering whats going on. Btw does anyone tried to add a second Sensor? (Ex. 1st Sensor When Door is closed and 2nd Sensor when Door is open, and when its in between "Door partially Open")

from homebridge-gpio-garagedoor.

danb5 avatar danb5 commented on July 17, 2024

I ended up switching to the homebridge-rasppi-grip-garage door plugin and it works fantastic, shows opening, closing etc.

from homebridge-gpio-garagedoor.

 avatar commented on July 17, 2024

nice, just switch and i got the same issue. well its time to reinstall everything.

from homebridge-gpio-garagedoor.

ch0w7 avatar ch0w7 commented on July 17, 2024

maybe something in the code needs to be changed.

from homebridge-gpio-garagedoor.

beanpowered avatar beanpowered commented on July 17, 2024

I believe this is related to the type of relay you have. Some relays are activated high (When presented a 1 from the GPIO port) and others are activated low (0). The relay I'm using is unfortunately activated low, which causes this issue. When homebridge starts and loads this plugin, the relay port gets initialized with a 0 value. I'm not smart enough to figure out how to change the code, but my guess is, a variable in the config.json could be added to initialize the relay pin high.

from homebridge-gpio-garagedoor.

ch0w7 avatar ch0w7 commented on July 17, 2024

I am ready to buy a new relay if I have to as I really would like to get this to work.

from homebridge-gpio-garagedoor.

beanpowered avatar beanpowered commented on July 17, 2024

I thought the same thing. But I think I'll try the homebridge-rasppi-gpio-garagedoor plugin first.
You just need to modify the startup script on that one so it does not do the same thing.
Add this to the end of the IF Block for the relay pin:
echo 1 > /sys/class/gpio/gpio7/value

I do like this plugin since it does not require external scripts, and I'll probably experiment changing a few things in the code when I have the time. But for now, the workaround should work.

from homebridge-gpio-garagedoor.

beanpowered avatar beanpowered commented on July 17, 2024

Another thing you can try:
Change lib/GPIOPort.ts line 16...

export enum GPIOState {
On = 0,
Off = 1,

This would most likely work, I have not followed the code enough to see what uses it. My guess is that this may make the door sensor think the door is open when it's closed and vice-versa. But, since there is a "isNCSensor" variable in the config.json file, perhaps changing that to true would fix it.

from homebridge-gpio-garagedoor.

ch0w7 avatar ch0w7 commented on July 17, 2024

I have had issues with homebridge-rasppi-gpio-garagedoor as it has to be run as root and my other plugins do not like it. This one works except for the relay is always on. My sensors work perfect.

from homebridge-gpio-garagedoor.

beanpowered avatar beanpowered commented on July 17, 2024

The location of the file is here:
/usr/local/lib/node_modules/homebridge-gpio-garagedoor/lib

I will also be trying this tomorrow. Fingers crossed it works.

from homebridge-gpio-garagedoor.

ch0w7 avatar ch0w7 commented on July 17, 2024

switching on =1 and off =0 makes it work after you activate the switch manually yourself. This solution will not work because your garage will open everytime you reboot.

from homebridge-gpio-garagedoor.

beanpowered avatar beanpowered commented on July 17, 2024

Interesting...So you rebooted and it did the same thing? Do you have any scripts that load at bootup?

from homebridge-gpio-garagedoor.

ch0w7 avatar ch0w7 commented on July 17, 2024

i rebooted and the relay is turned on and stuck on. As soon as i press close garage the relay shuts off and stays off. It then functions how it should.

The only script that loads is homebridge autostarts using "su -c "screen -dmS homebridge homebridge" -s /bin/sh pi"

from homebridge-gpio-garagedoor.

beanpowered avatar beanpowered commented on July 17, 2024

OK, I'm getting the same issue as you. Plus, when I start homebridge, the garage door opens, and I get THOUSANDS of notifications. I guess the high driven relay may be the best option for you, but I'm going to use homebrige-gpio-raspi-garagedoor plugin.
Good luck.

from homebridge-gpio-garagedoor.

SmittyK avatar SmittyK commented on July 17, 2024

I tried making these mods a few weeks back and had the same issue as ch0w7. Switched on after boot, but would run properly once engaged the first time. I decided I would take a chance and see how it ran. Ran great the first few days. Then inevitably, power blinked overnight. I woke up to a wide open garage two mornings in a row. I haven't had time to mess with it since then, so I just disconnected the openers from the relays for now. I let it continue to run because I still like the open/close notifications.
homebridge-rasppi-gpio-garagedoor would not play nice with my other plug-ins either.
Also, using a Sainsmart 4-Channel 5V Relay (3 doors+light switch) with a PiZero.

from homebridge-gpio-garagedoor.

varna33 avatar varna33 commented on July 17, 2024

I just managed to fix same issue in the homebridge-simple-garage-door-opener:
https://www.npmjs.com/package/homebridge-simple-garage-door-opener
By setting opening status "high", and switching sequence "low" then "high".
rpio.open(this.doorSwitchPin, rpio.OUTPUT, rpio.HIGH);
rpio.write(this.doorSwitchPin, rpio.LOW);
rpio.sleep(0.5);
rpio.write(this.doorSwitchPin, rpio.HIGH);

Also I connected the relay to GPIO 3 (PIN 5) that pulled "high" on reboot.
All works perfect - doors are not triggered for false opening in none of the cases: when power is off , when RPI is restarting and homebridge not yet launched, and when homebridge launched. The relay is only triggered when command to open doors is given.

I can't understand why developers don't program it with this simple and secure logic, but create the problem like here in homebridge-gpio-garagedoor?

As this homebridge-gpio-garagedoor script is more complex, I'm struggling to do similar required modifications.

Also it's really pity that developers are not adding so simple setting to the config.json for some of folks that have need like it is programmed now?

from homebridge-gpio-garagedoor.

varna33 avatar varna33 commented on July 17, 2024

As there have not been any comments from developers on this Dec 2016 issue forum - is there information if this script is supported or abandoned - can we expect any help?

from homebridge-gpio-garagedoor.

SmittyK avatar SmittyK commented on July 17, 2024

FIXED!
Finally found some time to revisit this project. So I made another run at Raspi garage. Very customizable, but just would not start without errors.
I saw that the momentary contact issue was fixed with this plugin, but I still had the high/low reverse issue. I tried tinkering under the hood with everything. My relay was low driven and I was stubborn about replacing it as it was the only one available locally. I finally got off my ass and looked on eBay and saw that a simalar relay with customizable high/low jumpers was only $3! I spent months trying to make this work with a $10 relay when all I needed was to replace it with a $3 relay.
Anyway, replaced the relay board and everything worked great as soon as the pi was booted. I'm able to control 3 garage doors from single pi and relay board. KraigM's software works exactly as it should once I had the proper hardware. I owe him a beer. I'm calling this closed.
Get the right board, it's too cheap not too.

from homebridge-gpio-garagedoor.

ch0w7 avatar ch0w7 commented on July 17, 2024

Can you link me the $3 relay?

from homebridge-gpio-garagedoor.

SmittyK avatar SmittyK commented on July 17, 2024

http://www.ebay.com/itm/201658287598?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Similar to the SainSmart 4 channel. Pinout is the same, but it adds a jumper for each relay to go high/low. I had three doors and a light switch connected. I was able to leave the light relay that was working fine on a low setting, and switch the garage doors to high. I was back in business within 5 minutes of it coming in the mail.

from homebridge-gpio-garagedoor.

didl001 avatar didl001 commented on July 17, 2024

Thanks for sharing your info!

from homebridge-gpio-garagedoor.

repl-nealalberda avatar repl-nealalberda commented on July 17, 2024

I had this issue, rather than change relays however I setup default pin state to high prior to running homebridge.

https://www.kernel.org/doc/Documentation/gpio/sysfs.txt -> Read the section about "direction". So rather than setting it "out" I set it High (which is out but defaults to high value rather than low).

   if [ ! -e /sys/class/gpio/gpio4 ] ; then
            echo 4 > /sys/class/gpio/export
            success=$?
            echo high > /sys/class/gpio/gpio4/direction
    fi

from homebridge-gpio-garagedoor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.