thncode / homebridge-raspberrypi-info

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

Some warnings in the log after update to Homebridge 1.3.1 #11

Open permaMonk opened 3 years ago

permaMonk commented 3 years ago

Log [homebridge-raspberrypi-info] This plugin generated a warning from the characteristic 'S2W2': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.

In the Eve app, everything still seems to work.

TZPete commented 3 years ago

Same issue here. After updating to Homebridge v1.3.1 & v1.3.2 [04/03/2021, 16:06:37] [homebridge-raspberrypi-info] This plugin threw an error from the characteristic 'Uptime': Unhandled error thrown inside read handler for characteristic: ENOENT: no such file or directory, open '/uptime.txt'. See https://git.io/JtMGR for more info. [04/03/2021, 16:06:37] [homebridge-raspberrypi-info] This plugin threw an error from the characteristic 'Average Load': Unhandled error thrown inside read handler for characteristic: ENOENT: no such file or directory, open '/uptime.txt'. See https://git.io/JtMGR for more info. In Eve App Uptime/ Average Load is not shown

permaMonk commented 3 years ago

The warning are still there - also with Homebridge v1.3.2. But they disappear after several restarts of HB. And sometimes after another restart they come again.

In Eve App Uptime/ Average Load are shown.

permaMonk commented 3 years ago

After update of "homebridge-config-ui-x" to v4.40.0 today its starting again.

[homebridge-raspberrypi-info] This plugin generated a warning from the characteristic 'S2W2': SET handler returned write response value, though the characteristic doesn't support write response. See https://git.io/JtMGR for more info.​

TZPete commented 3 years ago

warnings no longer occurring after search & replace string "/uptime.txt" with "/tmp/uptime.txt" in file "/usr/local/lib/node_modules/homebridge-raspberrypi-info/index.js"

permaMonk commented 3 years ago

Found "uptime.txt" at 3 places. And all 3 are already set to "/tmp/uptime.txt".

So that doesn't seem to be the cause of the error.

aebgit commented 2 years ago

It seems homebridge cannot write to /tmp. To solve this:

  1. check under which user-account your homebridge is running (it usually pi): ps -u | grep homebridge should return something like: pi 5379 0.0 0.0 4368 552 pts/1 S+ 10:11 0:00 grep --color=auto homebridge (username is indicated the in first part = pi)

  2. find and replace whatever path is in /usr/lib/node_modules/homebridge-raspberrypi-info/index.jsto /home/<username>/uptime.txt. Replace <username> with the actual username from step 1, so for example /home/pi/uptime.txt

  3. restart homebridge

permaMonk commented 2 years ago

It seems homebridge cannot write to /tmp. To solve this: …

Sorry @aebgit I don’t know why I loose sight of this issue. This was been solved at any point of time. And I don’t know with which version of HB, HB UI or HB Rasberrypi Info.

Yet no problems with: HB: 1.5.0 HB UI: 4.50 HB Rasberrypi Info: 0.0.5

From my side this issue may be closed.