Comments (4)
It seems superfluous to add a udp listener myself ontop of the already instantiated existing udp listener in node-lifx...
Could you describe in more detail what are you trying to achieve? The library does not have a network API that would listen for external commands commands. It binds to a UDP port for sending commands to lights and receiving status request responses.
To achieve what you describe, you would need to create some proxy/wrapper around the library. I cannot speak for @MariusRumpf but I doubt there are any plans of adding this type of functionality. I think it would be better suited for a separate module and would likely be a marginal use case.
from node-lifx.
I am with you there @ristomatti this is nothing we support, or which I see make sense for a broader audience. Besides this if needed one might write a wrapper library which does this.
from node-lifx.
But in the cli.js example there is a listener already setup? And if i create another udp listener i have to chose another port which is not supported by my home Automation System. This library uses the node udp4 package So it has a listener. If i send commando to it it does somthing with it.. like in cli.js i just was wonderkind what it does and hoe it expects the udp call to be formatted. The rest i will weird myself. This is more a request for help than a feature request. Because i think it is already there....
from node-lifx.
The Client
class opens the udp4 socket, right. It keeps it itself as reference in the socket
variable found here. You can get that socket from there in your wrapper library.
This library adds his own message queue to support rate limits for sending and message listeners in order to keep track of bulb states. This might be a problem for you when using the same socket. Another problem when using the same port would be that you send your udp message to the lifx lights too, since the processing capacity of the lights is limited and you "spam" the traffic with unneeded packages besides the unknown effects to the message content. I would not go for an approach like this where you use the same port.
from node-lifx.
Related Issues (20)
- ES6 syntax HOT 3
- Implement infrared color packets to control LIFX+ HOT 5
- MultiZone Packets for LIFX Z HOT 8
- powerOn or powerOff with duration set to 0 is not instant HOT 2
- Consider usage with promises HOT 3
- Constant disconnecting HOT 2
- Multiple node-lifx client instances on the same ip address HOT 3
- Create event for state changed of bulb HOT 3
- add light.setPower() HOT 1
- IR capable lights timeout when light.getMaxIR is called HOT 5
- getAmbientLight always returns 0 on BR30+ (IR capable)
- getColorZones doesn't return all zones. HOT 1
- light.getState(), light.getLabel(), light.getHardwareVersion(), ... , time out HOT 3
- Not working in Windows when running Docker HOT 4
- light-online firing incorrectly HOT 2
- Constants wrong for LIFX Mini Day & Night HOT 1
- Using Buffer is deprecated
- Do you need someone to take over the project? HOT 11
- Please update vulnerable dependencies
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 node-lifx.