Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doorSwitchPin on off when restart raspberry pi or restart homebridge #10

Open
toshibochan opened this issue Jan 1, 2017 · 12 comments
Open

Comments

@toshibochan
Copy link

doorSwitchPin on off when restart raspberry pi or restart homebridge.
any one having this problem?

@fastenspy
Copy link

fastenspy commented Jan 3, 2017

look the bottom of this page: http://www.iculture.nl/nieuws/stappenplan-homekit-siri-raspberry-pi-homebridge/
SEE: Homebridge automatisch starten na een reboot

@nremme
Copy link

nremme commented Jul 12, 2017

Having a similar issue - when homebridge restarts (either on pi restart or service restart), it triggers the door switch pin and causes the door to automatically open. Is there a way to prevent this from happening?

@thewhitestig
Copy link

thewhitestig commented Oct 17, 2017

I think the root cause is issue#9; doorSwitchPin is 1 when plugin is running but during boot up it's 0. This triggers the garage door if you hook up your relay as Normally Closed.

@thewhitestig
Copy link

I have a hack for this, see my comment in Issue#9.

@DennisDeKoster
Copy link

DennisDeKoster commented Oct 22, 2017

I found this at another garagedoor plugin, maybe it is helpful. I haven't tried it myself yet though...

IMPORTANT NOTE ON PIN SELECTION

When the Raspberry Pi reboots GPIO pins are reset to their default state. This can cause your garage door to open without you issuing a command. Please make sure you pick the correct pins so that you don't accidentally have your garage door opening after a power loss.

The following pins are pulled HIGH (they output a 3.3 volt signal) on reboot:

GPIO0/2
GPIO1/3
GPIO4
GPIO7
GPIO8
GPIO14 is configured as a Serial Transmit line, so avoid choosing that pin.

All other pins are pulled LOW (they have a 0 volt signal, same as GND).

If your relay triggers when the GPIO pin goes LOW, then pick a pin that starts out HIGH on reboot. If your relay triggers with the GPIO PIN goes HIGH then pick a GPIO pin that starts out LOW on reboot.

(information comes from https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=24491)

@Cirrostratuss
Copy link

@DennisDeKoster I tried both GPIO 2 and 3 and also GPIO 24 and 25, so HIGH and LOW. It made no difference when rebooting the pi, it still triggered the door to open. If you check the gpio allreadall regardless of where its connected, the pi will change the OUT to LOW but my guess it toggles a high on bootup. I've tried doing a boot up script etc with no joy.

@thewhitestig suggested editing the switchPort.ts but didint give the path to it, where is the file located?

@thewhitestig
Copy link

Everything is in lib/... you can modify your local js files:
/usr/local/lib/node_modules/homebridge-gpio-garagedoor/lib $ ls
DoorSensorPort.js GPIOGarageDoorAccessory.js Runtime.js
DoorStateExtension.js GPIOPort.js SwitchPort.js

@Cirrostratuss
Copy link

Outstanding!! Thank you!!! It worked woohooo!!

@rinoronie
Copy link

what can I modify?

@dingleberry77
Copy link

Did anyone fix this issue in subsequent builds?

@Cirrostratuss can you share what you did/edited to fix this?

@junicello
Copy link

Did anyone fix this issue in subsequent builds?

@Cirrostratuss can you share what you did/edited to fix this?

I tried contacting @KraigM but no response. Maybe we should consider spawning a copy and getting this done. I am new to GitHub but willing to learn.

I posted code changes here that I have working in my setup

#9 (comment)

@iamjonas
Copy link

Modified the code myself, but the notifications for open and closed are sent three time, e.g [open, closed open] are the sensor to sensitive or is it the script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants