Comments (10)
Looks like the pigpiod
cannot access /proc/cpuinfo
. Did you whitelist it? See https://github.com/ebaauw/homebridge-rpi#file-access.
from homebridge-rpi.
YES YES YES!!!!
i am running this on homebridge so i can control it with homekit (apple). If you only install the plugin it's not going to work.
So i did this (the file access thing). (like you told me to do)
**_File Access
pigpio provides a hook to access files remotely. homebridge-rpi uses this hook to get the Raspberry Pi's serial number from /proc/cpuinfo and to get the output from the vcgencmd script. These files need to be whitelisted, in /opt/pigpio/access:
$ sudo sh -c 'cat - > /opt/pigpio/access' <<+
/proc/cpuinfo r
/opt/pigpio/vcgencmd.out r
+_**
I am Running this code on a raspberry 4 with 4gb memory .
{
"bridge": {
"name": "xxxxxxxx",
"username": "xx:xx:xx:xx:xx:xx",
"port": 52967,
"pin": "031-45-154"
},
"accessories": [],
"platforms": [
{
"name": "Raspberry schuur",
"hosts": [
{
"host": "111.111.2.77", Youre homebridge ip number
"name": "Raspberry schuur",
"devices": [
{
"device": "switch",
"name": "Relay1",
"gpio": 5
},
{
"device": "switch",
"name": "Relay2",
"gpio": 6
},
{
"device": "switch",
"name": "Relay3",
"gpio": 13
},
{
"device": "switch",
"name": "Relay4",
"gpio": 16
},
{
"device": "switch",
"name": "Relay5",
"gpio": 19
},
{
"device": "switch",
"name": "Relay6",
"gpio": 20
},
{
"device": "switch",
"name": "Relay7",
"gpio": 21
},
{
"device": "switch",
"name": "Relay8",
"gpio": 26
},
{
"device": "button",
"name": "Switch1",
"gpio": 4
},
{
"device": "button",
"name": "Switch2",
"gpio": 17
},
{
"device": "button",
"name": "Switch3",
"gpio": 18
},
{
"device": "button",
"name": "Switch4",
"gpio": 27
},
{
"device": "button",
"name": "Switch5",
"gpio": 22
},
{
"device": "button",
"name": "Switch6",
"gpio": 23
},
{
"device": "button",
"name": "Switch7",
"gpio": 24
},
{
"device": "button",
"name": "Switch8",
"gpio": 10
}
]
}
],
"platform": "Rpi"
}
]
}
on this board. The only problem with the board is... they make it like off is on and on is off.
Working great!!
now when i leave my home all lights go out in my shed
from homebridge-rpi.
Other question.
Should it work with wifi? did you test it?
from homebridge-rpi.
The only problem with the board is... they make it like off is on and on is off.
Did you connect the light to the relay NO or NC output? Anyways, I’ll see if I can add a setting per port to indicate that the on/off logic is reversed.
Are those push buttons on the board? Did you try Double Press and Long Press on them?
Should it work with wifi?
Not sure where you want to use WiFi? Looks like you’re running homebridge on the Raspberry Pi to which the board is connected? Yes, homebridge should work over WiFi, but wired Ethernet might be more reliable.
from homebridge-rpi.
The only problem with the board is... they make it like off is on and on is off.
Did you connect the light to the relay NO or NC output? Anyways, I’ll see if I can add a setting per port to indicate that the on/off logic is reversed.
they just made a design fault with the pull up diode.
dont ask me why. But any other relay boards works fine.
Are those push buttons on the board? Did you try Double Press and Long Press on them?
Yes push buttons. i personly do like the double press and long press. give some new ideas.
Should it work with wifi?
Not sure where you want to use WiFi? Looks like you’re running homebridge on the Raspberry Pi to which the board is connected? Yes, homebridge should work over WiFi, but wired Ethernet might be more reliable.
Wifi is sometimes just that little bit more easy for far away things.
from homebridge-rpi.
v0.0.5 has a reversed
setting for button
, contact
, and switch
devices.
from homebridge-rpi.
this one is also important
_Configure pigpiod Service
Raspbian comes with a service definition for pigpiod, in /lib/systemd/system/pigpiod.service. By default pigpiod won't accept remote connections, due to the -l option. To enable remote connections, run sudo raspi-config and set Remote GPIO (P8) under Interfacing Options (5). This will create a drop-in configuration in /etc/systemd/system/pigpiod.service.d/public.conf, removing the -l option. After that, reload the daemon by:
$ sudo systemctl daemon-reload
Enable pigpiod Service
To enable and start pigpiod as a service, issue:
$ sudo systemctl enable pigpiod
$ sudo systemctl start pigpiod
To check that the service is running, issue:
$ pigs hwver
10494163_
v0.0.5 has a
reversed
setting forbutton
,contact
, andswitch
devices.
v0.0.5 has a
reversed
setting forbutton
,contact
, andswitch
devices.
going to test it
from homebridge-rpi.
v0.0.5 has a reversed setting for button, contact, and switch devices.
going to test it
Its working for relay switches. On is On on the board. But stil its wierd that they make the board diffrent.
from homebridge-rpi.
Im having difficulty installing the vcgencmd script. Do I have to copy paste the entire grey block in the terminal, (which gives me errors) or do I type it in line by line in the terminal (which makes me stuck in this > mode where I can't t give any commands anymore. Or do I just copy the code between the commands in nano and save it as an .sh? Can you elaborate on the instructions?
Secondly, when i test by doing pigs shell vcgencmd, I get 32256 as response
from homebridge-rpi.
Copy/paste the text (from sudo
up to and including the line with only +
) into the shell. That will create the script. If you copy line for line, you'll see the >
prompt, until you get to the line with only +
.
Next, copy/paste the line with chmod
(not including the $
prompt), to make the script executable. Probably need a sudo
before chmod
as well...
Secondly, when i test by doing pigs shell vcgencmd, I get 32256 as response
If pigs shell vcgencmd
returns anything other than 0, the script hasn't run properly, see http://abyz.me.uk/rpi/pigpio/pigs.html#SHELL.
from homebridge-rpi.
Related Issues (20)
- rocker to locally control a light HOT 2
- Switch Pulse HOT 1
- All relays switch once at boot remote Raspberry Pi HOT 3
- Latest version of PiOS has broken LED control HOT 7
- Heartbeat error? "Cannot open ENOENT" HOT 4
- Fan Shim accessories non functional HOT 21
- rip info return error HOT 2
- Reversed State? HOT 7
- Increase pulse max value to at least 1 minute HOT 1
- Garage Door Device HOT 6
- [Minor, minor issue] Broken URL in Wiki HOT 1
- Raspberry Pi 5 HOT 3
- error on rpi info run: hwmon/hwmon2/pwm1 HOT 5
- problems with other accounts HOT 2
- new "raspberrypi" device HOT 1
- New temperature sensor HOT 3
- one minute pulse duration HOT 6
- PWR LED on RPI 3B+ HOT 1
- The Pi itself is exposed as an accessory even if it's configured to be hidden HOT 1
- Making desktop power switch HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-rpi.