Comments (10)
Cool, thanks for your message! The library has been developed based on my own needs, and until now I have not needed alerts, so it's not there yet. It's a good idea, though! I'll have to see how it would work out. π€ Would you happen to have any ideas or suggestions on how the alert system should work in this library?
from yetanotherhueapi.
Cool, I'm really glad you're interested and open to new features. In various implementations and also in the original API I have found hints that there must also be an "alert" in the state. The options for this are select (blink once) and lselect(blink ten times). The most sensible way would be to include it either via the state builder. Or you can wrap it and apply it to lights and rooms (groups). I also noticed that you work a lot with rooms, but a light group is hard to access. If you are interested to talk about more ideas let me know.
from yetanotherhueapi.
By the way, I use your implementation to implement a kind of Hue Disco. It is not necessary to implement it myself, because there are already many apps but I wanted to do it with a real beat detector and in real time on a raspberry pi. For me it's actually a bit cumbersome to use your builder, even if it's really super easy to use.I had to wrap your lights and your rooms unfortunately, because they are final and you don't allow any further implementations or inheritances. In my wrapper I built many methods that make the lights blink or flash. I was thinking about just developing your code further, but then I'm afraid that I can migrate updates from you only with difficulty.
from yetanotherhueapi.
Cumbersome, huh? Well, that's obviously not too good... I'd love to take a look at your code, if you wouldn't mind uploading it to GitHub? π
Also, having now taken a look at the official docs, I would tend to agree that the state builder would be the best place to put the alert functionality into. π
I'm not sure what you mean by saying that a light group is hard to access. What kind of a light group are we talking about? The library does support zones with the getZones()
and getZoneByName(String)
methods. They are completely analogous to the getRooms()
and getRoomByName(String)
methods.
from yetanotherhueapi.
I lack a bit of confidence to share my code with you without comment, because I'm still a student and just started actively programming java a few weeks ago. I had some help from my colleague who gave me code reviews. My code at the moment consists mainly of adding the general beat detector (https://github.com/generic-beat-detector/GBD). It was a lot of work to configure a raspberry pi with a microphone connected so that the general beat detector has something to analyze. I'm proud of the progress though, because now i get the "kick events" in real time, so i can react to every bass kick with a lamp reaction. Your used work can be found under functionalLight. This part of the implementation is as I said not very advanced yet, because I'm always thinking about how to access the lights and if and how to wrap them. I would like to have the functional light also as a functinal room, because some commands would be good if they would be executed synchronously by the whole room. I have shared the repository privately with you. Thanks for you input.
from yetanotherhueapi.
Probably I have then selected exactly the group type, which is not so implemented. I have a group in Hue called Alarm, which is neither a Zone nor a Room, but a Light group. The only way to get to it is this way.
hue.getGroupsOfType(GroupType.LIGHT_GROUP).stream().map(x-> x.getName() == "Alarm").findFirst()
from yetanotherhueapi.
Hey, thanks for sharing! The code looks very nice, nothing to be ashamed of there!
FunctionalLight looks like a sensible class. It follows the composition over inheritance principle. I can see your frustration with the transition time, your idea of .on(int)
and .off(int)
could be worth including with the library itself.
I certainly welcome new ideas, so keep them coming!
from yetanotherhueapi.
@fk0ff92 Hey, I just finished the alerting feature. I wonder if you might want to take a look at it before I merge it to master..? It's in pull request #33.
from yetanotherhueapi.
Alerts have been merged to master.
from yetanotherhueapi.
Alert functionality has been releases in version 2.1.0. Enjoy!
from yetanotherhueapi.
Related Issues (20)
- Add colorloop effect
- Add group 0, i.e. the "all lights" group
- NPE when bridge doesn't return sensors HOT 5
- could you make a java 11 version which includes a module-info file. THX HOT 2
- Get color of light HOT 1
- Turn on / off room without setState (color, alert, etc...) HOT 2
- Why so restrictive? HOT 7
- Add mDNS support for discovering bridges HOT 1
- Add new light HOT 6
- Server-Sent Events HOT 7
- Implement a findByUiniqueId for lights and sensors HOT 11
- No logging by default HOT 3
- TemperatureSensor#getDegreesCelsius NPE HOT 10
- Get state ... question ? HOT 3
- Why such a restrictive State.Builder? HOT 2
- EffectType from String "prism": not one of the values accepted for Enum HOT 2
- Error when using v2 HOT 2
- JKS not found and java.io.FileNotFoundException: https://discovery.meethue.com/ HOT 28
- Client code generation HOT 2
- save bridge details HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yetanotherhueapi.