Giter Site home page Giter Site logo

hue's People

Contributors

cathalmchale avatar

Watchers

 avatar  avatar

hue's Issues

Events do not fire on Raspbian with Powershell Core

Powershell Core

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!

Auto-off during particular time of day

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.