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 Actuator not working

Relay Actuator not working

Scheduled Pinned Locked Moved Troubleshooting
14 Posts 4 Posters 3.5k Views 4 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.
  • chippey5C Offline
    chippey5C Offline
    chippey5
    wrote on last edited by
    #1

    Hello guys!

    After successfully using a DS18B20 with MySensors I wanted to try controlling a relay using the "RelayActuator" example provided in the latest version. After the Relay node successfully connects to the Gateway I use domoticz to control ON/OFF to the Relay node. The relay controls a power switch which controls a light. The relay I use is a 5V 1 Channel OMRON SSR G3MB-202P Solid State Relay. There is a light showing if the relay is OPEN or CLOSED, and of course is noticable when and if the light goes on or off. The relay is powered by 5V+GND and controlled through the Channel port on the Relay which is connected to Digital Pin 3 on my Arduino.

    When I press "Off" in domoticz on the relay node, I see a message in the serial monitor for the node: "Changed to 1" or "Changed to 0". But nothing is happening. It is like if D3 is constantly set to HIGH and does not change?!

    The code I am using:

    /**
     * The MySensors Arduino library handles the wireless radio link and protocol
     * between your home built sensors/actuators and HA controller of choice.
     * The sensors forms a self healing radio network with optional repeaters. Each
     * repeater and gateway builds a routing tables in EEPROM which keeps track of the
     * network topology allowing messages to be routed to nodes.
     *
     * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
     * Copyright (C) 2013-2015 Sensnology AB
     * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
     *
     * Documentation: http://www.mysensors.org
     * Support Forum: http://forum.mysensors.org
     *
     * This program is free software; you can redistribute it and/or
     * modify it under the terms of the GNU General Public License
     * version 2 as published by the Free Software Foundation.
     *
     *******************************
     *
     * REVISION HISTORY
     * Version 1.0 - Henrik Ekblad
     * 
     * DESCRIPTION
     * Example sketch showing how to control physical relays. 
     * This example will remember relay state after power failure.
     * http://www.mysensors.org/build/relay
     */ 
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // Enable repeater functionality for this node
    //#define MY_REPEATER_FEATURE
    
    #include <SPI.h>
    #include <MySensors.h>
    
    #define RELAY_1  3  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
    #define NUMBER_OF_RELAYS 1 // Total number of attached relays
    #define RELAY_ON 1  // GPIO value to write to turn on attached relay
    #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
    
    
    void before() { 
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
        // Then set relay pins in output mode
        pinMode(pin, OUTPUT);   
        // Set relay to last known state (using eeprom storage) 
        digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
      }
    }
    
    void setup() {
      
    }
    
    void presentation()  
    {   
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Relay", "1.0");
    
      for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
        // Register all sensors to gw (they will be created as child devices)
        present(sensor, S_LIGHT);
      }
    }
    
    
    void loop() 
    {
      
    }
    
    void receive(const MyMessage &message) {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.type==S_LIGHT) {
         // Change relay state
         digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
         // Store state in eeprom
         saveState(message.sensor, message.getBool());
         // Write some debug info
         Serial.print("Incoming change for sensor:");
         Serial.print(message.sensor);
         Serial.print(", New status: ");
         Serial.println(message.getBool());
       } 
    }
    

    As stated in the code, the relay channel controller is set to digital pin 3. I can't see what's wrong with the code. When testing the relay directly with a simple loop, the light flashes - relay works:

    #define RELAY1 3
    
    void setup()
    
    {    
      pinMode(RELAY1, OUTPUT);       
    }
    
     void loop()
    {
       digitalWrite(RELAY1,LOW);           // Turns ON Relays 1
    
       delay(2000);                                      // Wait 2 seconds
    
       digitalWrite(RELAY1,HIGH);          // Turns Relay Off
    
       delay(2000); 
    
     }
    

    Help would be greatly appreciated!

    Boots33B TheoLT 2 Replies Last reply
    0
    • chippey5C chippey5

      Hello guys!

      After successfully using a DS18B20 with MySensors I wanted to try controlling a relay using the "RelayActuator" example provided in the latest version. After the Relay node successfully connects to the Gateway I use domoticz to control ON/OFF to the Relay node. The relay controls a power switch which controls a light. The relay I use is a 5V 1 Channel OMRON SSR G3MB-202P Solid State Relay. There is a light showing if the relay is OPEN or CLOSED, and of course is noticable when and if the light goes on or off. The relay is powered by 5V+GND and controlled through the Channel port on the Relay which is connected to Digital Pin 3 on my Arduino.

      When I press "Off" in domoticz on the relay node, I see a message in the serial monitor for the node: "Changed to 1" or "Changed to 0". But nothing is happening. It is like if D3 is constantly set to HIGH and does not change?!

      The code I am using:

      /**
       * The MySensors Arduino library handles the wireless radio link and protocol
       * between your home built sensors/actuators and HA controller of choice.
       * The sensors forms a self healing radio network with optional repeaters. Each
       * repeater and gateway builds a routing tables in EEPROM which keeps track of the
       * network topology allowing messages to be routed to nodes.
       *
       * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
       * Copyright (C) 2013-2015 Sensnology AB
       * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
       *
       * Documentation: http://www.mysensors.org
       * Support Forum: http://forum.mysensors.org
       *
       * This program is free software; you can redistribute it and/or
       * modify it under the terms of the GNU General Public License
       * version 2 as published by the Free Software Foundation.
       *
       *******************************
       *
       * REVISION HISTORY
       * Version 1.0 - Henrik Ekblad
       * 
       * DESCRIPTION
       * Example sketch showing how to control physical relays. 
       * This example will remember relay state after power failure.
       * http://www.mysensors.org/build/relay
       */ 
      
      // Enable debug prints to serial monitor
      #define MY_DEBUG 
      
      // Enable and select radio type attached
      #define MY_RADIO_NRF24
      //#define MY_RADIO_RFM69
      
      // Enable repeater functionality for this node
      //#define MY_REPEATER_FEATURE
      
      #include <SPI.h>
      #include <MySensors.h>
      
      #define RELAY_1  3  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
      #define NUMBER_OF_RELAYS 1 // Total number of attached relays
      #define RELAY_ON 1  // GPIO value to write to turn on attached relay
      #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
      
      
      void before() { 
        for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
          // Then set relay pins in output mode
          pinMode(pin, OUTPUT);   
          // Set relay to last known state (using eeprom storage) 
          digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
        }
      }
      
      void setup() {
        
      }
      
      void presentation()  
      {   
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Relay", "1.0");
      
        for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
          // Register all sensors to gw (they will be created as child devices)
          present(sensor, S_LIGHT);
        }
      }
      
      
      void loop() 
      {
        
      }
      
      void receive(const MyMessage &message) {
        // We only expect one type of message from controller. But we better check anyway.
        if (message.type==S_LIGHT) {
           // Change relay state
           digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
           // Store state in eeprom
           saveState(message.sensor, message.getBool());
           // Write some debug info
           Serial.print("Incoming change for sensor:");
           Serial.print(message.sensor);
           Serial.print(", New status: ");
           Serial.println(message.getBool());
         } 
      }
      

      As stated in the code, the relay channel controller is set to digital pin 3. I can't see what's wrong with the code. When testing the relay directly with a simple loop, the light flashes - relay works:

      #define RELAY1 3
      
      void setup()
      
      {    
        pinMode(RELAY1, OUTPUT);       
      }
      
       void loop()
      {
         digitalWrite(RELAY1,LOW);           // Turns ON Relays 1
      
         delay(2000);                                      // Wait 2 seconds
      
         digitalWrite(RELAY1,HIGH);          // Turns Relay Off
      
         delay(2000); 
      
       }
      

      Help would be greatly appreciated!

      Boots33B Offline
      Boots33B Offline
      Boots33
      Hero Member
      wrote on last edited by
      #2

      @chippey5 The code looks OK to me and the fact that you are seeing the change via the serial monitor would seem to indicate the code is working.

      Maybe try disconnecting the relay from pin 3 and connect your multi meter there instead to see if the change is happening.

      chippey5C 1 Reply Last reply
      0
      • Boots33B Boots33

        @chippey5 The code looks OK to me and the fact that you are seeing the change via the serial monitor would seem to indicate the code is working.

        Maybe try disconnecting the relay from pin 3 and connect your multi meter there instead to see if the change is happening.

        chippey5C Offline
        chippey5C Offline
        chippey5
        wrote on last edited by
        #3

        @Boots33 Thanks for your reply!

        I did, nothing happened. I also took out a new relay to see if there was a hardware error but no difference. It just seems that the pin doesn't go to LOW or HIGH when it is told to do. I am using an Aruino mini pro 3v3v 8Mhz Atmega328 (with a dc-dc booster to 5v for the relay to work).

        Boots33B 1 Reply Last reply
        0
        • chippey5C chippey5

          Hello guys!

          After successfully using a DS18B20 with MySensors I wanted to try controlling a relay using the "RelayActuator" example provided in the latest version. After the Relay node successfully connects to the Gateway I use domoticz to control ON/OFF to the Relay node. The relay controls a power switch which controls a light. The relay I use is a 5V 1 Channel OMRON SSR G3MB-202P Solid State Relay. There is a light showing if the relay is OPEN or CLOSED, and of course is noticable when and if the light goes on or off. The relay is powered by 5V+GND and controlled through the Channel port on the Relay which is connected to Digital Pin 3 on my Arduino.

          When I press "Off" in domoticz on the relay node, I see a message in the serial monitor for the node: "Changed to 1" or "Changed to 0". But nothing is happening. It is like if D3 is constantly set to HIGH and does not change?!

          The code I am using:

          /**
           * The MySensors Arduino library handles the wireless radio link and protocol
           * between your home built sensors/actuators and HA controller of choice.
           * The sensors forms a self healing radio network with optional repeaters. Each
           * repeater and gateway builds a routing tables in EEPROM which keeps track of the
           * network topology allowing messages to be routed to nodes.
           *
           * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
           * Copyright (C) 2013-2015 Sensnology AB
           * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
           *
           * Documentation: http://www.mysensors.org
           * Support Forum: http://forum.mysensors.org
           *
           * This program is free software; you can redistribute it and/or
           * modify it under the terms of the GNU General Public License
           * version 2 as published by the Free Software Foundation.
           *
           *******************************
           *
           * REVISION HISTORY
           * Version 1.0 - Henrik Ekblad
           * 
           * DESCRIPTION
           * Example sketch showing how to control physical relays. 
           * This example will remember relay state after power failure.
           * http://www.mysensors.org/build/relay
           */ 
          
          // Enable debug prints to serial monitor
          #define MY_DEBUG 
          
          // Enable and select radio type attached
          #define MY_RADIO_NRF24
          //#define MY_RADIO_RFM69
          
          // Enable repeater functionality for this node
          //#define MY_REPEATER_FEATURE
          
          #include <SPI.h>
          #include <MySensors.h>
          
          #define RELAY_1  3  // Arduino Digital I/O pin number for first relay (second on pin+1 etc)
          #define NUMBER_OF_RELAYS 1 // Total number of attached relays
          #define RELAY_ON 1  // GPIO value to write to turn on attached relay
          #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
          
          
          void before() { 
            for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
              // Then set relay pins in output mode
              pinMode(pin, OUTPUT);   
              // Set relay to last known state (using eeprom storage) 
              digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
            }
          }
          
          void setup() {
            
          }
          
          void presentation()  
          {   
            // Send the sketch version information to the gateway and Controller
            sendSketchInfo("Relay", "1.0");
          
            for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
              // Register all sensors to gw (they will be created as child devices)
              present(sensor, S_LIGHT);
            }
          }
          
          
          void loop() 
          {
            
          }
          
          void receive(const MyMessage &message) {
            // We only expect one type of message from controller. But we better check anyway.
            if (message.type==S_LIGHT) {
               // Change relay state
               digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
               // Store state in eeprom
               saveState(message.sensor, message.getBool());
               // Write some debug info
               Serial.print("Incoming change for sensor:");
               Serial.print(message.sensor);
               Serial.print(", New status: ");
               Serial.println(message.getBool());
             } 
          }
          

          As stated in the code, the relay channel controller is set to digital pin 3. I can't see what's wrong with the code. When testing the relay directly with a simple loop, the light flashes - relay works:

          #define RELAY1 3
          
          void setup()
          
          {    
            pinMode(RELAY1, OUTPUT);       
          }
          
           void loop()
          {
             digitalWrite(RELAY1,LOW);           // Turns ON Relays 1
          
             delay(2000);                                      // Wait 2 seconds
          
             digitalWrite(RELAY1,HIGH);          // Turns Relay Off
          
             delay(2000); 
          
           }
          

          Help would be greatly appreciated!

          TheoLT Offline
          TheoLT Offline
          TheoL
          Contest Winner
          wrote on last edited by
          #4

          @chippey5 @chippey5 I prefer to use #define's for the child ID. It eliminates possible bugs. Also uses such complicated code (meaning for statements for controlling relays makes the code harder to read.

          could you change this:

              // Change relay state
               digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
          

          to this:

              // Change relay state
               digitalWrite(1, message.getBool()?RELAY_ON:RELAY_OFF);
          

          doubt if it helps. But you just give it a try.

          1 Reply Last reply
          0
          • chippey5C chippey5

            @Boots33 Thanks for your reply!

            I did, nothing happened. I also took out a new relay to see if there was a hardware error but no difference. It just seems that the pin doesn't go to LOW or HIGH when it is told to do. I am using an Aruino mini pro 3v3v 8Mhz Atmega328 (with a dc-dc booster to 5v for the relay to work).

            Boots33B Offline
            Boots33B Offline
            Boots33
            Hero Member
            wrote on last edited by Boots33
            #5

            @chippey5 can you show us the output from the serial monitor That may help to see what is going on. Perhaps try another digital pin as well for the relay. TheoL has a good idea try and simplify the sketch and see if it works, although you are using the standard relay sketch from what i can see so it should work.

            Try this

            // Enable debug prints to serial monitor
            #define MY_DEBUG 
            
            // Enable and select radio type attached
            #define MY_RADIO_NRF24
            //#define MY_RADIO_RFM69
            
            // Enable repeater functionality for this node
            //#define MY_REPEATER_FEATURE
            
            #include <SPI.h>
            #include <MySensors.h>
            
            #define RELAY_1  3  // Arduino Digital I/O pin number for t relay 
            #define CHILD_ID_RELAY 1 
            #define RELAY_ON 1  // GPIO value to write to turn on attached relay
            #define RELAY_OFF 0 // GPIO value to write to turn off attached relay
            
            
            
            
            void setup() {
            
              pinMode(RELAY_1, OUTPUT);
              
            }
            
            void presentation()  
            {   
              // Send the sketch version information to the gateway and Controller
              sendSketchInfo("Relay Test", "1.0");
            
             
                // Register sensor to gw ( will be created as child devices)
                present(CHILD_ID_RELAY, S_LIGHT);
             
            }
            
            
            void loop() 
            {
              
            }
            
            void receive(const MyMessage &message) {
              // We only expect one type of message from controller. But we better check anyway.
              if (message.type==V_LIGHT) {
                 // Change relay state
                 digitalWrite(RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
                
                 // Write some debug info
                 Serial.print("Incoming change for sensor:");
                 Serial.print(message.sensor);
                 Serial.print(", New status: ");
                 Serial.println(message.getBool());
               } 
            }
            
            
            1 Reply Last reply
            0
            • chippey5C Offline
              chippey5C Offline
              chippey5
              wrote on last edited by
              #6

              Alright so I tried the solutions suggested but no luck, now the gateway seems to be rejecting it instead with the RelayActuator sketch:

              Starting sensor (RNNNA-, 2.0.0)
              TSM:INIT
              TSM:RADIO:OK
              TSP:ASSIGNID:OK (ID=1)
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:CHKUPL:FAIL (hops=255)
              !TSM:UPL:FAIL
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:CHKUPL:FAIL (hops=255)
              !TSM:UPL:FAIL
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:CHKUPL:FAIL (hops=255)
              !TSM:UPL:FAIL
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:CHKUPL:FAIL (hops=255)
              !TSM:UPL:FAIL
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:CHKUPL:FAIL (hops=255)
              !TSM:UPL:FAIL
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
              TSP:MSG:PONG RECV (hops=1)
              TSP:CHKUPL:OK
              TSM:UPL:OK
              TSM:READY
              !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=fail:0100
              !TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=fail:2.0.0
              !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=2,st=fail:0
              !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=5,sg=0,ft=3,st=fail:Relay
              !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=4,st=fail:1.0
              !TSP:MSG:SEND 1-1-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,ft=5,st=fail:
              Request registration...
              !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=6,st=fail:2
              !TSM:UPL FAIL, SNP
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              !TSP:SEND:TNR
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              !TSP:SEND:TNR
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              !TSP:SEND:TNR
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              Init complete, id=1, parent=255, distance=255, registration=1
              !TSM:FPAR:FAIL
              !TSM:FAILURE
              TSM:PDT
              TSM:INIT
              TSM:RADIO:OK
              TSP:ASSIGNID:OK (ID=1)
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              !TSM:FPAR:FAIL
              !TSM:FAILURE
              TSM:PDT
              

              The wiring is ok, I tried to flash the DS18B20 sketch which worked:

              Starting sensor (RNNNA-, 2.0.0)
              TSM:INIT
              TSM:RADIO:OK
              TSP:ASSIGNID:OK (ID=1)
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              !TSM:FPAR:FAIL
              !TSM:FAILURE
              TSM:PDT
              TSM:INIT
              TSM:RADIO:OK
              TSP:ASSIGNID:OK (ID=1)
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSM:FPAR
              TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
              TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
              TSP:MSG:FPAR RES (ID=0, dist=0)
              TSP:MSG:PAR OK (ID=0, dist=1)
              TSM:FPAR:OK
              TSM:ID
              TSM:CHKID:OK (ID=1)
              TSM:UPL
              TSP:PING:SEND (dest=0)
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
              TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
              TSP:MSG:PONG RECV (hops=1)
              TSP:CHKUPL:OK
              TSM:UPL:OK
              TSM:READY
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
              TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
              TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
              TSP:MSG:READ 0-0-1 s=255,c=3,t=6,pt=0,l=1,sg=0:M
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=ok:Temperature Sensor
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.1
              Request registration...
              TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
              TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
              Node registration=1
              Init complete, id=1, parent=0, distance=1, registration=1
              

              I am out of ideas now

              TheoLT 1 Reply Last reply
              0
              • chippey5C chippey5

                Alright so I tried the solutions suggested but no luck, now the gateway seems to be rejecting it instead with the RelayActuator sketch:

                Starting sensor (RNNNA-, 2.0.0)
                TSM:INIT
                TSM:RADIO:OK
                TSP:ASSIGNID:OK (ID=1)
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:CHKUPL:FAIL (hops=255)
                !TSM:UPL:FAIL
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:CHKUPL:FAIL (hops=255)
                !TSM:UPL:FAIL
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:CHKUPL:FAIL (hops=255)
                !TSM:UPL:FAIL
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:CHKUPL:FAIL (hops=255)
                !TSM:UPL:FAIL
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:CHKUPL:FAIL (hops=255)
                !TSM:UPL:FAIL
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
                TSP:MSG:PONG RECV (hops=1)
                TSP:CHKUPL:OK
                TSM:UPL:OK
                TSM:READY
                !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=fail:0100
                !TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=1,st=fail:2.0.0
                !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=2,st=fail:0
                !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=5,sg=0,ft=3,st=fail:Relay
                !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=4,st=fail:1.0
                !TSP:MSG:SEND 1-1-0-0 s=1,c=0,t=3,pt=0,l=0,sg=0,ft=5,st=fail:
                Request registration...
                !TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=6,st=fail:2
                !TSM:UPL FAIL, SNP
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                !TSP:SEND:TNR
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                !TSP:SEND:TNR
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                !TSP:SEND:TNR
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                Init complete, id=1, parent=255, distance=255, registration=1
                !TSM:FPAR:FAIL
                !TSM:FAILURE
                TSM:PDT
                TSM:INIT
                TSM:RADIO:OK
                TSP:ASSIGNID:OK (ID=1)
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                !TSM:FPAR:FAIL
                !TSM:FAILURE
                TSM:PDT
                

                The wiring is ok, I tried to flash the DS18B20 sketch which worked:

                Starting sensor (RNNNA-, 2.0.0)
                TSM:INIT
                TSM:RADIO:OK
                TSP:ASSIGNID:OK (ID=1)
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                !TSM:FPAR:FAIL
                !TSM:FAILURE
                TSM:PDT
                TSM:INIT
                TSM:RADIO:OK
                TSP:ASSIGNID:OK (ID=1)
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSM:FPAR
                TSP:MSG:SEND 1-1-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
                TSP:MSG:READ 0-0-1 s=255,c=3,t=8,pt=1,l=1,sg=0:0
                TSP:MSG:FPAR RES (ID=0, dist=0)
                TSP:MSG:PAR OK (ID=0, dist=1)
                TSM:FPAR:OK
                TSM:ID
                TSM:CHKID:OK (ID=1)
                TSM:UPL
                TSP:PING:SEND (dest=0)
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=ok:1
                TSP:MSG:READ 0-0-1 s=255,c=3,t=25,pt=1,l=1,sg=0:1
                TSP:MSG:PONG RECV (hops=1)
                TSP:CHKUPL:OK
                TSM:UPL:OK
                TSM:READY
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
                TSP:MSG:SEND 1-1-0-0 s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=ok:0
                TSP:MSG:READ 0-0-1 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
                TSP:MSG:READ 0-0-1 s=255,c=3,t=6,pt=0,l=1,sg=0:M
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=11,pt=0,l=18,sg=0,ft=0,st=ok:Temperature Sensor
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.1
                Request registration...
                TSP:MSG:SEND 1-1-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
                TSP:MSG:READ 0-0-1 s=255,c=3,t=27,pt=1,l=1,sg=0:1
                Node registration=1
                Init complete, id=1, parent=0, distance=1, registration=1
                

                I am out of ideas now

                TheoLT Offline
                TheoLT Offline
                TheoL
                Contest Winner
                wrote on last edited by
                #7

                @chippey5 Can you post your circuit please?

                chippey5C 1 Reply Last reply
                1
                • TheoLT TheoL

                  @chippey5 Can you post your circuit please?

                  chippey5C Offline
                  chippey5C Offline
                  chippey5
                  wrote on last edited by
                  #8
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • chippey5C Offline
                    chippey5C Offline
                    chippey5
                    wrote on last edited by
                    #9

                    @TheoL

                    So basically all the wiring is correct, the only thing that could cause problems is the actual VCC - I have split this one to power both 5V step-up regulator->Relay and the radio. I just tried the sketch today and now it is registered, but relay not responding on commands. I think I will go with a Nano instead on this one :stuck_out_tongue_winking_eye:

                    1 Reply Last reply
                    0
                    • chippey5C Offline
                      chippey5C Offline
                      chippey5
                      wrote on last edited by
                      #10

                      Okay so now I tried to power the relay with an external power source (Arduino Uno 5V port) but still nothing(?). I will check and try tomorrow again, because a basic HIGH/LOW loop for D3 didn't make the relay respond - which it did yesterday

                      TheoLT 1 Reply Last reply
                      0
                      • chippey5C chippey5

                        Okay so now I tried to power the relay with an external power source (Arduino Uno 5V port) but still nothing(?). I will check and try tomorrow again, because a basic HIGH/LOW loop for D3 didn't make the relay respond - which it did yesterday

                        TheoLT Offline
                        TheoLT Offline
                        TheoL
                        Contest Winner
                        wrote on last edited by
                        #11

                        @chippey5 Not sure what you mean with an external power source (Arduino Uno 5V). If you power everything from the 5V or 3.3V that are on the arduino board, then you're not powering it external. In that case you're powering everything directly from the Uno. I've experienced a lot of troubles with this way. The power regulator on the Arduino Uno just isn't powerful enough to provide a lot of current.

                        It's best to power the arduino from an external 5v source (like an old phone charger) and power the relay also from that external adapter. The same goes for the radio but you'll need a power regulator.

                        chippey5C 1 Reply Last reply
                        0
                        • TheoLT TheoL

                          @chippey5 Not sure what you mean with an external power source (Arduino Uno 5V). If you power everything from the 5V or 3.3V that are on the arduino board, then you're not powering it external. In that case you're powering everything directly from the Uno. I've experienced a lot of troubles with this way. The power regulator on the Arduino Uno just isn't powerful enough to provide a lot of current.

                          It's best to power the arduino from an external 5v source (like an old phone charger) and power the relay also from that external adapter. The same goes for the radio but you'll need a power regulator.

                          chippey5C Offline
                          chippey5C Offline
                          chippey5
                          wrote on last edited by
                          #12

                          @TheoL Sorry for not being clear, the serialgateway (Arduino uno) is powered and connected to A raspberry Pi 3 (Which is powered by a 2.5A wall adapter). I used this arduinos 5V pin to test the RelayActuator but it still seems like the Mini Pro 3.3v is not changing the state of the D3 (for relay channel). I will check and see current and voltage from arduinos 5V and report back

                          TheoLT 1 Reply Last reply
                          0
                          • chippey5C chippey5

                            @TheoL Sorry for not being clear, the serialgateway (Arduino uno) is powered and connected to A raspberry Pi 3 (Which is powered by a 2.5A wall adapter). I used this arduinos 5V pin to test the RelayActuator but it still seems like the Mini Pro 3.3v is not changing the state of the D3 (for relay channel). I will check and see current and voltage from arduinos 5V and report back

                            TheoLT Offline
                            TheoLT Offline
                            TheoL
                            Contest Winner
                            wrote on last edited by
                            #13

                            @chippey5 Could you do one test for me? I want to know if your proMini is capable for handling your relay.

                            1. Disconnect everything from the ProMini.
                            2. Now power it from the FDTI or an external adapter.
                            3. Connect the ground of the relay to the ground of your arduino.
                            4. Connect the VCC of the relay to the VCC of your Arduino.
                            5. Connect the data pin of the relay to the gnd of the Arduino as well.
                            6. Now instead of connecting the data line of the Relay to the gnd of the Arduino, you have to connect the data line of the relay to the vcc out of the Arduino.

                            Depending on your relay, step 5 or 6 should activate the relay. If not then:

                            • either your relay is broken
                            • or your relay needs more power than your Arduino can provide.

                            I think this way is the easiest to see if the Arduino can handle the relay and this is (imo) the fastest way to test this. Problems in arduino projects can get really hard to solve. Because there are so many aspects in what can go wrong.

                            Love to hear your test results.

                            1 Reply Last reply
                            1
                            • W Offline
                              W Offline
                              Warren
                              wrote on last edited by
                              #14

                              My sensors for Temperature, Humidity, Motion, Light level, and Door sensors were all working well, however, my dimmers, relays and switches were intermittent at best.

                              I tried all the suggestions here and had no improvement.

                              I monitored one of my node that had a relay and did see any on or off commands coming to the relay.

                              PROBLEM SOLVED

                              I thought the NRF24L01 on the ethernet gateway might not be transmitting reliably, so i changed it out.

                              Every switch, dimmer and relay work perfectly !

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


                              17

                              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