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

wpi2 at bootstrap #28

Open
kiondi opened this issue Aug 21, 2017 · 7 comments
Open

wpi2 at bootstrap #28

kiondi opened this issue Aug 21, 2017 · 7 comments

Comments

@kiondi
Copy link

kiondi commented Aug 21, 2017

Hi
Thank you for your great job.
I have a problem when raspberry boot.
My relay board, connected on gpio (active with LOW signal) switch from HIGH to LOW all time raspberry start.
How can I do to not blink the outputs at each reboot?
thank you for any suggest.
Marco

@rsg98
Copy link
Owner

rsg98 commented Aug 21, 2017

Does it flash when the Pi boots, or when homebridge starts?

Not sure it's possible to control the pin states until after the Pi has booted - because they haven't been initialised by the kernel. That would mean you would need to design a circuit that handles the reboots electronically rather than software.

If they don't flash during the actual boot, and only start misbehaving during homebridge startup, then there probably is something we can fix in the plugin.

@kiondi
Copy link
Author

kiondi commented Aug 22, 2017

The gpio start HIGH (one time for a few milliseconds) during homebridge startup.
I try to unistall the plugin, for test, homebridge start without blink on relays board.
Thank you for the support.

@rsg98
Copy link
Owner

rsg98 commented Aug 22, 2017

I /think/ the fix may be to set the value before the direction - which happens inlib/autoExport.js

It would need the line

     gpiopin.value = (!inverted);

... moving in between the .export command and .direction.

I'm not near my Pi setup at the moment to give it a try - but if you're able to test that as a fix, that would be great. Got a bunch of other changes to publish as well, so can work this into the next release.

@kiondi
Copy link
Author

kiondi commented Aug 23, 2017

I move command line between the export and direction but is the same at homebridgestrat, the code:

image

@rsg98
Copy link
Owner

rsg98 commented Aug 23, 2017 via email

@kiondi
Copy link
Author

kiondi commented Aug 23, 2017

Ok, I leave you a video of the stratup sequence with 2 relays connected on gpio.
Best regards
Marco
IMG_9085.zip

@zeair
Copy link

zeair commented Jun 25, 2018

Struggling with the same.. have you managed to solve it? It opens my garage on rpi startup :D

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

3 participants