Comments (12)
I'm getting this warning in the server logs and can't figure it out, maybe you have an idea?
pi4: warning: vcgencmd: cannot spawn vcgencmd: ENOENT
ENOENT generally means: "no such file or directory". Are you running Homebridge natively on a Raspberry Pi? What does rpi info
report? Note that the user running Homebridge must be in the video
group to run vcgencmd
.
Yet, I'm getting the updated temperature in the Home tile, which doesn't make sense?
Do you get the warning every 15 seconds (or whatever you've set Heartrate to), or only intermittently? Homebridge RPi will return the previously cached values if it cannot refresh them.
I also have 2 pis and only one has the issue. I've followed the same update instructions from release 1.1.1 for both pis.
What's your setup? Do you run Homebridge on each Pi, or do you access one remotely?
Also, for anyone running Homebridge in Docker, you need to follow the v.1.1.1 update instructions for the remote remote configuration, even if it runs locally.
RTFM:
If you run Homebridge in a container on the Raspberry Pi, let Homebridge RPi connect remotely to (the
pigpiod
daemon running on) the host. Do not try to runpigpiod
in the container.
EDIT I've added this text to the release notes and the Installation section.
from homebridge-rpi.
Homebridge RPi detects whether a configured host is the local Pi, by comparing the serial number from the pigpio
service against the serial number from /proc/cpuinfo
. Does the container provide access to /proc/cpuinfo
? That would confuse Homebridge RPi.
Could you try, in the container:
rpi -D info
rpi -D -H localhost info
rpi -D -H
host-addressinfo
I have no experience running Docker at home. Do you know how I can detect from Javascript that I'm running in a container?
from homebridge-rpi.
Could you try v1.1.2-0? Install through sudo npm -g i homebridge-rpi@beta
.
This version should detect whether it's running inside a container. I don't run Docker myself, so cannot test it. Could you run homebridge -D
and check for a debug message:
localhost: running inside a container
Also, the localhost
message should no longer appear after the Raspberry Pi
message.
from homebridge-rpi.
I first joined this project on v0.0.5 and have had no issues in the past, so I came to the conclusion my set up was OK, but I could be wrong of course.
I have two RPis, one runs Homebridge inside Docker, the other is on the same Lan and has nothing to do with Homebridge, it's solely used as my home vpn, to access home from the outside.
What does rpi info report?
I believe I cannot run that command due to using Docker. So unfortunately I don't think I can run any rpi
commands.
Do you get the warning every 15 seconds
Yep, regularly at the heartbeat.
RTFM
I swear I did, but I may have skipped the prerequisites section this time around 😬
Does the container provide access to /proc/cpuinfo?
Well, I can see the updates below in the logs (pivpn is the Raspberry Pi that shows no issue, pi4
is the one with vcgencmd
warnings), so I assume it does:
[5/16/2020, 10:47:34 PM] [RPi] pivpn: set Current Temperature from 40.1°C to 39.5°C
[5/16/2020, 10:47:34 PM] [RPi] pivpn: set Load from 0.14 to 0.19
[5/16/2020, 10:47:49 PM] [RPi] pi4: warning: vcgencmd: cannot spawn vcgencmd: ENOENT
[5/16/2020, 10:47:49 PM] [RPi] pivpn: set Current Temperature from 39.5°C to 40.1°C
[5/16/2020, 10:47:49 PM] [RPi] pivpn: set Load from 0.19 to 0.29
[5/16/2020, 10:48:04 PM] [RPi] pi4: warning: vcgencmd: cannot spawn vcgencmd: ENOENT
[5/16/2020, 10:48:04 PM] [RPi] pivpn: set Load from 0.29 to 0.23
[5/16/2020, 10:48:19 PM] [RPi] pi4: warning: vcgencmd: cannot spawn vcgencmd: ENOENT
[5/16/2020, 10:48:19 PM] [RPi] pivpn: set Current Temperature from 40.1°C to 39.5°C
[5/16/2020, 10:48:19 PM] [RPi] pivpn: set Load from 0.23 to 0.18
It's just plain weird that I can see the temperature of pi4
in the Home app though.
Finally fwiw, running pigs -a fr 0 1024
on pi4
returns
243 {"date":"2020-05-16T06:46:35+00:00","boot": "2020-05-16 07:25:08","load":" 18:46:35 up 11:21, 2 users, load average: 0.48, 0.49, 0.71","temp":"temp=37.0'C","freq":"frequency(48)=1500398464","volt":"volt=0.8438V","throttled":"throttled=0x0"}
So everything seems configured as expected...
Do you know how I can detect from Javascript that I'm running in a container?
I'm afraid I'm not going to be able to help here.
I might try and "start fresh" tomorrow. I imagine that deleting the plugin from Homebridge and doing all the installation steps backwards is all I need to clean things up...?
Once again, I really appreciate your time helping here. I'll also try and find a way to run rpi -D
from the container.
from homebridge-rpi.
Could you try v1.1.2-0? Install through
sudo npm -g i homebridge-rpi@beta
.
You're really going to hate Docker by now, but I promise it's really awesome!
You don't install plugins using the CLI when running Homebridge containerised, but instead only through the GUI, in my case the notorious Homebridge config UI X
.
This one might be too hard to try and figure out, it's a shame because I really enjoyed using this great plugin. Maybe someone else will be able to chip in in the future... Thanks Erik.
from homebridge-rpi.
ps: turns out Home doesn't keep updating the temperature of pi4
it's just stuck to its last known temp, and isn't varying from there.
pigs -a fr 0 1024
shows a different (and updated) temperature every time I run it, differing from what's shown in Home (which is stuck to 34deg).
from homebridge-rpi.
Ok, thanks for the info. I think it paints a clear picture:
pivpn
works as remote Pi, as intended;pi4
is seen as the local Pi, but thevcgencmd
isn't available in the container.- Looks like you did the correct configuration on the host, but Homebridge RPi simply doesn't connect to it. It doesn't yet realise that it's running inside a container, probably because
/proc/cpuinfo
reports the regular Raspberry Pi stuff, including the Pi's serial number.
On startup, Homebridge RPi:
- Reads the local
/proc/cpuinfo
for the serial number of the local host; - Connects to the
pigpio
server of thehost
mentioned in config.json; - Retrieves the host's
/proc/cpuinfo
throughpigpio
; - Compares the serial number of the host against the locally obtained serial number. If they match, the host is accessed locally.
I first joined this project on v0.0.5 and have had no issues in the past, so I came to the conclusion my set up was OK, but I could be wrong of course.
Yeah, until I had to introduce some breaking changes...
I believe I cannot run that command due to using Docker. So unfortunately I don't think I can run any
rpi
commands.
You should be able to run them from the Terminal in Homebridge Config UI X. Same for the manual install command.
I swear I did, but I may have skipped the prerequisites section this time around
I added the text to the release notes and to the Installation section, so it's not so easy to overlook.
Do you know how I can detect from Javascript that I'm running in a container?
I'm afraid I'm not going to be able to help here.
Found something on stackexchange.com, but cannot test this myself. Hence the beta version. It doesn't seem to break my (non-container) installations, so I'll push it as full version, so you can update from Config UI X.
from homebridge-rpi.
Could you try v1.1.3?
from homebridge-rpi.
Could you try v1.1.3?
Hi. I got straight to v1.1.4 by the time I got your comment. On first reboot this is the output of hb-rpi:
[5/18/2020, 9:20:31 AM] [RPi] pi4: connected to 192.168.8.25:8888
[5/18/2020, 9:20:31 AM] [RPi] pivpn: connected to 192.168.8.23:8888
[5/18/2020, 9:20:31 AM] [RPi] pi4: Raspberry Pi 4B v1.2 (BCM2711, 4GB) - 100009AF01***
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Serial Number to "10009AF01***"
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Manufacturer to "Sony UK"
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Model to "Raspberry Pi 4B"
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Hardware Revision to "1.2"
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Temperature Display Units to 0
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Heartrate to 15 seconds
[5/18/2020, 9:20:31 AM] [RPi] pi4: set Log Level to 2
[5/18/2020, 9:20:31 AM] [RPi] pivpn: Raspberry Pi 2B v1.1 (BCM2836, 1GB) - 0000AD8E4***
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Serial Number to "0000AD8E4***"
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Manufacturer to "Sony UK"
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Model to "Raspberry Pi 2B"
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Hardware Revision to "1.1"
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Temperature Display Units to 0
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Heartrate to 15 seconds
[5/18/2020, 9:20:31 AM] [RPi] pivpn: set Log Level to 2
[5/18/2020, 9:20:31 AM] [RPi] pi4: warning: file handle !== 0
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Current Temperature to 32°C
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Frequency to 1500MHz
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Voltage to 0.8438V
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Throttled to false
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Under Voltage to false
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Load to 0.58
[5/18/2020, 9:20:32 AM] [RPi] pi4: set Last Boot to "Sat May 16 2020 07:25:08"
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Current Temperature to 35.8°C
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Frequency to 600MHz
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Voltage to 1.2V
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Throttled to true
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Under Voltage to true
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Load to 0.14
[5/18/2020, 9:20:32 AM] [RPi] pivpn: set Last Boot to "Tue Apr 28 2020 22:13:53"
Now I don't get the ENOENT
warning I used to get but I now get the following regular updates:
[5/18/2020, 9:21:31 AM] [RPi] pi4: warning: file handle !== 0
[5/18/2020, 9:21:31 AM] [RPi] pi4: set Current Temperature from 31°C to 32°C
[5/18/2020, 9:21:31 AM] [RPi] pi4: set Frequency from 750MHz to 1500MHz
[5/18/2020, 9:21:31 AM] [RPi] pi4: set Load from 0.63 to 0.61
[5/18/2020, 9:21:31 AM] [RPi] pivpn: set Current Temperature from 35.8°C to 36.3°C
[5/18/2020, 9:21:31 AM] [RPi] pivpn: set Load from 0.1 to 0.15
[5/18/2020, 9:21:46 AM] [RPi] pi4: warning: file handle !== 0
[5/18/2020, 9:21:46 AM] [RPi] pi4: set Frequency from 1500MHz to 750MHz
[5/18/2020, 9:21:46 AM] [RPi] pi4: set Load from 0.61 to 0.64
[5/18/2020, 9:21:46 AM] [RPi] pivpn: set Load from 0.15 to 0.25
etc.
The Home tile of Pi4 gets its updates again, so that works now, very well done! I'm not sure what the warning indicates, a file left opened maybe?
Edit: Today I found out Sony UK manufactures Raspberry pis.
from homebridge-rpi.
I'm not sure what the warning indicates, a file left opened maybe?
I does mean another file handle is open. That could be valid if you have another pigpio
client running. It could also indicate a stale handle by Homebridge RPi. You can close all handles through rpi -H pi4 closeHandles
. Or also, of course, by restarting the pigpiod
service.
from homebridge-rpi.
I didn't even have to confirm the issue was fixed, you knew already 😉
restarted pigpiod
and we're in happy world.
Impressive work, thanks again, hopefully it will make it easier for others as well.
from homebridge-rpi.
I didn't even have to confirm the issue was fixed, you knew already 😉
Sorry, I closed the issue, because the original problem with vcgencmd
was solved, as per the log in your post.
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.