thncode / homebridge-raspberrypi-info

GNU General Public License v3.0
5 stars 6 forks source link

Error /uptime.txt #3

Closed DedMsk closed 5 years ago

DedMsk commented 5 years ago

Hello. Thanks for you work.

Install this plugin. When open Eve App in log I see this...

0|homebridge | [5/13/2019, 7:45:51 PM] [RaspberryPi CPU Temperature] Raspberry Temperatur: 55.306 0|homebridge | { Error: ENOENT: no such file or directory, open '/uptime.txt' 0|homebridge | at Object.openSync (fs.js:438:3) 0|homebridge | at Object.readFileSync (fs.js:343:35) 0|homebridge | at RaspberryPiTemperature.getAvgLoad (/usr/local/lib/node_modules/homebridge-raspberrypi-info/index.js:85:16) 0|homebridge | at load.emit (events.js:189:13) 0|homebridge | at load.Characteristic.getValue (/usr/local/lib/node_modules/hap-nodejs/lib/Characteristic.js:164:10) 0|homebridge | at Bridge.<anonymous> (/usr/local/lib/node_modules/hap-nodejs/lib/Accessory.js:771:20) 0|homebridge | at Array.forEach (<anonymous>) 0|homebridge | at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/hap-nodejs/lib/Accessory.js:735:8) 0|homebridge | at HAPServer.emit (events.js:189:13) 0|homebridge | at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/hap-nodejs/lib/HAPServer.js:928:10) 0|homebridge | errno: -2, 0|homebridge | syscall: 'open', 0|homebridge | code: 'ENOENT', 0|homebridge | path: '/uptime.txt' }

Create this file in homebridge folder homebridge/accessories folder

But not work Can help me please...

DedMsk commented 5 years ago

Change index.js

/home/pi/.homebridge/accessories/uptime.txt