Comments (24)
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.
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.
@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.
I ended up switching to the homebridge-rasppi-grip-garage door plugin and it works fantastic, shows opening, closing etc.
from homebridge-gpio-garagedoor.
nice, just switch and i got the same issue. well its time to reinstall everything.
from homebridge-gpio-garagedoor.
maybe something in the code needs to be changed.
from homebridge-gpio-garagedoor.
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.
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.
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.
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.
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.
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.
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.
Interesting...So you rebooted and it did the same thing? Do you have any scripts that load at bootup?
from homebridge-gpio-garagedoor.
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.
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.
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.
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.
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.
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.
Can you link me the $3 relay?
from homebridge-gpio-garagedoor.
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.
Thanks for sharing your info!
from homebridge-gpio-garagedoor.
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)
- Starting Homebridge HOT 1
- doorSwitchPin on off when restart raspberry pi or restart homebridge HOT 12
- Door sensor disable ? HOT 2
- Separate Open and Close commands, and separate Open and Close state sensors
- Start up with relay LOW HOT 6
- Sensor pins not working on RPI after power failure reboot HOT 3
- What's the secret?
- GPIO Pin pulled at a constant HIGH HOT 1
- Cannot run gpio-garagedoor on rasp pi HOT 3
- active_low
- onoff/epoll compile fails with Node 10 HOT 7
- Install fails with epoll error HOT 3
- homebridge fails to start. This is the error I get. HOT 2
- garage door open
- Error when running homebridge HOT 4
- Second Door HOT 2
- Closed door often show as "opening" HOT 12
- Schematics ?
- NO-NC relay HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-gpio-garagedoor.