Closed ch0w7 closed 3 years ago
I had the same problem, end up fixing it by wrapping the GPIO ID with double quote.
"doorSwitchPin": "17",
"doorSensorPin": "18",
I had the same problem, end up fixing it by wrapping the GPIO ID with double quote.
"doorSwitchPin": "17", "doorSensorPin": "18",
Thank you! I can’t believe it was something so simple. I wasted so much time trying other people’s code.
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (24) at Object.writeFileSync (fs.js:1460:5) at exportGpio (/usr/local/lib/node_modules/homebridge-gpio-garagedoor/node_modules/onoff/onoff.js:18:8) at new Gpio (/usr/local/lib/node_modules/homebridge-gpio-garagedoor/node_modules/onoff/onoff.js:172:36) at new GPIOPort (/usr/local/lib/node_modules/homebridge-gpio-garagedoor/lib/GPIOPort.js:14:9) at new DoorSensorPort (/usr/local/lib/node_modules/homebridge-gpio-garagedoor/lib/DoorSensorPort.js:10:9) at new GPIOGarageDoorAccessory (/usr/local/lib/node_modules/homebridge-gpio-garagedoor/lib/GPIOGarageDoorAccessory.js:24:31) at /usr/local/lib/node_modules/homebridge/src/server.ts:357:50 at Array.forEach ()
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29)
at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12)
at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
Had to update to a new pi and redo my homebridge install. This is the last piece of my puzzle to get working.