cathalmchale / hue Goto Github PK
View Code? Open in Web Editor NEWPowershell module to interact with Philips Hue hub
License: MIT License
Powershell module to interact with Philips Hue hub
License: MIT License
Installed PS Core on Raspbian as in article.
Didn't know what to expect in terms of PS running effectively on Linux, but was pleasantly surprised. Was able to install this Hue Powershell module and kick off the "lights monitor".
The script run perfectly well and did all the things it was supposed to, bar one major issue!
Bug
The "light events" (auto-off events) would not fire, unless I continued to interact with the terminal (type, hit return etc.). Every time I typed something, the Verbose logs of the background events would output. If I typed regularly enough, the script would function exactly as it's supposed to and exactly as it does on Windows!
Solution
I have a fix for this and will commit soon. In short, when Start-LightsMonitor is called, it doesn't exit but rather loops forever and echo's a message "Press any key to stop lights monitor". It checks for a key press and calls Stop-LightsMonitor if one was pressed, otherwise it continues to scan for light events as normal.
I'll probably add a switch e.g. Start-LightsMonitor -StayAlive, so that the Windows version will run as normal - significantly more clock cycles involved in the infinite loop version, I'd imagine!
Need to check the Hue mobile app. This might be straight out of the box. But if not, it's just a case of "conditionally registering the auto-off - based on time of day". i.e. a minor enhancement of behavior that's already developed.
Use case: Auto-off bedroom lights left on after everyone has left the house during daylight hours.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.