dominick-han / homebridge-tv-cec

Homebridge support for TV power on/off, source selection, using HDMI-CEC
GNU General Public License v3.0
35 stars 9 forks source link

Homebridge shuts down after trying tu turn it off or on #2

Open thilojaeggi opened 5 years ago

thilojaeggi commented 5 years ago

I get this output: Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed Feb 11 20:22:10 raspberrypi homebridge[4435]: at doWrite (_stream_writable.js:411:19) Feb 11 20:22:10 raspberrypi homebridge[4435]: at writeOrBuffer (_stream_writable.js:399:5) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Socket.Writable.write (_stream_writable.js:299:11) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Power.getState (/usr/local/lib/node_modules/homebridge-hdmi-cec/index.js:93:21) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Characteristic.On.emit (events.js:197:13) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Characteristic.On.Characteristic.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:164:10) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:762:20) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Array.forEach (<anonymous>) Feb 11 20:22:10 raspberrypi homebridge[4435]: at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:726:8) Feb 11 20:22:10 raspberrypi homebridge[4435]: at HAPServer.emit (events.js:197:13) Feb 11 20:22:10 raspberrypi homebridge[4435]: [2/11/2019, 8:22:10 PM] Got SIGTERM, shutting down Homebridge... any Help would be greatly appreciated. Also my current config: { "bridge": { "name": "Homebridge", "username": "CC:22:3D:E3:CE:30", "port": 51826, "pin": "031-45-154" }, "accessories": [ ], "platforms": [ { "name": "Config", "port": 8080, "auth": "form", "theme": "blue", "tempUnits": "c", "sudo": true, "log": { "method": "custom", "command": "sudo journalctl -u homebridge" }, "platform": "config" }, { "platform": "Hue", "users": { "001788FFFEAE0E7D": "6KojUwv7OgVPDyR11Z5lv7mAz7TezInT7iq-yp6N" }, "lights": true }, { "platform": "ZP", "service": "fan" }, { "platform": "CEC", "sources": [ { "name": "Samsung", "address": "0.0.0.0" } ] } ] }

BartoszGan commented 5 years ago

Hi, did you find any solution? I have the same problem

thilojaeggi commented 5 years ago

Sadly no

thilojaeggi commented 5 years ago

Sadly no

Am Mo., 15. Juli 2019 um 22:56 Uhr schrieb BartoszGan < notifications@github.com>:

Hi, did you find any solution? I have the same problem

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dominick-han/homebridge-tv-cec/issues/2?email_source=notifications&email_token=AE6EMHQ7QPKES3CQRWTRNJLP7TQBTA5CNFSM4GWTQ47KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ66IWY#issuecomment-511566939, or mute the thread https://github.com/notifications/unsubscribe-auth/AE6EMHTLCEMNQZVXMFDOVSDP7TQBTANCNFSM4GWTQ47A .

-- Thilo Jäggi

dominick-han commented 5 years ago

You guys can try running cec-client -d 8 from your terminal and manually give it commands and see what happens

BartoszGan commented 5 years ago

Hi, manually everything looks ok:

pi@raspberrypi:~ $ echo scan | cec-client -d 8 log level set to 8 No device type given. Using 'recording device' CEC Parser created - libCEC version 4.0.4 no serial port given. trying autodetect: path: Raspberry Pi com port: RPI

CEC bus information

device #0: TV address: 0.0.0.0 active source: yes vendor: Samsung osd string: TV CEC version: 1.4 power status: on language: pol

device #1: Recorder 1 address: 4.0.0.0 active source: no vendor: Pulse Eight osd string: CECTester CEC version: 1.4 power status: on language: eng

currently active source: TV (0)

reidab commented 4 years ago

This is likely caused by the user that's running homebridge not having access to /dev/vchiq. If you're running homebridge as a user named homebridge, you can grant that access by adding them to the video group with:

sudo usermod -a -G video homebridge
nimbling commented 4 years ago

This is likely caused by the user that's running homebridge not having access to /dev/vchiq. If you're running homebridge as a user named homebridge, you can grant that access by adding them to the video group with:

sudo usermod -a -G video homebridge

This helped me stop homebridge from crashing! ...now if only my LG TV did not have such a bad CEC implementation ;)

adamrzanek commented 4 years ago

I’m tri

This is likely caused by the user that's running homebridge not having access to /dev/vchiq. If you're running homebridge as a user named homebridge, you can grant that access by adding them to the video group with:

sudo usermod -a -G video homebridge

I’m trying this command it doesn’t help. My user is “pi”

Samfox2 commented 4 years ago

Then try sudo usermod -a -G video pi

adamrzanek commented 4 years ago

I tried... homebridge always crashing when I touch tv tile. I’m running official homebridge image on my raspberry. Don’t know what to do and I want to work so bad.