Comments (8)
+1
Was going to open an issue on the same topic. Right now I'm injecting a nonsense payload into it to trigger the output, but the warning in the debug window is annoying.
Thanks
from node-red-contrib-light-scheduler.
Right now I'm injecting a nonsense payload into it to trigger the output, but the warning in the debug window is annoying.
Can you verify that this is working? I actually tried the same and it did not work. I am currently sending two different overrides to force a change and trigger the output, which seems to work but it feels dirty :).
from node-red-contrib-light-scheduler.
Yes, it does work. If you have a look at the code it just check the input word and emits a warn if no matching has been found, but still processes the output.
Yesterday I posted a simple pull request to make the node accept "trigger" as input; let's wait for the dev.
from node-red-contrib-light-scheduler.
Actually, I checked the code and it appears to me that it should not trigger the output reliably when you send garbage. Yes, it sends the warning that it is not able to interpret the msg.payload and it calls evaluate() anyway. However, evaluate() calls setState() and setState() only triggers the output if either outputfreq is minutely or msg.payload (which is either set to node.onPayload or node.offPayload) has changed compared to the last call. If you send garbage input the evaluate() function decides depending on matchEvent and I fear that this does not guarantee that the output is triggered every time :). If you check in node-red with a debug node behind the scheduler and inject, you should only see the warning but nothing from the debug node unless matchEvent has changed if I understand this correctly.
from node-red-contrib-light-scheduler.
Merged the pull request #25 that accepts the trigger keyword.
As @goforthanddie says, this will still only trigger the output if anything has changed. Do you want it to also force the output to be sent?
from node-red-contrib-light-scheduler.
For me this makes sense to have some trigger that forces the output to be sent, independent from a change. :) Maybe two triggers make sense? Thanks!
from node-red-contrib-light-scheduler.
I can confirm sending garbage does not generate an output.
It would be great if an output can be initiated with an command like "update" or anything else
from node-red-contrib-light-scheduler.
Since today's update the trigger keyword will force the output msg to be sent. Please let me know if you find any problem with that!
/Niklas
from node-red-contrib-light-scheduler.
Related Issues (20)
- Randomisation not working correctly (+ solution)
- Behaviour on inputs HOT 1
- Always Exporting OFF
- Document behaviour of Sun / dusk Dawn HOT 5
- Override Mode Intermittently Resets HOT 1
- Custom threshold for Dusk/Dawn HOT 3
- Lights turn on before schedule HOT 2
- Filter always off HOT 1
- Randomness not working
- Node-RED crashes in HA
- Add offset to scheduled times HOT 1
- extra iformation
- I don't have grahical editor HOT 1
- suggestion: make output ''minutely'' a chosen time
- Use sunrise/sundown together with random
- weekly schedule with just one definition
- JSON data output ..
- installed node red to have a look at your scheduler
- input via UI
- Add odd/even weeks
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-light-scheduler.