smartechru / homebridge-relays Goto Github PK
View Code? Open in Web Editor NEWThis Homebridge plugin controls 4 relays through Apple Home App.
License: MIT License
This Homebridge plugin controls 4 relays through Apple Home App.
License: MIT License
Hi Guys don't work, pls help.
Error loading accessory requested in your config.json at position 1
Error: The requested accessory 'GPIODevice' was not registered by any plugin.
at PluginManager.getPluginForAccessory (/usr/lib/node_modules/homebridge/src/pluginManager.ts:198:15)
at /usr/lib/node_modules/homebridge/src/server.ts:347:37
at Array.forEach ()
at Server._loadAccessories (/usr/lib/node_modules/homebridge/src/server.ts:330:29)
at Server.start (/usr/lib/node_modules/homebridge/src/server.ts:156:12)
at cli (/usr/lib/node_modules/homebridge/src/cli.ts:80:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
First of all, thanks for your work on this library. I've searched the history for a solution to this problem, so I'm writing a new request.
There are cases where devices are switched on and off by pulse and on another pin you monitor the status of the device. This is also the case for standard installation pulse relays. A switch on the wall creates a pulse that changes the state of the pulse relay.
I think the solution would be an optional parameter inputPin
, which if filled would serve as a mirroring for the switch state. Now obsolete homebridge-gpio-device
library had a very similar approach, notice the configuration.
With debouncing it can work very nicely, for example with a configuration like this. What do you think about it, thanks for your opinion.
{
"accessory": "Relay",
"name": "Kitchen Light",
"pin": 5,
"invert": true,
"intial_state": 0,
"timeout_ms": 500,
"input_pin": 6,
}
Home application shows wrong status of the relay. when relay is on its shows off when we restart the home application on iphone or iwatch.
Hi, could you please advice me on whether the fact that this plugin doesn't seem to work on HOOBS v4 is currently known? I've tried pretty much everything to make it work on the HOOBS Version: 4.0.92 without any success. Had no issues running it on the v3. Some indication whether it's just me or this is a wider compatibility issue would be appreciated (have been going a bit crazy trying to make the plugin work again).
Thanks
Hello, I can't control my relay, this comes in the console :(
[2020-5-12 17:41:13] [Relay-1] Relay status for 'Relay-1', pin 3 is true
[2020-5-12 17:41:14] [Relay-1] Relay for 'Relay-1', pin 3 timed out.
Please add a configuration for the relay in the config. At me by default the relay is included on break. Although the status of GPIO = HIGH
In the example, the duration has to be called duration_ms.
May I have the source code to build a custom relay switch for my garage that make use of a ultrasonic distance sensor to check whether the garage is open.
If yes you can contact me [email protected]
The description really explains things, I have this opening a trashcan in my kitchen so it needs to be a momentary switch (as it can only open and not close) the relay thankfully turns off after 1000 ms - the switch stays on in Homekit.
My config is :
{
"accessory": "Relay",
"duration_ms": 1000,
"name": "Bin",
"pin": 8,
"invert": true,
"default_state": false
}
any ideas?
Hello,
I have been using this plugin for the past few years successfully and it has always been very effective and stable, thank you !
I have upgraded my system from a Pi 4 to a Raspberry Pi 5 and it broke the plugin compatibility I think because of the new BCM2712 controller.
Here is the output I get at startup :
[01/01/2024, 23:40:17] [ACCESSORYNAME] Initializing Relay accessory...
bcm2835_init: Unable to open /dev/gpiomem: No such file or directory
[01/01/2024, 23:40:17] Error: Could not initialize bcm2835
at bindcall2 (/var/lib/homebridge/node_modules/homebridge-relays/node_modules/rpio/lib/rpio.js:119:9)
at EventEmitter.rpio.init (/var/lib/homebridge/node_modules/homebridge-relays/node_modules/rpio/lib/rpio.js:837:2)
at rpio.open (/var/lib/homebridge/node_modules/homebridge-relays/node_modules/rpio/lib/rpio.js:871:18)
at new RelayAccessory (/var/lib/homebridge/node_modules/homebridge-relays/index.js:35:14)
at /var/lib/homebridge/node_modules/homebridge/src/server.ts:379:50
at Array.forEach ()
at Server.loadAccessories (/var/lib/homebridge/node_modules/homebridge/src/server.ts:299:29)
at Server.start (/var/lib/homebridge/node_modules/homebridge/src/server.ts:179:12)
[01/01/2024, 23:40:17] Got SIGTERM, shutting down Homebridge...
[01/01/2024, 23:40:17] AssertionError [ERR_ASSERTION]: Cannot generate setupURI on an accessory that isn't published yet!
at Bridge.Accessory.setupURI (/var/lib/homebridge/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:994:11)
at Server.setServerStatus (/var/lib/homebridge/node_modules/homebridge/src/server.ts:155:45)
at Server.teardown (/var/lib/homebridge/node_modules/homebridge/src/server.ts:199:10)
at signalHandler (/var/lib/homebridge/node_modules/homebridge/src/cli.ts:93:12)
at process.emit (node:events:517:28)
at process.emit (/var/lib/homebridge/node_modules/homebridge/node_modules/source-map-support/source-map-support.js:516:21)
[01/01/2024, 23:40:22] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
I get that the Pi 5 is still very new hardware and would gladly help to test for a potential update of the plugin.
Thank you !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.