Code Monkey home page Code Monkey logo

homebridge-gpio-garagedoor's People

Contributors

kraigm avatar stevenguh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-gpio-garagedoor's Issues

Second Door

Is it possible to make this control 2 doors? I would love to get this working so I can add a second door.

Cannot run gpio-garagedoor on rasp pi

Installed homebridge as per the instructions. Tried installing gpio-garagedoor with npm install -g homebridge-gpio-garagedoor but got error:
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/.node-gyp"
gyp WARN EACCES user "root" does not have permission to access the dev dir "/usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/.node-gyp/9.4.0"

Then installed with --unsafe-perm but that did not work
Tried su and as root tried but that failed too.

Keep getting:
[2018-2-4 00:19:48] ERROR LOADING PLUGIN homebridge-gpio-garagedoor:
[2018-2-4 00:19:48] Error: Could not locate the bindings file. Tried:
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/build/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/build/Debug/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/build/Release/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/out/Debug/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/Debug/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/out/Release/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/Release/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/build/default/epoll.node
→ /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/compiled/9.4.0/linux/arm/epoll.node
at bindings (/usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/bindings/bindings.js:88:9)
at Object. (/usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll/epoll.js:1:99)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at Object. (/usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/onoff/onoff.js:4:11)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
[2018-2-4 00:19:48] ====================
[2018-2-4 00:19:48] Loaded config.json with 2 accessories and 0 platforms.
[2018-2-4 00:19:48] ---
[2018-2-4 00:19:48] Loading 2 accessories...
[2018-2-4 00:19:48] [MyQ Garage] Initializing Chamberlain accessory...
/usr/lib/node_modules/homebridge/lib/api.js:64
throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
^

Error: The requested accessory 'GPIOGarageDoor' was not registered by any plugin.
at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:64:13)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
at bootstrap_node.js:617:3

Appreciate your help.

Separate Open and Close commands, and separate Open and Close state sensors

Hi,

I have two questions:

  1. Can this script be used or adapted to have separate Open and Close commands sent to two GPIO pins?
    Currently there is only one Commands that is driving the door in unknown direction, depending on where it has been and if it has been stopped in the process.
    With separate commands it would be right command to close the door when leaving home, or always right direction to open when arriving.

  2. Can this script be used or adapted to have separate Open and Close state sensors connected to two GPIO pins?

That also would give 100% accurate information of door being open, closed, or if none of these true then stuck in middle.

Janis

Install fails with epoll error

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:191:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.19.118+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/homebridge-gpio-garagedoor/node_modules/epoll
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/homebridge/.npm/_logs/2020-07-19T19_54_00_619Z-debug.log

NO-NC relay

Hello, I really like your progrrmma to control the gate. but I ran into a problem when connecting the gate will automatically open (there is a connection management contacts at 1 second)
What you need to sign in to add to config.json gpio23 was NO by default? He is now NC
"Example doorSwitchValue": 1, ""?
Thank you!

What's the secret?

This is a very responsive plugin! A familiar homebridge issue occurs when you operate the device outside of homebridge, in this case that means using the wall button or garage remote. I was anticipating the usual out-of-sync issues, in which HomeKit is confused about the door state, but was pleasantly surprised that the plugin tracks and updates the state of the garage door almost instantly, even when no Home software is open (I get notifications). This behavior would be very useful for other plugins that monitor GPIO state. Many resort to polling with many second delays. Is there a secret to the responsiveness of state (on a RPi Zero, no less)?

Thanks for your work.

homebridge fails to start. This is the error I get.

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.

GPIO Pin pulled at a constant HIGH

I have this working, but my GPIO pin is at a constant high. So, when I reboot, the garage opens. How do I rewrite the code to keep the pin low or to drop it back to low after it is triggered?

active_low

Can I use this plugin with active_low = 1 in my raspberry?

garage door open

hi i was wondering if you can help me .my carage door needs a signal for only a sec to start opening the door next to stop the door at a specific point it needs another 1 sec signal and finally to start closing it need again 1 sec signal .the signal is being made from a relay connected to raspi when i activate the realy it makes a circuit and signals the motor .
what i want to ask is how i should change the code of this pluging in order to work with my motor ?
thanks in advance
chris

Closed door often show as "opening"

When I open up the Home app my garage is often showing the status "opening" or "closing" even though it is actually closed. I know that the sensor is ideed giving the correct state.
Clicking the button corrects the state to showing "closed" as it should be.

Sensor pins not working on RPI after power failure reboot

I have a weird problem here. When my RPI reboots (only from a power failure, but not when restart command given), the switches/relay/door openers work fine, but the sensors that detect state do not show a change in state, they always show closed- unless... I run the below python repo script once and then view status on that scripts webpage. Once that script is started and webpage viewed, I then stop the python script and start homebridge. This plugin loads and everything then works perfect, door status and switches.

Originally I was playing around with https://github.com/andrewshilliday/garage-door-controller, which is a python script to operate my garage doors and why this is involved- but I later opted to use this plugin (hb plugin). The python script works both with sensors and switches.

Suggestions?

Error when running homebridge

I downloaded the plugin and modified the config.json file but I am getting this error when running homebridge: any help?

[10/27/2016, 7:24:58 AM] Plugin /usr/lib/nodejs does not have a package name that begins with 'homebridge-'.
[10/27/2016, 7:24:59 AM] Loaded plugin: homebridge-gpio-garagedoor
[10/27/2016, 7:24:59 AM] Registering accessory 'homebridge-gpio-garagedoor.GPIOGarageDoor'
[10/27/2016, 7:24:59 AM] ---
[10/27/2016, 7:24:59 AM] Loaded config.json with 0 accessories and 1 platforms.
[10/27/2016, 7:24:59 AM] ---
[10/27/2016, 7:24:59 AM] Loading 1 platforms...
/usr/lib/node_modules/homebridge/lib/api.js:104
  if (name.indexOf('.') == -1) {
          ^

TypeError: Cannot read property 'indexOf' of undefined
    at API.platform (/usr/lib/node_modules/homebridge/lib/api.js:104:11)
    at Server._loadPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:281:45)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:77:36)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
    at Module.load (module.js:490:32)
    at tryModuleLoad (module.js:449:12)
    at Function.Module._load (module.js:441:3)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:382:7)
    at startup (bootstrap_node.js:137:9)
    at bootstrap_node.js:497:3

onoff/epoll compile fails with Node 10

The fixed version of onoff specified by this module, and hence epoll, includes a nan module that uses a deprecated v8::Object::ForceSet method, which breaks install:

../../nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);

Starting Homebridge

I have installed the plugin successfully, the config.json file is correct and adapted!
When I start the homebridge with the commands:

Sudo systemctl daemon-reload
Sudo systemctl enable homebridge
Sudo systemctl start homebridge
Sudo systemctl status homebridge

I see the homebridge isn't working. I can't figure it out why he won't work.
Can you guys help me please.

Im trying to control a PIFACE 2 by homebridge with this plugin. Is this even possible ?

Start up with relay LOW

Is there an opinion to start up with the DoorSwitchPin pulled LOW?
Then get the Pin HIGH to start the gargedoor and back LOW.

The issue now is, when you reboot the Raspberry or maybe the Powerunit of the Rasp or Relayboard goes down, the Door would open by Fault.

Toggle

I installed and configured 3 doors in config.json. When Homebridge starts up, all pins go to an out state and remain there. That leaves the relays in a closed state and never releases. That also means that all doors get opened at startup and can't be closed until I shutdown homebridge. Is there something I'm missing? I need the relays to toggle on/off to open/close the doors. I really want this to work as it has been the most promising plugin for the job. Thank you for all the work you've done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.