NorthernMan54 / homebridge-cmd-television

20 stars 1 forks source link

Can't install homebridge-cmd-television on homebridge pi3 #1

Closed rap165 closed 2 years ago

rap165 commented 2 years ago

Hi @NorthernMan54 kudos & awesome work and I appreciate your work.

I have Homebridge v1.3.6 running on Homebridge Raspbian v1.0.25 - Raspberry Pi 3 Model B Rev 1.2 and I can now control my AppleTV using the atvremote -s 192.168.1.167 --airplay-credentialscat ~/atv.credturn_on command... nice, finally we can start the AppleTV with iOS15 again...

yet now I need to get into the homebridge plugin when trying to install your plugin I get the following error...

(pyatv_venv) pi@homebridge:~ $ sudo npm i -g https://github.com/NorthernMan54/homebridge-cmd-television

npm ERR! code 128 npm ERR! An unknown git error occurred npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/NorthernMan54/homebridge-cmd-television.git npm ERR! git@github.com: Permission denied (publickey). npm ERR! fatal: Could not read from remote repository. npm ERR! npm ERR! Please make sure you have the correct access rights npm ERR! and the repository exists.

when trying without sudo I get npm i -g https://github.com/NorthernMan54/homebridge-cmd-television

npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/homebridge-cmd-television npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/homebridge-cmd-television' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/homebridge-cmd-television'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/homebridge-cmd-television' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

I tried also using the homebridge-config-ui-x v4.41.2 but there are many homebridge-cmd-television plugins that fail to install... Any pointers?

cheers

NorthernMan54 commented 2 years ago

FYI - This is still a work in progress, and not functional yet - the buttons aren't wired

But this is an issue with your version of NPM / NodeJS, and you likely need to upgrade or something. But upgrading NPM and NodeJS can break your setup, and cause other issues, so not something to quickly try.

NorthernMan54 commented 2 years ago

So I spent the morning finalizing the code, and it is now fully functional. I can confirm that I can pause/play and turn on/off my Apple TV with Alexa.

WhyElEss commented 2 years ago

Hi @rap165 try sudo -E npm install -g https://github.com/NorthernMan54/homebridge-cmd-television