Giter VIP home page Giter VIP logo

Comments (8)

davidevertuani avatar davidevertuani commented on August 16, 2024

+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.

goforthanddie avatar goforthanddie commented on August 16, 2024

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.

davidevertuani avatar davidevertuani commented on August 16, 2024

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.

goforthanddie avatar goforthanddie commented on August 16, 2024

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.

niklaswall avatar niklaswall commented on August 16, 2024

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.

goforthanddie avatar goforthanddie commented on August 16, 2024

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.

tsprivate avatar tsprivate commented on August 16, 2024

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.

niklaswall avatar niklaswall commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.