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

"EBUSY" - homebridge-gpio-device not loading correctly #120

Open
kjetisve opened this issue Jun 14, 2021 · 2 comments
Open

"EBUSY" - homebridge-gpio-device not loading correctly #120

kjetisve opened this issue Jun 14, 2021 · 2 comments

Comments

@kjetisve
Copy link

I thought I got everything working again after I updated to the newest Homebridge, but
GarageDoorOpener isn't showing up in HomeKit, and everytime I do a restart of Homebridge I get this:

[Garage Door] Initializing GPIODevice accessory...
juni 14 23:11:06 raspberrypi homebridge[17534]: [2021-6-14 11:11:06 PM] Error: EBUSY: resource busy or locked, write
juni 14 23:11:06 raspberrypi homebridge[17534]: at Object.writeSync (fs.js:573:3)
juni 14 23:11:06 raspberrypi homebridge[17534]: at Object.writeFileSync (fs.js:1204:26)
juni 14 23:11:06 raspberrypi homebridge[17534]: at exportGpio (/usr/local/lib/node_modules/homebridge-gpio-device/node_modules/onoff/onoff.js:18:8)
juni 14 23:11:06 raspberrypi homebridge[17534]: at new Gpio (/usr/local/lib/node_modules/homebridge-gpio-device/node_modules/onoff/onoff.js:172:36)
juni 14 23:11:06 raspberrypi homebridge[17534]: at Object.init (/usr/local/lib/node_modules/homebridge-gpio-device/index.js:22:19)
juni 14 23:11:06 raspberrypi homebridge[17534]: at new GarageDoor (/usr/local/lib/node_modules/homebridge-gpio-device/index.js:754:8)
juni 14 23:11:06 raspberrypi homebridge[17534]: at new DeviceAccesory (/usr/local/lib/node_modules/homebridge-gpio-device/index.js:137:18)
juni 14 23:11:06 raspberrypi homebridge[17534]: at config.accessories.forEach (/usr/local/lib/node_modules/homebridge/src/server.ts:350:50)
juni 14 23:11:06 raspberrypi homebridge[17534]: at Array.forEach ()
juni 14 23:11:06 raspberrypi homebridge[17534]: at Server.loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:270:29)
juni 14 23:11:06 raspberrypi homebridge[17534]: at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:162:12)
juni 14 23:11:06 raspberrypi homebridge[17534]: [2021-6-14 11:11:06 PM] Got SIGTERM, shutting down Homebridge...

Then I get homebridge up and running by reinstalling homebridge-gpio-device. But GarageDoorOpener isn't showing up.

gpio version: 2.46
node version: v10.19.0
homebridge-config-ui-x@4.41.1
homebridge-gpio-device@0.4.9
npm version v6.13.4
homebridge version: v1.3.4
Type: Pi 3, Revision: 02, Memory: 1024MB, Maker: Sony

  • Device tree is enabled.
    *--> Raspberry Pi 3 Model B Rev 1.2
  • This Raspberry Pi supports user-level GPIO access.

GPIODevice in config.json:
(...)
"accessory": "GPIODevice",
"name": "Garage Door",
"type": "GarageDoorOpener",
"inverted": "false",
"pin": 7
(...)

@kjetisve
Copy link
Author

If I change to a different pin Homebridge starts and the plugin loads.
I used to have pin: 11 when the plugin looked for the wPi number. The BCM number should be 7. Why is this giving me an EBUSY error?

@kjetisve kjetisve changed the title homebridge-gpio-device not loading correctly "EBUSY" - homebridge-gpio-device not loading correctly Jun 20, 2021
@kjetisve
Copy link
Author

kjetisve commented Jul 3, 2021

Any suggestions?
This is the readout of debug/gpio:
gpiochip0: GPIOs 0-53, parent: platform/3f200000.gpio, pinctrl-bcm2835:
gpio-7 ( |spi0 CS1 ) out lo ACTIVE LOW
gpio-8 ( |spi0 CS0 ) out hi ACTIVE LOW

gpiochip1: GPIOs 100-101, brcmvirt-gpio, can sleep:
gpio-100 ( |led0 ) out lo

gpiochip2: GPIOs 504-511, parent: platform/soc:firmware:expgpio, raspberrypi-exp-gpio, can sleep:
gpio-511 ( |led1 ) in hi

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

1 participant