Comments (3)
Hi! you can checkout the following sample flow https://github.com/alex6o/node-red-contrib-dynamic-dimmer/blob/master/samples/basics/dynamic_dimmer_basics.json which is quite similar!
from node-red-contrib-dynamic-dimmer.
thanks, I understand better now.
this node does a lot of what I want it to, but there are a couple of additional features that would make it more useful. I'd like to be able to specify both the start and end points of the dim. Currently it stores the last final value as its starting point. I want to be able to specify for example: "dim from 20 to 0". If I do that twice now, only the first time will do anything.
also, it would be nice if those commands/values were stored in properties (like msg.payload.value, msg.payload.set, etc). this would make it easier to modify those values with other nodes. (nevermind, I figured this out).
ultimately I want to be able to store the current state of a dimmer in a value and then dim up and down from that value. If the value changes outside of node red (by pressing a physical dimmer switch for instance), then I want to be able to start the dim from that point.
maybe thats outside the purview of what you're trying to do, or maybe I'm missing something. dimming seems to be the main place that node red falls flat as a home automation tool.
thanks
from node-red-contrib-dynamic-dimmer.
One of the main concepts of this node is that it is actually stateful. It is intended to behave similar to a physical dimmer which is directly connected to e.g. a bulb. If you want to change the min and max at "runtime" you can simply send it along with the payload:
{
"msg": {
"payload":{
"target": 0.5,
"command": "DIM",
"config": {
"eventInterval": 600,
"steps": 10,
"minValue": 0,
"maxValue": 75
}
}
}
}
Due to the stateful characteristic of the node it is at the moment not possible to "dim from 20 to 0" twice. In that case you need to send the the SET
command before starting another dim operation.
@store the current state: exposing the internal state should not be necessary, because with the physical dimmer you just need to provide the target value (between 0 and 1) and the node will take care of the rest :)
from node-red-contrib-dynamic-dimmer.
Related Issues (11)
- 25 Steps results in 96% or 4% brightness! HOT 2
- This is NOT a bug report or issue. More a pre emptive THANKS HOT 1
- Option for rounding output HOT 1
- Feature request: Supply initial state HOT 4
- Dim operations sometimes reset to 0 then dim to the target HOT 2
- Is this a bug or is it me? HOT 5
- Endless loop for pause command
- flow stopped due to missing node types HOT 4
- Feature Request - Enable setting of current value to max HOT 4
- Feature Request - ability to pass through topic and other values HOT 2
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-red-contrib-dynamic-dimmer.