porsager / busylight

node library for busylight
49 stars 17 forks source link

Set busylight from bash/CLI? #9

Closed runestone74 closed 6 years ago

runestone74 commented 7 years ago

I would like to use my unused Busylight to show status on different Home Assistant alerts ( https://home-assistant.io/ ) but since my coding skills are slim to none, I have a hard time making ie a bash script for simple actions like"red light on when the water is too hot" etc. Would someone guide me in the right direction, preferably with some sample script, please :) (just for the Busylight action, inside a bash script)

porsager commented 7 years ago

It's a very good idea to make support for a CLI in this module, but I don't have the time to look closer at it right now. I'll leave this issue open, and then I hope i can get around to it soon.

With regards to the bash script it should be easier once there's CLI support for it, but until then you could run node with code directly like node -r 'require('busylight').get().ring().pulse()' if you don't want to save a file for it.

mdavis777 commented 7 years ago

I am also having a lot of problems getting the light to respond at all. It seems to be hanging on trying to connect.

porsager commented 7 years ago

@mdavis777 could you create a new issue with as much detail about your setup and the problem as possible?

porsager commented 6 years ago

Someone apparently went ahead and wrapped busylight as a cli module ;) Awesome

https://github.com/jamesrichford/busylight-cli