Viera HTTP server
Very lightweight HTTP server to wrap viera-api.
Make a copy of
config.json and put
the IP address of your TV in there, plus an API key to use for
npm install to install dependencies.
npm start to start the server.
Some samples with curl:
curl -H "Authorization:yourapikey" http://localhost:5000?command=power curl -H "Authorization:yourapikey" http://localhost:5000?command=netflix
..you get the idea.
Running on a server
Currently I have a Raspberry Pi to run this app. I tried using systemd but couldn't get on with it, so I'm now trying forever.
So, to start the app running in forever, run
npm run start-bkgrnd. Run
npm run stop-bkgrnd to stop it.
To abstract this into a command that runs whenever the server starts, you can use Crontab:
@reboot /usr/bin/npm run start-bkgrnd --prefix ~/code/viera-http-server