• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Node-red : set/reset multiple output

    Official EVOK API
    2
    3
    2529
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      zeus last edited by

      Hi all
      I need to set multiple outputs using node red. By using websocket I am able to set single output (relay) by creating a payload like this "msg.payload = {"cmd":"set","dev":"relay","circuit":"1","value":"1"};" or like this "msg.payload = {"dev":"relay", "circuit":"", "value":"1"};"
      What I am missing is the correct syntax to use when I need to set for instance 2 relays at the same time. I try to fill the payload with two commands (the 1st with circuit="1" and the second with circuit="2") with the Json standard syntax but it doesn't work. I also try to send two messages in sequence to set on the 1st and the 2nd relay. What happen in this case is that 1st relay goes on but when the 2nd realay switch on the 1st one is switched off.
      After a quick search on the forum I saw that there is an implementation of the function relay_set_all(self, values) but I can't find any documentation on how to use it.
      Can someone give me a suggestion on this topic?
      Thank you

      1 Reply Last reply Reply Quote 0
      • Z
        zeus last edited by

        Update on my previous post.
        I was able to set two relays "almost" at the same time by adding a delay of 100ms among the two commands. This is not a good way to reach the goal but it can work until someone can help me with the correct instruction to set two relays at the same time

        T 1 Reply Last reply Reply Quote 0
        • T
          tomas_hora administrators @zeus last edited by

          @zeus I will think about it how to make it possible, Thanks for the tip: https://github.com/UniPiTechnology/evok/issues/11

          1 Reply Last reply Reply Quote 0
          • First post
            Last post