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
M

Mario64

@Mario64
About
Posts
5
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • [SOLVED] I use serial GW 2.1.1 and my sensor node won't connect
    M Mario64

    @zboblamont
    So, gateway works as repeater by default? I also expected that on reset, whole initial sequence should appear, not just 0;255;3;0;2;2.1.1.

    Troubleshooting

  • [SOLVED] I use serial GW 2.1.1 and my sensor node won't connect
    M Mario64

    Thanks. I will try with an older version. If you would share known "mix" of software working together, it would be good to start with. I mean" Arduino IDE/MySensors/Domoticz. ?

    Troubleshooting

  • [SOLVED] I use serial GW 2.1.1 and my sensor node won't connect
    M Mario64

    @mario64
    one update information (Gateway)
    when I press reset button on Arduino Nano board, I get one additional line on serial monitor:
    0;255;3;0;2;2.1.1

    and on domoticz HW setup screen, I get one children of node with name: S_ARDUINO_REPEATER_NODE. see screenshot:
    ![ ]https://drive.google.com/file/d/1Pjqy7XKA5V9nZYmP90V8hR-pfDy26hc8/view?usp=sharing

    Troubleshooting

  • [SOLVED] I use serial GW 2.1.1 and my sensor node won't connect
    M Mario64

    Hi @bjacobse,

    thank you for answer. I'm back to my project after e few days.
    Actually, the "Accept new Hardware Devices" switch is on. I also used the "Alow for 5 minutes" button. Let me share more details:

    • pls find log of Domoticz:
     2018-01-22 09:55:34.871 MySensors: retrying in 30 seconds...
    2018-01-22 09:56:00.874 MySensors: Serial Worker stopped...
    2018-01-22 09:56:11.130 New sensors allowed for 5 minutes...
    2018-01-22 09:56:43.077 MySensors: Using serial port: /dev/ttyUSB0
    2018-01-22 10:02:38.123 MySensors: Serial Worker stopped...
    2018-01-22 10:02:39.134 MySensors: Using serial port: /dev/ttyUSB0
    2018-01-22 10:03:38.156 New sensors allowed for 5 minutes...
    2018-01-22 10:04:00.048 Error: Gwx hardware (2) nothing received for more than 1 Minute!....
    2018-01-22 10:04:01.049 Error: Restarting: Gwx
    2018-01-22 10:04:01.146 MySensors: Serial Worker stopped...
    2018-01-22 10:04:02.157 MySensors: Using serial port: /dev/ttyUSB0
    2018-01-22 10:05:30.219 Error: Gwx hardware (2) nothing received for more than 1 Minute!....
    2018-01-22 10:05:31.220 Error: Restarting: Gwx
    2018-01-22 10:05:32.170 MySensors: Serial Worker stopped...
    2018-01-22 10:05:33.181 MySensors: Using serial port: /dev/ttyUSB0
    2018-01-22 10:07:00.204 Error: Gwx hardware (2) nothing received for more than 1 Minute!.... 
    etc
    
    • screen shots:
    • list itemSetup->Hardware:
      ![Gateway settings]https://drive.google.com/file/d/1NjJZMlaM98XaZ-UCY93pyeHcKbT7ZZoh/view?usp=sharing

    • list itemSetup->Hardware Gwx setup:
      ![Gwx Setup]https://drive.google.com/file/d/1vDVDcLGaGK_g3-uYQrl_DnlHlbvjq87Z/view?usp=sharing

    • list itemSetup->Settings:
      ![Domoticz Settings]https://drive.google.com/file/d/15bkfnHx6rEcqRnTvLVOydwPK63dy83xe/view?usp=sharing

    Troubleshooting

  • [SOLVED] I use serial GW 2.1.1 and my sensor node won't connect
    M Mario64

    Hi,

    I've got across similar problem. What works for you doesn't solve problem in my case.
    Decreasing power to PA_LEVEL_LOW or switching to MySensors v2.2.0-rc.2 gives no positive result.

    I have some experience with Arduino, but it is my first try with MySensors and Domoticz.

    If someone could advice how to cope with, thank you in advance.

    My Hardware:
    Arduino Nano, NRF21+ for GW & Node,
    the node is simple actuator: relay with button.

    GW output on Serial monitor:

    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSF:WUR:MS=0
    0;255;3;0;9;TSM:INIT:TSP OK
    0;255;3;0;9;TSM:INIT:GW MODE
    0;255;3;0;9;TSM:READY:ID=0,PAR=0,DIS=0
    0;255;3;0;9;MCO:REG:NOT NEEDED
    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.1.1
    0;255;3;0;9;MCO:BGN:STP
    0;255;3;0;9;MCO:BGN:INIT OK,TS
    

    Node output on Serial Monitor:

    0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    13 TSM:FPAR
    15 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2023 !TSM:FPAR:NO REPLY
    2025 TSM:FPAR
    2027 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4035 !TSM:FPAR:NO REPLY
    4037 TSM:FPAR
    4039 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6047 !TSM:FPAR:NO REPLY
    6049 TSM:FPAR
    6051 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8060 !TSM:FPAR:FAIL
    8061 TSM:FAIL:CNT=1
    8064 TSM:FAIL:PDT
    18067 TSM:FAIL:RE-INIT
    18069 TSM:INIT
    18076 TSM:INIT:TSP OK
    18078 TSM:FPAR
    18080 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    20088 !TSM:FPAR:NO REPLY
    20090 TSM:FPAR
    20092 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    22102 !TSM:FPAR:NO REPLY
    22104 TSM:FPAR
    22106 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    24114 !TSM:FPAR:NO REPLY
    24116 TSM:FPAR
    24118 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    26126 !TSM:FPAR:FAIL
    26127 TSM:FAIL:CNT=2
    26129 TSM:FAIL:PDT
    etc...
    

    Scratches:

    //Gateway
    #define MY_DEBUG
    #define MY_RADIO_NRF24
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define MY_GATEWAY_SERIAL
    #define MY_INCLUSION_MODE_FEATURE
    #define MY_INCLUSION_MODE_DURATION 120
    #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    
    #include <MySensors.h>
    
    void setup()
    {
    }
    
    void presentation()
    {
    }
    
    void loop()
    {
    }
    

    Node:

    #define MY_DEBUG 
    #define MY_RADIO_NRF24
    #define MY_REPEATER_FEATURE
    
    #include <SPI.h>
    #include <MyConfig.h>
    #include <MySensors.h>
    #include <Bounce2.h>
    
    #define RELAY_PIN  4  // Arduino Digital I/O pin number for relay 
    #define BUTTON_PIN  5  // Arduino Digital I/O pin number for button 
    #define CHILD_ID 10   // Id of the sensor (child)
    #define RELAY_ON 1
    #define RELAY_OFF 0
    
    Bounce debouncer = Bounce(); 
    int oldValue=0;
    bool state;
    
    MyMessage msg(CHILD_ID,V_LIGHT);
    
    void setup()  
    { 
      // Setup the button
      pinMode(BUTTON_PIN,INPUT);
    
      // Setup debouncer
      debouncer.attach(BUTTON_PIN);
      debouncer.interval(5);
    
      // set relay on when starting up
      pinMode(RELAY_PIN, OUTPUT);   
    
      state=true;
      digitalWrite(RELAY_PIN, RELAY_ON);
    }
    
    
    void presentation()  {
      // Send the sketch version information to the gateway and Controller
      sendSketchInfo("Relay & Button", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID, S_LIGHT);
    }
    
    
    void loop() 
    {
      debouncer.update();
      // Get the update value
      int value = debouncer.read();
      if (value != oldValue && value==0) {
          send(msg.set(state?false:true), true); // Send new state and request ack back
    
          Serial.println("zmiana value na 0");
    
          // Change relay state localy, anyway
          state = !state;
          digitalWrite(RELAY_PIN, state?RELAY_ON:RELAY_OFF);
    
          Serial.print("state = ");
          Serial.println(state);
    
      
      }
      oldValue = value;
    } 
    
    
    void receive(const MyMessage &message) {
      if (message.isAck()) {
         Serial.println("This is an ack from gateway");
      }
    
      if (message.type == V_LIGHT) {
         // Change relay state
         state = message.getBool();
         digitalWrite(RELAY_PIN, state?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());
       } 
    }
    
    
    Troubleshooting
  • Login

  • Don't have an account? Register

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