konsumer / tplink-lightbulb

Control TP-Link smart lightbulbs from nodejs
MIT License
190 stars 32 forks source link

Run the executable on Raspberry pi #36

Closed kartik9k closed 4 years ago

kartik9k commented 5 years ago

Hi! Thanks for the great library/ executables. How can I compile the same on a raspberry pi? It would be of great help.

Many thanks

konsumer commented 5 years ago

On pi, since it's linux, I think it'll be a bit easier than other platforms.

First, install a new version of node:

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install -y nodejs

Run node -v and you should get 12.something

Now run sudo npm i -g tplink-lightbulb

and you should have tplight in your path. You can also install it just to your node-based project (after you have a package.json) with npm i tplink-lightbulb.

bobby-jim commented 4 years ago

Hiya, I see you kindly complied this project for a few other OS, and had hopped the Linux_x64 would work for a RPI (as it does on my CentOS VM) - but I guess it's not 64 or just architecturally different.
May I suggest adding a RPI Standalone version too? Love the project and your efforts - many thanks for sharing.

konsumer commented 4 years ago

Pi isn't supported by the packager for standalone: https://github.com/zeit/pkg

It is super-easy to install the regular node way, though.

bobby-jim commented 4 years ago

Thanks for confirming - I think I understand. I'll have a look at using node.