Announcement

Collapse
No announcement yet.

Condition check on other devices

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    The Complete node, per the help file, is used to start a different flow after a message is handled: "If a node tells the runtime when it has finished handling a message, this node can be used to trigger a second flow." Since this is starting a second flow and JavaScript is asynchronous by nature, I would expect the same of the Complete node. I do not believe the intention was to use this for any synchronous use.

    I would put your Save function after the HomeSeer node and pass the original payload through if you are not starting a second flow but are saving the data to context.

    Or wait for the updates from HomeSeer. Maybe they even act on my request to request a list of devices and associated data from a node?

    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    Comment


      #32
      Originally posted by ksum View Post
      The Complete node, per the help file, is used to start a different flow after a message is handled: "If a node tells the runtime when it has finished handling a message, this node can be used to trigger a second flow." Since this is starting a second flow and JavaScript is asynchronous by nature, I would expect the same of the Complete node. I do not believe the intention was to use this for any synchronous use.

      I would put your Save function after the HomeSeer node and pass the original payload through if you are not starting a second flow but are saving the data to context.

      Or wait for the updates from HomeSeer. Maybe they even act on my request to request a list of devices and associated data from a node?
      In the current version of Node Red, all cases where message paths split are asynchronous - the only way to ensure synchronous (ordered) processing is to put the query into the message flow without any branches. There's a big write up of it on their blog.

      In effect the Complete node does exactly what you say, just without the clutter of drawing the line on the flow but instead ticking the source node in the Complete properties.

      Comment


        #33
        In version 1.0.4 I have added "sync"and "report" options as discussed in the github thread.
        Please test and let me know.

        Comment

        Working...
        X