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. Development
  3. Relay with switch

Relay with switch

Scheduled Pinned Locked Moved Development
relayswitch
5 Posts 3 Posters 3.1k Views 3 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.
  • O Offline
    O Offline
    oded00
    wrote on last edited by
    #1

    Hi

    Is it possible to connect simple relay to regular on/off wall switch?

    Oded

    1 Reply Last reply
    0
    • rvendrameR Offline
      rvendrameR Offline
      rvendrame
      Hero Member
      wrote on last edited by
      #2

      You have to change some wiring if you have only a single wire availble in the switch box.
      Have you checked the Relay project?

      Home Assistant / Vera Plus UI7
      ESP8266 GW + mySensors 2.3.2
      Alexa / Google Home

      1 Reply Last reply
      0
      • O Offline
        O Offline
        oded00
        wrote on last edited by
        #3

        In the relay project the button is push button.
        Can I use on/off switch with the same sketch?

        1 Reply Last reply
        0
        • rvendrameR Offline
          rvendrameR Offline
          rvendrame
          Hero Member
          wrote on last edited by
          #4

          I think you just need to change this line:

          if (value != oldValue && value==0) {
          

          to

          if (value != oldValue) {
          

          And wire the original switch , in order to short GND and pin 3. The original wires now go to the relay (and not more to the switch).

          You need to somehow power arduino + radio + relay , I use cheap phone chargers but the risk of fire is too high. We are testing other alternatives here.

          And please be careful when working with AC Mains! It is letal! ;-)

          Home Assistant / Vera Plus UI7
          ESP8266 GW + mySensors 2.3.2
          Alexa / Google Home

          1 Reply Last reply
          0
          • D Offline
            D Offline
            deennoo
            wrote on last edited by
            #5

            Thanks for this input, please can you share which kind of relay i have to use ?

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


            12

            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