Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. reverse binary switch message

reverse binary switch message

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 1.3k Views 2 Watching
  • 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.
  • A Offline
    A Offline
    abrasha
    wrote on last edited by
    #1

    i use binary switch sketch to monitor working electrical appliances through 220v contactor with closes the circuit of the switch.
    unfortunatley, in domoticz, when the circuit is opened (no contact between pin3 and GND) it shows ON which is the opposite of my intention.
    i tried messing with the code and writing low to the pin instead of high but it didnt work.
    another solution is to use Normally Closed contactor so it will show default off and when the contactor will turn on, the arduino circuit will be opened and the domoticz will show this as on, but, i didnt find any 1phase contactor with NC terminal, only 3phase which are too much wide for my box.

    is there any way to reverse the message from the node?
    maybe something with this line:

    gw.send(msg1.set(value == HIGH ? 1 : 0));
    

    maybe changing the 1 with the 0 ?

    martinhjelmareM 1 Reply Last reply
    0
    • A abrasha

      i use binary switch sketch to monitor working electrical appliances through 220v contactor with closes the circuit of the switch.
      unfortunatley, in domoticz, when the circuit is opened (no contact between pin3 and GND) it shows ON which is the opposite of my intention.
      i tried messing with the code and writing low to the pin instead of high but it didnt work.
      another solution is to use Normally Closed contactor so it will show default off and when the contactor will turn on, the arduino circuit will be opened and the domoticz will show this as on, but, i didnt find any 1phase contactor with NC terminal, only 3phase which are too much wide for my box.

      is there any way to reverse the message from the node?
      maybe something with this line:

      gw.send(msg1.set(value == HIGH ? 1 : 0));
      

      maybe changing the 1 with the 0 ?

      martinhjelmareM Offline
      martinhjelmareM Offline
      martinhjelmare
      Plugin Developer
      wrote on last edited by
      #2

      @abrasha

      Hi!

      Yes, you're correct.

      A 1 Reply Last reply
      0
      • martinhjelmareM martinhjelmare

        @abrasha

        Hi!

        Yes, you're correct.

        A Offline
        A Offline
        abrasha
        wrote on last edited by
        #3

        @martinhjelmare said:

        @abrasha

        Hi!

        Yes, you're correct.

        Thanks, but for which part do you mean I'm correct? The problem or changing the 1 and 0?

        martinhjelmareM 1 Reply Last reply
        0
        • A abrasha

          @martinhjelmare said:

          @abrasha

          Hi!

          Yes, you're correct.

          Thanks, but for which part do you mean I'm correct? The problem or changing the 1 and 0?

          martinhjelmareM Offline
          martinhjelmareM Offline
          martinhjelmare
          Plugin Developer
          wrote on last edited by
          #4

          @abrasha

          You can reverse the message by flipping 1 and 0.

          A 1 Reply Last reply
          0
          • martinhjelmareM martinhjelmare

            @abrasha

            You can reverse the message by flipping 1 and 0.

            A Offline
            A Offline
            abrasha
            wrote on last edited by
            #5

            @martinhjelmare
            Great! I'll try it tomorrow.
            Thanks a lot

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            11

            Online

            11.7k

            Users

            11.2k

            Topics

            113.0k

            Posts


            Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular