Git Product home page Git Product logo

Comments (10)

ebaauw avatar ebaauw commented on May 22, 2024

Looks like the pigpiod cannot access /proc/cpuinfo. Did you whitelist it? See https://github.com/ebaauw/homebridge-rpi#file-access.

from homebridge-rpi.

flexizon avatar flexizon commented on May 22, 2024

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.

I h
raspboard

Working great!!
now when i leave my home all lights go out in my shed

from homebridge-rpi.

flexizon avatar flexizon commented on May 22, 2024

Other question.
Should it work with wifi? did you test it?

from homebridge-rpi.

ebaauw avatar ebaauw commented on May 22, 2024

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.

flexizon avatar flexizon commented on May 22, 2024

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.

ebaauw avatar ebaauw commented on May 22, 2024

v0.0.5 has a reversed setting for button, contact, and switch devices.

from homebridge-rpi.

flexizon avatar flexizon commented on May 22, 2024

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 for button, contact, and switch devices.

v0.0.5 has a reversed setting for button, contact, and switch devices.

going to test it

from homebridge-rpi.

flexizon avatar flexizon commented on May 22, 2024
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.

 avatar commented on May 22, 2024

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.

ebaauw avatar ebaauw commented on May 22, 2024

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)

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.