Comments (5)
There is no way to know the total number of bulbs on the network. The only way the client knows for sure is if it responds to messages. Right now, Client#discover
will block until at least one light has been discovered and it has reported its state.
I can make it so that it can wait a bit longer, or you can pass the number of lights, but either of them seem kind of messy..
from lifx-gem.
Thought that might be the case. I'd suggest going in the other direction and take out the block altogether. At the moment Client#discover
is delivering an illusion of synchronicity.
from lifx-gem.
Thoughts on removing the blocking in Client#discover
, but then adding a Client#discover!
that takes a timeout and a block. The block is checked every x
seconds and if it returns true, it returns. This allows arbitrary conditions like number of devices, device matching light, etc.
from lifx-gem.
Works for me 👍
from lifx-gem.
Fixed in e0aac8c
from lifx-gem.
Related Issues (20)
- Does not work with Rails HOT 10
- discover! should perform Light::Get at intervals
- Remove uninitialised lights from the lights collection HOT 1
- NoMethodError: undefined method `ipv6_unique_local?' for #<Addrinfo: 127.0.0.1> HOT 3
- Set color when bulb is off, without flashing to old color HOT 11
- Synchronous method timeout errors should be more descriptive HOT 1
- undefined method `parse' for Time:Class (NoMethodError) HOT 5
- LIFX::Client#lights returns list containing extra value that is bad! HOT 1
- Mysterious 000000000000 bulb, and GetMeshFirmware spam HOT 5
- Broadcast packets only get sent on primary network on OS X
- Make TCP connect non-blocking
- Cannot reboot light HOT 6
- How do I create a custom LightCollection? HOT 1
- gateway_connection.rb.write hangs
- How can I make bulb flickering from code ? HOT 3
- Memory leak HOT 10
- GatewayConnection testing is unstable
- Light not appearing via `discover` HOT 3
- The transport manager sends an incorrect packet to the network under Windows
- Firmware 2.0 support? HOT 16
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 lifx-gem.