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. radio check for BinarySwitch nodes

radio check for BinarySwitch nodes

Scheduled Pinned Locked Moved Development
1 Posts 1 Posters 595 Views 1 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

    hi everyone

    i have lighting switch nodes (binary switch sketch) connected to 220v ac contactor in order to monitor the operation of some electrical devices - timed heaters, security alarm buzzer (backup for the security company), and detecting power failure.

    because these nodes dont always send data - i wanted to have the nodes send their status even when it doesnt change for about every hour or so.
    i have accomplished it in my power failure node using this addition (the else part) to the sketch:

    if (value != oldValue) {
        // Send in the new value
        gw.send(msg.set(value == HIGH ? 0  : 1));
        oldValue = value;
      }
        else if ((millis() - premil) >= 300000) {
          gw.send(msg.set(value == LOW ? 0  : 1));
          premil = millis();
        }
    

    but when i tried this on other node it didnt worked in any syntax i tried:
    value == LOW ? 0 : 1
    value == LOW ? 1 : 0
    value == HIGH ? 1 :0
    value == HIGH ? 0 : 1

    and after an hour of trying i realized the case:

    • this method can only make the node send routinous data of "on" state only - even if it reads HIGH on the digital pin
    • the power failure node always send "on" beacuse it's normally feels electricity - while the other node monitors the turning on of the appliance and as mentioned - it cannot send "off" routinously.

    for the clarification of my request: i want a binary switch to be able to send "off" messages from time to time so i'll know it didnt lost connection from the GW.*

    example: (translation - the lower one is ON and upper is OFF)

    0_1478674160980_ללא שם.png

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    15

    Online

    12.1k

    Users

    11.2k

    Topics

    113.4k

    Posts


    Copyright 2025 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