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. Troubleshooting
  3. Relay with finder and asc 712

Relay with finder and asc 712

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 2 Posters 2.2k 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.
  • S Offline
    S Offline
    sindrome73
    wrote on last edited by
    #1

    Hello and good morning.
    I discovered by accident Mysensors and I immediately buff (Ancra are at an early stage). And I wanted to make home automation for home, but while maintaining current systems.

    At the time at home, in Italy, I have this situation. A relay that receives a pulse and turns on and off the light ..... Carry scheme:

    0_1488977392892_idea_1.jpg

    I would like to create something like that, in order to keep the system in case of failure Mysensors, but integrating home automation.

    to the scheme:

    0_1488977420383_idea_2.jpg

    As we see, idea is to use a ASC712 to see if there current flow and update the controller (DOMOTICZ)

    How do I communicate the change of state in Domoticz ??

    Can anyone help me ??

    sundberg84S 1 Reply Last reply
    0
    • S sindrome73

      Hello and good morning.
      I discovered by accident Mysensors and I immediately buff (Ancra are at an early stage). And I wanted to make home automation for home, but while maintaining current systems.

      At the time at home, in Italy, I have this situation. A relay that receives a pulse and turns on and off the light ..... Carry scheme:

      0_1488977392892_idea_1.jpg

      I would like to create something like that, in order to keep the system in case of failure Mysensors, but integrating home automation.

      to the scheme:

      0_1488977420383_idea_2.jpg

      As we see, idea is to use a ASC712 to see if there current flow and update the controller (DOMOTICZ)

      How do I communicate the change of state in Domoticz ??

      Can anyone help me ??

      sundberg84S Offline
      sundberg84S Offline
      sundberg84
      Hardware Contributor
      wrote on last edited by sundberg84
      #2

      @sindrome73 - welcome!
      Try the getting started https://www.mysensors.org/about.

      Exactly how the ASC712 works, I dont know but to answer your question "How do I communicate the change of state in Domoticz ??"
      You need just a regular switch 1/0 for MySensors and use the binary sketch (https://www.mysensors.org/build/binary) or some other sketch sending On/off (Relay, Motion...). MySensors will send this to your gateway which your controller (Domoticz) listen to and updates the value.

      Controller: Proxmox VM - Home Assistant
      MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
      MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
      RFLink GW - Arduino Mega + RFLink Shield, 433mhz

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sindrome73
        wrote on last edited by
        #3

        Hello thanks for the tip, but I've already tried qusto and creates unexpected result.

        I left these sketches: https://www.mysensors.org/build/relay

        If I understand, the logic is this: You press the button sull'arduino, the new state is sent with this line, the controller which updates their status.

        send (msg.set (were? false: true), true); // Send new state and request ack back

        Next comes this part sketch

        void receive (const MyMessage & message) {
          // We only expect one type of message from the controller. But we better check anyway.
          if (message.isAck ()) {
             Serial.println ( "This is an ack from gateway");
          }

        if (message.type == V_LIGHT) {
             // Change state relay
             message.getBool state = ();
             digitalWrite (RELAY_PIN, are you? RELAY_ON: RELAY_OFF);
             // Store been in eeprom
             saveState (CHILD_ID, state);

        // Write some debugging info
             Serial.print ( "Incoming change for sensor:");
             Serial.print (message.sensor);
             Serial.print ( "New status");
             Serial.println (message.getBool ());
           }

        And the output changes state.

        But if I do, we press an external switch, and change the status, and update the controller with this: send (msg.set (were? False: true), true);

        It falls into a loop ???

        sundberg84S 1 Reply Last reply
        0
        • S sindrome73

          Hello thanks for the tip, but I've already tried qusto and creates unexpected result.

          I left these sketches: https://www.mysensors.org/build/relay

          If I understand, the logic is this: You press the button sull'arduino, the new state is sent with this line, the controller which updates their status.

          send (msg.set (were? false: true), true); // Send new state and request ack back

          Next comes this part sketch

          void receive (const MyMessage & message) {
            // We only expect one type of message from the controller. But we better check anyway.
            if (message.isAck ()) {
               Serial.println ( "This is an ack from gateway");
            }

          if (message.type == V_LIGHT) {
               // Change state relay
               message.getBool state = ();
               digitalWrite (RELAY_PIN, are you? RELAY_ON: RELAY_OFF);
               // Store been in eeprom
               saveState (CHILD_ID, state);

          // Write some debugging info
               Serial.print ( "Incoming change for sensor:");
               Serial.print (message.sensor);
               Serial.print ( "New status");
               Serial.println (message.getBool ());
             }

          And the output changes state.

          But if I do, we press an external switch, and change the status, and update the controller with this: send (msg.set (were? False: true), true);

          It falls into a loop ???

          sundberg84S Offline
          sundberg84S Offline
          sundberg84
          Hardware Contributor
          wrote on last edited by
          #4

          @sindrome73 - sorry i dont understand. What kind of error message do you get? Debug?
          Do you want to be able to send a command FROM domoticz to the node? I didnt answer that above but the other way around.

          Controller: Proxmox VM - Home Assistant
          MySensors GW: Arduino Uno - W5100 Ethernet, Gw Shield Nrf24l01+ 2,4Ghz
          MySensors GW: Arduino Uno - Gw Shield RFM69, 433mhz
          RFLink GW - Arduino Mega + RFLink Shield, 433mhz

          1 Reply Last reply
          0
          • S Offline
            S Offline
            sindrome73
            wrote on last edited by
            #5

            I beg your pardon, but my English is very bad.

            In the evening load my sketch, so it is more clear ......

            Thanks for your patience for now ......

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


            14

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            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