homebridge-gpio-wpi2 icon indicating copy to clipboard operation
homebridge-gpio-wpi2 copied to clipboard

wpi2 at bootstrap

Open kiondi opened this issue 8 years ago • 7 comments

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

kiondi avatar Aug 21 '17 15:08 kiondi

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.

rsg98 avatar Aug 21 '17 16:08 rsg98

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.

kiondi avatar Aug 22 '17 08:08 kiondi

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.

rsg98 avatar Aug 22 '17 19:08 rsg98

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

image

kiondi avatar Aug 23 '17 10:08 kiondi

Ok - thanks for trying. Will do some more testing when I've got time in front of my Pi. On Wed, 23 Aug 2017 at 11:59, kiondi [email protected] wrote:

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

[image: image] https://user-images.githubusercontent.com/30904725/29612708-d7e8d096-8802-11e7-9012-09f34849bba8.png

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/rsg98/homebridge-gpio-wpi2/issues/28#issuecomment-324295120, or mute the thread https://github.com/notifications/unsubscribe-auth/ARe_tdf3LlZdiXFBxH6KrJnIY8iW1ULNks5sbAYigaJpZM4O9iBm .

rsg98 avatar Aug 23 '17 14:08 rsg98

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

kiondi avatar Aug 23 '17 15:08 kiondi

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

zeair avatar Jun 25 '18 20:06 zeair