Comments (10)
Hi Pierre-Gilles,
I am sorry for the delay in reply. Thank you very much for using node-milight-promise
as part of Gladys. Btw, the project looks exciting to me and maybe I can contribute in some areas, occasionally. As you may know, I have been actively contributing to the pimatic home-automation framework and authored various plugins. May be some of these plugins can be retrofitted into Gladys.
Regarding your question I'd say it is better to create Milight
just once. As the Milight communication is just UDP I have never seen socket failures and I am using this like this as part of long running program. The question is, which socket failures might occur which make the socket unusable and require a new socket to be created? The only case I can imagine is that the network interface is removed temporarilly, e.g. performing ifdown
and ifup
or restarting networking services on the host. I'll check this and eventually improve error handling. If you know about other cases which might apply please let me know.
Thank you very much also for your quick feedback regarding readability of code snippets. I'll change this asap.
Marcus
from node-milight-promise.
May be some of these plugins can be retrofitted into Gladys.
Yeah totally :) I'll get a look !
Regarding your question I'd say it is better to create Milight just once.
Thanks, that what I was thinking first, but I just wanted your confirmation. I think for most case that's the best options. Removing the network interface is not something that happens everyday, and I assume the user who is touching to this kind of settings can understand i can break things. Btw if I get an error I can in Gladys try to create another instance and try again.
Thanks for your answer, and thanks for your changes on the README :)
from node-milight-promise.
Yeah totally :) I'll get a look !
see https://github.com/mwittig?tab=repositories&type=source - basically, projects starting with "pimatic-" are plugins. Unfortunely, github won't let you filter by name and type (source) in a single query.
Maybe the "pimatic-amazing-dash-button" is something fancy to start with.
I'll keep you posted re my findings on socket errors and socket error handling.
from node-milight-promise.
Awesome ! Thanks ! :)
from node-milight-promise.
Hi, I have no news regarding the socket error handling, but I wanted to draw your attention to my recent work on supporting the new version of Milight bridges which implement a new protcol and also provide support for the new Full colour bulbs. Maybe this is something to integrate into gladys.
from node-milight-promise.
Thx for your message here, Nice work!
Is the API still the same ? Do I have just to update the NPM dependency in my gladys module?
from node-milight-promise.
To support the legacy bridges as is, there are no API changes except for the following:
https://github.com/mwittig/node-milight-promise#breaking-and-notable-changes
To support the new bridges the API is slightly different I have written a couple of examples (filenames with "v6" suffix) which demonstrate how to use new protocol. The new bridges also support a new type of bulb which provides "full color" control. https://github.com/mwittig/node-milight-promise/tree/master/examples
from node-milight-promise.
Ok I see.
Thx for the explanation !
Does it mean I need to handle both bridges separately ? When I discover bridges with the "all" option, do I know if a bridge is v6 or no ?
In Gladys i'll need to store somewhere if the bridge is v6 or not, and then call the right command for the right version of the bridge
from node-milight-promise.
Sorry for the delay in reply.
Does it mean I need to handle both bridges separately ?
You don't need to handle them seprately, but you need to be aware the command syntax for the new and old protocol does not exactly match. See https://github.com/mwittig/pimatic-milight-reloaded/tree/master/devices for an implementation of all-in-one device drivers.
When I discover bridges with the "all" option, do I know if a bridge is v6 or no ?
The result objects contain a "type" property which is either "legacy" or "v6". See https://github.com/mwittig/node-milight-promise#bridge-discovery
In Gladys i'll need to store somewhere if the bridge is v6 or not, and then call the right command for the right version of the bridge
Yes. I'd say the bridge type is stored a long with the ip address of the bridge
from node-milight-promise.
Answered. Closing
from node-milight-promise.
Related Issues (20)
- Seeking help HOT 3
- Add TCP-Support for v6.0 HOT 3
- node-milight-promise not controlling bridge HOT 4
- Version 10 of node.js has been released HOT 1
- Support Question HOT 3
- How to change bulb temp? HOT 3
- Possible to ignore previous commands and run last command first? HOT 1
- Inconsistent colors across commands HOT 2
- On/Off does not work with RGBW One Zone Dimmer HOT 14
- How can I set a color value? HOT 15
- Need help on how to use the legacy bridge with command2 HOT 6
- Can somebody help turn zone 5 on/off? HOT 2
- Bitte single statt singe HOT 1
- Buffer() is deprecated HOT 1
- changing the delay before light turns on after hitting a switch HOT 2
- How do I change the Color temperature? HOT 3
- YL5 LED strip controller support HOT 11
- New integration for ha-bridge HOT 1
- Unable to connect to Milight YT1
- Controlling all zones simultaneously 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 node-milight-promise.