ebaauw / homebridge-rpi Goto Github PK
View Code? Open in Web Editor NEWHomebridge plugin for Raspberry Pi.
License: Apache License 2.0
Homebridge plugin for Raspberry Pi.
License: Apache License 2.0
Would it be possible to add some example config so as to be able to see more than just temperature within the Home app for the Pi?
Today I updated my homebridge setup, including this plug-in. It almost works perfect as before, there's just one warning I get the whole time in the logs:
[5/25/2020, 3:17:39 PM] [RPi] RPi: warning: Command failed: vcgencmd measure_temp
I've already singled out a problem. My user homebridge is not allowed to get the cpu temperature by using the new getState file. When letting this user use sudo, there's no problem:
Might this be the problem to the not working measure_temp?
Strange thing is, my main user Pi is able to get the cpu temp by just using the normal cmd without superuser rights. So is this a user rights issue I'm not aware of? How should I tackle this?
[4/15/2020, 2:16:35 PM] [RPi2] warning: raspberrypi: FO (104): error no permission to access file (-137)
[4/15/2020, 2:16:35 PM] [RPi2] error: raspberrypi: FO (104): error no permission to access file (-137)
I don't know what is causing this.
Hello,
Not sure about the scope of this plugin, but looking fr a way to create a simple reboot button in Homebridge and was wondering if it is it possible to create such a reboot button for the Raspi with this plugin? Many thanks.
Hi, here another feature request for such a great project.
The support for valves with the implement timer and the four given icons in HomeKit would be great.
Hi!
The PWM feature you've added recently works great. But I do have a question: E.g. GPIO 18 supports hardware PWM and according to the pigpio API docs there are special calls for it - like gpioHardwarePWM
. In your code you don't seem to distinguish between the pins. Does the gpio-daemon handle this automatically?
I'm asking because I guess that using hardware PWM signal is of better quality and may be reduces CPU usage?
Thanks
Hi,
after removing the plugin from config.json the accessory still showed up on my iDevices, apparently with no issue but obviously frozen. I had to manually remove the accessory from homebridge cachedAccessory file. Is there any other suggested uninstall procedure? Is it a general issue with homebridge 0.4.53 with dynamic platforms?
Thanks
Would like to control the backlight of a pimoroni hyperpixel display via HomeKit.
Currently using wiringpi gpio with the commands:
gpio -g mode pwm
gpio -g 19 0 to turn off
gpio -g 19 60 to turn on
Hi @ebaauw
Is there a plugin that allows third-party devices to be added to EVE? Add third-party devices to homekit like homebrige.
Best Regards
songzh
Or fire sensor or something similar in order to get notifications, cf the Leak sensor for Rain in Homebridge WS.
Hi! Is it possible to have a button within the Switch Accessory to be able of wiring a physical switch? Is it expected a dimmer switch accessory also? Thank you!
Hi,
in my raspberry installation I limited as much as possible any unnecessary writing to the SD-Card to improve reliability. I notice that you write into the system log for every update of the raspberry power status. It seems also that to acquire data from the daemon you pass through an output file written by the daemon. Is it possible to implement everything in memory only?
Thanks
When I follow your instructions I get in Homebridge only the CPU temperature. All other values of the getState script didn't appears. Do I need a syntax to show also the load, the frequency and the voltage?
my JSON:
{
"name": "RPi",
"hosts": [
{
"host": "192.168.178.9",
"name": "Homebridge"
}
],
"platform": "RPi"
}
Hi.
Make a new installation on a raspberry zero w.
Now i got an error
pi@Test:~ $ pigs hwver
socket connect failed
pi@Test:~ $
any idee?
Hi! I'm using 8 gpios to control relays, but I don't know where to set the "emitter.setMaxListeners()"
Here's the log.
Thanks!
homebridge.log
[8/15/2020, 19:29:13] Homebridge is running on port 51131.
[8/15/2020, 19:29:14] [RPi] localhost: connected to localhost:8888
[8/15/2020, 19:29:14] [RPi] localhost: Raspberry Pi 4B v1.1 (BCM2711, 2GB) - 100000004460660F
[8/15/2020, 19:29:14] [RPi] localhost m2-io12: set Serial Number to "100000004460660F-12"
[8/15/2020, 19:29:14] [RPi] localhost m2-io12: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m2-io12: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m2-io12: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m2-io16: set Serial Number to "100000004460660F-16"
[8/15/2020, 19:29:14] [RPi] localhost m2-io16: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m2-io16: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m2-io16: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m2-io20: set Serial Number to "100000004460660F-20"
[8/15/2020, 19:29:14] [RPi] localhost m2-io20: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m2-io20: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m2-io20: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m2-io21: set Serial Number to "100000004460660F-21"
[8/15/2020, 19:29:14] [RPi] localhost m2-io21: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m2-io21: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m2-io21: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m3-io23: set Serial Number to "100000004460660F-23"
[8/15/2020, 19:29:14] [RPi] localhost m3-io23: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m3-io23: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m3-io23: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m3-io24: set Serial Number to "100000004460660F-24"
[8/15/2020, 19:29:14] [RPi] localhost m3-io24: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m3-io24: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m3-io24: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m3-io8: set Serial Number to "100000004460660F-8"
[8/15/2020, 19:29:14] [RPi] localhost m3-io8: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m3-io8: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m3-io8: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m3-io7: set Serial Number to "100000004460660F-7"
[8/15/2020, 19:29:14] [RPi] localhost m3-io7: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m3-io7: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m3-io7: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m4-io6: set Serial Number to "100000004460660F-6"
[8/15/2020, 19:29:14] [RPi] localhost m4-io6: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m4-io6: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m4-io6: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m4-io13: set Serial Number to "100000004460660F-13"
[8/15/2020, 19:29:14] [RPi] localhost m4-io13: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m4-io13: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m4-io13: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m4-io19: set Serial Number to "100000004460660F-19"
[8/15/2020, 19:29:14] [RPi] localhost m4-io19: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m4-io19: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m4-io19: set dutyCycle to 0
[8/15/2020, 19:29:14] [RPi] localhost m4-io26: set Serial Number to "100000004460660F-26"
[8/15/2020, 19:29:14] [RPi] localhost m4-io26: set Manufacturer to "homebridge-rpi"
[8/15/2020, 19:29:14] [RPi] localhost m4-io26: set Model to "Light"
[8/15/2020, 19:29:14] [RPi] localhost m4-io26: set dutyCycle to 0
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 5 listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 83 listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
[8/15/2020, 19:29:15] [RPi] localhost m2-io12: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m2-io16: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m2-io20: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m2-io21: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m3-io23: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m3-io24: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m3-io8: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m3-io7: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m4-io6: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m4-io13: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m4-io19: set On to false
[8/15/2020, 19:29:15] [RPi] localhost m4-io26: set On to false
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 83 listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 83 listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 83 listeners added to [PigpioClient]. Use emitter.setMaxListeners() to increase limit
(node:2305) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to
[PigpioClient]. Use emitter.setMaxListeners() to increase limit
I'm curious to use this plugin, but I'm unable to install it as my RPI 3B+ runs Raspbian (Debian Buster) and had v10 installed.
After setting up homebridge with a number of plugins, I wanted to install this plugin, but got the dependency failure so I upgraded to v12. This, unfortunately (for reasons not quite known to me) borked my RPI Node.js installation so badly that I reverted to Node.js v10.
Since pigpiod
is running on my PI, is there any reason not to force this plugin to install under v10? Did you make v12 a dependency as it is what you tested with and feel comfortable with? Is there anything else I could try?
I'm using RPi to activate the motor on a TV lift. This lift takes 25 seconds to complete.
(I'm actually running through relays to close an Up switch or a Down switch, to soldered leads on the Up and Down buttons on the motor controller. There are physical cut-off switches to kill the motor when the lift reaches full up/down.)
Since the RPi Switch device only has a 5-second max Pulse, I'm solving it with homebridge-delay-switch to trigger a timer automation to set the RPi Switch to OFF after 25 seconds. Having a 25-second Pulse would be way less complicated.
Hi, thanks for your effort. How should this be configured by config.json file?
Hi, can you please help to debug this error:
0|homebridge | [2020-2-21 20:40:50] [Rpi] warning: pi: file handle !== 0
0|homebridge | [2020-2-21 20:40:50] [Rpi] pi: warning: SyntaxError: Unexpected number in JSON at position 45
0|homebridge | at JSON.parse (<anonymous>:null:null)
0|homebridge | at RpiAccessory.heartbeat (/usr/lib/node_modules/homebridge-rpi/lib/RpiAccessory.js:76:30)
0|homebridge | at processTicksAndRejections (internal/process/task_queues.js:97:5)
0|homebridge | at RpiAccessory.<anonymous> (/usr/lib/node_modules/homebridge-rpi/lib/RpiAccessory.js:60:44)
Hi!
First of all: thanks for your excellent work. I am using your Homebridge plugins for a long time now :-)
I've noticed a problem with "homebridge-rpi" when pigpio is being apt-get-installed manually. This is necessary in case someone (like me) starts off by installing the lite version of raspbian. In this case the pigpio-daemon starts listening on localhost-tcpV6 and your plugin seems to try to connect via localhost-tcpV4. The homebridge-log throws:
[RPi] error: 127.0.0.1:8888: cannot connect: ECONNREFUSED
My RPi homebridge-config (excerpt) looks like this:
"name": "RPi",
"platform": "RPi",
"hosts": [
{
"host": "localhost",
"devices": [
{
"name": "Außenlicht",
"device": "light",
"gpio": 23
}
]
}
]
I was able to work around this problem by editing the gpiod.service script and starting gpiod with options "-l -n 127.0.0.1".
Here are the exact steps to reproduce:
Usually I would have expected that nodejs' implementation of createConnection would try to enumerate the different targets of "localhost" by using "getaddrinfo" which may return more than one ip-address ... but obviously they don't?
Thanks
Frank
Hi! I think it would be another great feature to have the support for temperature/humanity sensors like the DHT11 or DHT22 with logging in the eve history.
I've seen multiple requests on almost all my plugins for a possibility to reduce the amount of logging. I'm not sure how best to implement this, and would appreciate your thoughts on this. Please provide your thoughts, commenting to ebaauw/homebridge-lib#26.
Hi,
I am getting [Rpi] warning: heartbeat 1, drift 365
and also some node related errors:
TypeError: events.once is not a function
As for now, node.js v. 12.x is not possible for me, since other Homebridge plugins are not compatible, I am forced to use stable version of 8.x - are you about to optimize for older versions?
Hi there,
Quick question, is there a way to hide the continuous temperature update from the homebridge logs? Cheers
Homebridge 1.1.0 has just been released and this error message now shows up in the log:
The plugin "homebridge-rpi" requires a Homebridge version of ~1.0.4 which does not satisfy the current Homebridge version of 1.1.0. You may need to update this plugin (or Homebridge) to a newer version. You may face unexpected issues or stability problems running this plugin.
I understand that this is just an error message raised by Homebridge and doesn't strictly implies problems - it just needs to be tested and update accordingly.
On my own I'm testing if my setup still works fine (but it's quite limited, I use just the witch
device).
I'm setup on a pi zero w running the official homebridge image.
I have a switch and a button set up in config. When everything boots up and after rpi has shown connected to local host, I get the following error twice.
localhost: warning: NB (19): unknown handle (-25)
The result (assuming it's connected to this error, but I'm not sure) is that the switch (output) works, but the button (input) does not respond to button push.
If I go into terminal and restart pigpiod with a systemctl command, then everything works. But after homebridge restarts I get the unknown handle warning again and the button does not work (until I restart pigpiod).
Implement heartrate characteristic for setting the refresh rate.
First, thank you for a fantastic plugin!
I do not see a smoke created by default - should this be the case or is there just not documentation yet?
I try to explain how I use this plugin and how 1.1.x has broke my setup.
First, versions:
Node.js 12.16.3
npm 6.14.5
Homebridge 1.0.4
Homebridge RPi 1.1.3
I have a 4 relay board (like this) and I use Homebridge RPi for command its relays by means of 4 switches, two static and two pulsed (1s):
{
"platform": "RPi"
"name": "GPIO relays",
"hosts": [
{
"host": "localhost:8888",
"devices": [
{
"device": "switch",
"name": "Switch 1",
"gpio": 17,
"reversed": true,
"pulse": 1000
},
{
"device": "switch",
"name": "Switch 2",
"gpio": 27,
"reversed": true
},
{
"device": "switch",
"name": "Switch 3",
"gpio": 22,
"reversed": true,
"pulse": 1000
},
{
"device": "switch",
"name": "Switch 4",
"gpio": 23,
"reversed": true
}
]
}
]
}
My problem, and I already had it before 1.1.x but I had managed to solve it with my own hack, is the initial status of the GPIO outputs, which I need to be reversed.
The 4 relays can all be wired either NO or NC, but, because of the device I'm commanding by means of them, I must wire them NO, because they must stay open also when the plugin (or Homebridge, or the whole Raspberry Pi) is shut down.
They must be allowed to switch to closed state only when I command them from the Home app.
Unfortunately for me, the GPIO logical and electrical output is that when the logic state is LOW (pigs write 0
) the electrical output is high and the relay engages from Normally Open to Closed, and instead when the logic state is HIGH (pigs write 1
) the electrical output is low.
This plugin doesn't allow to reverse the GPIO initial state (the switch
device features the reversed
option, but that's useful just for reverse the state of the switch as shown on the Home app.
In order to solve my issue, I added this to /etc/rc.local
:
pigs write 17 1
pigs write 27 1
pigs write 22 1
pigs write 23 1
This effectively switched off (GPIO logic high, electrical low) the relays, and because this plugin didn't noticed this hack, the relays where to engage only when I activated them trough the Home app.
Now with 1.1 this is not working anymore, and my understanding is that it's because of the improved error detection listed in the changelog.
Unfortunately this means that now I have to ask proper support for reverse the initial GPIO state.
Here is an example: in homebridge-gpio-device
, another plugin for interact with the GPIO, its DigitalOutput/switch
device features these two options:
inverted
: "reverse the behaviour of the GPIO output pin (on: LOW, off: HIGH)"
initState
: "default state of the switch at startup (0: off, 1: on)"
homebridge-rpi
reversed
is like homebridge-gpio-device
initState
, where instead there is no equivalent to homebridge-gpio-device
inverted
.
In other words, I ask to be able to set from the plugin itself the default state of the GPIO outputs, like the pigs write xx 1
above.
Thank you
Hello, I tried to install this plugin and it seems very good. But unfortunately for me, it didn't work... Before installing this plugin, I had no issues and since I installed it, I receive warning every 15 seconds like this one:
[5/20/2020, 09:12:34] [RPi] warning: 192.168.1.22: 192.168.1.22:8888: cannot connect: ECONNREFUSED
l also encounter a problem to switch on a LED. I configure a device like this code:
{
"name": "RPi",
"hosts": [
{
"host": "192.168.1.22",
"devices": [
{
"device": "switch",
"name": "Lampe Salon",
"gpio": 17
}
]
}
],
"platform": "RPi"
}
I see this device in my Home App, I can switch On or Off the button but it didn't work in real life, the LED remains off.
To test every new plugins, I install a new version of homebridge on a test Raspberry so I started with a clean distribution. The LED is still OK because when I connect it directly on the 5V, it works.
I attached the log of my homebridge.
Thank you for helping me,
Kevin
It would seem that my plugins, including Homebridge RPi, do not run under HOOBS. To make them work, HOOBS have forked and changed them. This is perfectly fine, as my plugins are open source.
Please note that I don't understand and cannot support the changes HOOBS made to my plugins. I am not affiliated with HOOBS. I do not run HOOBS. I have not been involved with "certifying" my plugins for HOOBS. If you're running HOOBS, please contact HOOBS support for any issues with Homebridge RPi.
As described in the README, I recommend to run Homebridge RPi on a standard Homebridge installation.
Hi ebaauw!
Is it possible to choose the state of the devices in case of a reboot, or power failure?
Thank you!
I'm trying to control a relay thanks to your plugin but for some reason I can't use the pulse option. So I think i'm not using it properly. What I would like to do is to switch my relay ON for a short period of time and switch back OFF after that. Is this how the pulse is supposed to work ?
In my case the switch is turned OFF after around 20-30 seconds even if I specify a few ms.
My configuration :
{
"device": "switch",
"name": "test",
"gpio": 5,
"reversed": true,
"pulse": 50
},
Can you help me with this issue ?
Hi, how do I integrate ab waterfowl Sensor for measuring water consumption per Liter.
BR
Flo
Hi. After uninstalling the platform, how to remove the accessory from HomeKit? Thank you very much for you effort.
Thank you for this plugin. It looks like it'll be perfect.
I have everything running, but I'm not sure how to use RPI GPIO pins to start automations. I get this back from the rpi
command line tool:
pi@raspberrypi:~ $ /opt/nodejs/bin/rpi info
{
"model": "Zero W",
"revision": "1.1",
"processor": "BCM2835",
"memory": "512MB",
"manufacturer": "Sony UK",
"gpioMask": "0xffffffc",
"serial": "00000000938C8AAC",
"date": "2020-01-06T16:40:20+00:00",
"load": 0.61,
"temp": 30.4,
"freq": 1000000000,
"volt": 1.35,
"throttled": "0x0"
}
Is there a way to break out the GPIO pins? Can I break apart the Mask in Homebridge? Or do we need a new communication channel to alert Homebridge when a GPIO pin changes state?
thanks
Nice piece of software @ebaauw, thanks!
This is not an issue, but a petition
It would be great to have also a switch that turns of after x ms, so we can use it as if the raspberrypi was pressing a button and not a switch.
The button should do something like:
It would be an option like turnOffAfter
in mqttthing
This way, it can be used to cicle between states, for example like old radios, with the search forward button.
It also would be useful for modernizing pieces of hardware with the typical three buttons "enter, next option, exit"
I would use it, for example, in modernizing old Hi-Fi systems, by bridging the standy button and connecting it to a raspberrypi relay; this way, I would be able to switch ON and OFF the Hi-Fi system as if I was pressing the physical button
What are your thougts about it?
Do you think it could be useful?
Again, thanks for the code :)
PS: I know this could be done with automation in "Home" app, with shortcuts on the iPhone, with python scripts... but each of them have its caveats and all of them seems a little bit "hacky"
run the command rpi info
in a shell, get this error :
rpi info: error: RangeError: 0x00D03114: unknown revision
at Function.parseRevision (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiInfo.js:157:13)
at Function.parseCpuInfo (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiInfo.js:126:25)
at RpiInfo.getCpuInfo (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiInfo.js:109:29)
at async Main.info (/usr/local/lib/node_modules/homebridge-rpi/cli/rpi.js:182:14)
at async Main.main (/usr/local/lib/node_modules/homebridge-rpi/cli/rpi.js:129:7)
I add some debug code to dump out result
variable
{
manufacturer: 'Sony UK',
memory: undefined,
model: '4B',
processor: 'BCM2711',
revision: '1.4'
}
it seems like this plugins doesn't fit the newest 8G memory Raspberry Pi model
Hope we can fix this bug as soon as possible
Hi,
I have deleted some devices (sensors or switches) from the config.json and restarted the homebrigde-service. But the devices are still there in the Home-App.
How can I remove old/invalid devices?
Thanks,
Stefan
There is no new accessory in Home.app. How should I use it?
A feature that enables/disables this info would be great as many do not need to check the state of the temperature and other information on the device. I see a lot of chatter within the log for information i do not use or need.
How can one disable that?
First of all, thank you for creating/sharing this wonderful plug-in. It transformed my 20-years-old home security system into a smart home security system. All my doors/windows are wired to HomeKit. Homebridge-rpi works like charm!
There is one sensor that I'm not able to migrate properly though. It's a mechanical heat detector. It's commonly used where smoke sensor is not a good option. Kitchen and garage are the most common application as the environment tends to damage smoke detectors.
You can find the technical details of mechanical heat detectors here.
https://www.systemsensor.com/en-us/Documents/5600_Series_Manual_I56-2175.pdf
It would be awesome to allow HomeKit handeling state of connected pin just like smoke detectors.
Thank you!
Hi,
I just installed homebridge-pi to monitor temperature of my two Pi's. I followed the Raspbery Pi Configuration guide and got things working fine on both computers, first try.
However, upon restarting Homebridge, I get an error from Homebridge-hue in the Homebridge logs, as follow:
[3/6/2020, 11:38:28 AM] [Hue] ConbeeGW: error: /sensors/1: {"config":{"configured":true,"on":true,"sunriseoffset":30,"sunsetoffset":-30,"reachable":true},"etag":"2a2888d62308ddd6d2bd65da0e63c919","manufacturername":"Philips","modelid":"PHDL00","name":"Daylight","state":{"dark":true,"daylight":null,"lastupdated":"none","status":null,"lightlevel":0},"swversion":"1.0","type":"Daylight","uniqueid":"00:21:2e:ff:ff:05:02:26-01"}
TypeError: Cannot read property 'period' of undefined
at HueSensor.checkStatus (/homebridge/node_modules/homebridge-hue/lib/HueSensor.js:2035:48)
at new HueSensor (/homebridge/node_modules/homebridge-hue/lib/HueSensor.js:1523:12)
at HueAccessory.exposeSensorResource (/homebridge/node_modules/homebridge-hue/lib/HueAccessory.js:312:20)
at HueAccessory.exposeSensorResources (/homebridge/node_modules/homebridge-hue/lib/HueAccessory.js:302:12)
at HueAccessory.expose (/homebridge/node_modules/homebridge-hue/lib/HueAccessory.js:123:8)
at HueBridge.exposeResources (/homebridge/node_modules/homebridge-hue/lib/HueBridge.js:534:49)
at HueBridge.accessories (/homebridge/node_modules/homebridge-hue/lib/HueBridge.js:92:16)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)
at async HuePlatform.accessories (/homebridge/node_modules/homebridge-hue/lib/HuePlatform.js:311:29)
More about my Hue config here (and quickly resolved bug): ebaauw/homebridge-hue#636
Homebridge launches fine and is usable, however all homebridge-hue exposed devices fail to work, resulting in the following logs:
[3/6/2020, 11:44:23 AM] [Hue] ConbeeGW: gateway request 75: put /lights/1/state {"on":true}
[3/6/2020, 11:44:23 AM] [Hue] ConbeeGW: gateway communication error: resource, /lights/1, not available
Could the pigpiod
and vcgencmd
script have messed things up with Conbee II USB connections?
Note: I believe this plugin/config is definitely the culprit, as things were working fine an hour ago (and have been for days now).
Thanks!
I installed and setup the plugin and I only see a single "thermostat" accessory that shows the temperature of localhost
. It's missing the frequency, voltage, and throttled information.
Hi,
i try to add a switch for controlling a PIN (GPIO) and get this error: "error GPIO operation not permitted"
Any ideas?
Thanks,
Stefan
Apr 22 13:10:46 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:46] Homebridge is running on port 51826.
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] warning: heartbeat 1, drift 375
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] localhost: Raspberry Pi 3B+ v1.3 (BCM2837, 1GB) - 0000000021700610
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] localhost: set Serial Number to "0000000021700610"
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] localhost: set Manufacturer to "Sony UK"
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] localhost: set Model to "Raspberry Pi 3B+"
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] localhost: set Hardware Revision to "1.3"
Apr 22 13:10:48 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:48] [RPi] localhost: set Temperature Display Units to 0
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] warning: heartbeat 2, drift 464
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] localhost: set Current Temperature to 58°C
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] localhost: set Frequency to 600MHz
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] localhost: set Voltage to 1.2V
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] localhost: set Throttled to true
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] localhost: set Under Voltage to true
Apr 22 13:10:49 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:49] [RPi] localhost: set Load to 1.73
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:50] [RPi] localhost GarageLadestation: set Serial Number to "0000000021700610-1"
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:50] [RPi] localhost GarageLadestation: set Manufacturer to "homebridge-rpi"
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:50] [RPi] localhost GarageLadestation: set Model to "Switch"
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: [2020-4-22 13:10:50] [RPi] warning: localhost: MODES (0): error GPIO operation not permitted (-41)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: (node:492) UnhandledPromiseRejectionWarning: Error: MODES (0): error GPIO operation not permitted (-41)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: at PigpioClient._onCmdData (/usr/lib/node_modules/homebridge-rpi/lib/PigpioClient.js:397:18)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: at Socket.emit (events.js:310:20)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: at addChunk (_stream_readable.js:286:12)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: at readableAddChunk (_stream_readable.js:268:9)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: at Socket.Readable.push (_stream_readable.js:209:10)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: (node:492) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
Apr 22 13:10:50 ioBrokerGarage homebridge[492]: (node:492) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I did a clean flash on my Raspberry Pi Zero W, using the official Homebridge dmg from here:
https://github.com/homebridge/homebridge-raspbian-image/wiki/Getting-Started
Installed no other plugin except Homebridge-rpi, and had to install pigpiod manually as it wasn't on the Homebridge dmg. When the homebridge-rpi plugin was installed, I added my simple 1 accessory details to the config, no issues there. When the Homebridge service restarts it presents an error as:
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
at RpiPlatform.checkDevice (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiPlatform.js:202:32)
at RpiPlatform.init (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiPlatform.js:143:22)
And then a few more lines which I can copy over if desired. When I try to assess rpi using rpi info, I get the following issue:
pi@homebridge:~ $ rpi info
rpi info: error: TypeError: sched.startsWith is not a function
at Function.getCpuInfo (/usr/local/lib/node_modules/homebridge-rpi/lib/RpiInfo.js:101:16)
at async Main.info (/usr/local/lib/node_modules/homebridge-rpi/cli/rpi.js:175:14)
at async Main.main (/usr/local/lib/node_modules/homebridge-rpi/cli/rpi.js:129:7)
Node.js version - v12.16.3
Npm Version - v6.14.5
Homebridge Config UI X - v4.19.0
Homebridge RPi - v1.1.2
Thoughts?
try the plugin.
Get strange error.
what do i dont see?
[1/19/2020, 9:45:22 PM] Homebridge is running on port 52967.
[1/19/2020, 9:45:23 PM] [Rpi] warning: testding: FO (104): error no permission to access file (-137)
[1/19/2020, 9:45:23 PM] [Rpi] error: testding: Error: FO (104): error no permission to access file (-137)
at PigpioClient._onCmdData (/homebridge/node_modules/homebridge-rpi/lib/PigpioClient.js:402:18)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
[1/19/2020, 9:45:23 PM] [Rpi] testding: Raspberry Pi 4B v1.1 (BCM2711, 4GB) -
(node:3075) UnhandledPromiseRejectionWarning: RangeError: params.id: invalid id
at new AccessoryDelegate (/homebridge/node_modules/homebridge-rpi/node_modules/homebridge-lib/lib/AccessoryDelegate.js:47:13)
at new RpiAccessory (/homebridge/node_modules/homebridge-rpi/lib/RpiAccessory.js:30:5)
at RpiPlatform.checkDevice (/homebridge/node_modules/homebridge-rpi/lib/RpiPlatform.js:196:28)
at processTicksAndRejections (internal/process/task_queues.js:94:5)
(node:3075) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3075) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Thanks for this new update, it's very neat!
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
Yet, I'm getting the updated temperature in the Home tile, which doesn't make sense?
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.
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. I had a bunch of errors that were resolved once I reinstated Remote GPIO and /opt/pigpio/access
Thanks in advance (also thanks for adding the ability to hide the temp/cpu updates in the logs #20 )
Hello,
thanks for another sweet plugin from you. I have two questions:
Do I need to go through the python script for the fan first? --> https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim
I do not see a config.json file, so do I just need to install the plugin, go through your guide and thats it???
Thanks in advance for your help!
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.