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
corbinC

corbin

@corbin
About
Posts
9
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • [Solved] Node not reconnecting
    corbinC corbin

    @tekka said:

    if(isTransportOK()){
        sleep(30000);  // transport is OK, node can sleep
      } 
      else {
        wait(5000); // transport is not operational, allow the transport layer to fix this
      }
    

    I've only just found this post, and these lines of code have me excited! fixes my problem, thank you!

    Troubleshooting

  • Garden light, humidity, temperature monitor with working SHT10 sensor 99% done and I need your help!
    corbinC corbin

    @ajachierno said:

    Also it always seems to be the same value regardless of light conditions (54612 ). I am thinking my sketch is wrong

    Your sketch looks correct to me, but if the lux sensor is always reporting the same value, then it will only send the message once as you have seen. Are you sure the lux sensor is wired correctly?

    Troubleshooting

  • Sensor doesn´t reconnect after connecting lost!?
    corbinC corbin

    @tekka said:

    @corbin Can you provide debug logs (on 2.0.0) of both, GW and node, showing what you described?

    It's been running well except for 1 node, this is the serial output, could it be damaged hardware?

    Stárting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASÓÉGNID:OK (ID=3)
    TSM:FPAR
    TSP:MSG:SEND 3-3-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,ót=bc:
    TSP:MSG:REÁÄ 0-0-3 s=255,c=3,t=8,pt=1,l=1,sg=0:0
    TSP:MSG:FPAÒ REÓ (IÄ=0, äést=0)
    TSP:MSG:FPAR (PPAR FOUND)
    TSP:MSG:PAR OK (ID=0, dist=1)
    TSM:FPAR:OK
    TSM:ID
    TSM:CHKID:ÏK (ID=3)
    ÔSM:UPL
    TSÐ:PING:SÅND (dest=0)
    TSP:MSG:SEND 3-3-0-0 s=255,c=3,ô=24,pt=1,l=1,sg=0,ft=0,st=ok:1
    ÔSP:MSG:READ 0-0-3 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:ÒEADY
    Óånsebender Micro FW 1.4 - Online!
    NODE:!REG
    TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=0,pt=1,l=1,sg=0,ft=0,st=ok:229
    TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=ok:0100
    TSP:MSG:SEND 3-3-0-0 s=255,c=0,ô=17,pt=0,l=5,sg=0,ft=0,st=ok:2.0.0
    TSP:MSG:SEND 3-3-0-0 s=255,ã=3,t=6,pt=1,l=1,sg=0,ft=0,st=ïk:0
    TSP:MSG:READ 0-0-3 s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    TSP:ÍSG:READ 0-0-3 s=255,c=3,t=6,pt=0,l=1,sg=0:M
    TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=11,pt=0,l=17,sg=0,æt=0,st=ok:Senseâender Micro
    TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=ok:1.4
    TSP:MSG:SEND 3-3-0-0 s=1,c=0,t=1,ðô=0,l=0,sg=0,æt=0,st=ok:
    TSP:MSG:SENÄ 3-3-0-0 s=199,c=0,t=13,pô=0,l=0,sg=0,ft=0,st=ok:
    Request regisôòation...
    TSP:MSG:SEND 3-3-0-0 s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=ok:2
    TSP:MSG:READ 0-0-3 s=255,c=3,t=27,pt=1,l=1,sg=0:1
    Node registòation=1
    Init complete, id=3, parent=0, distancå=1, registration=1
    TSP:MSG:SEND 3-3-0-0 s=1,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=ok:0```
    Troubleshooting

  • What is wrong with this sketch?
    corbinC corbin

    @Cliff-Karlsson
    You cannot use sleep of any kind, because it will power down the radio, and you need that running 100% of the time for the repeater function.

    Troubleshooting

  • What is wrong with this sketch?
    corbinC corbin

    @Cliff-Karlsson

    This is the sketch I'm using for a repeater and motion node. If you are using a HC-SR501 PIR with high and low triggers it should work ok without spamming your gateway.

    Note that there are no sleeps or waits, it will just keep running the loop. I don't know if that is ideal - definitely no good for batteries.

    /**
     * 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 create a node thay repeates messages
     * from nodes far from gateway back to gateway. 
     * It is important that nodes that has enabled repeater mode calls  
     * process() frequently. Repeaters should never sleep. 
     */
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    // Enable and select radio type attached
    #define MY_RADIO_NRF24
    //#define MY_RADIO_RFM69
    
    // Enabled repeater feature for this node
    #define MY_REPEATER_FEATURE
    
    #include <SPI.h>
    #include <MySensors.h>
    
    unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
    #define DIGITAL_INPUT_SENSOR 3   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
    #define CHILD_ID 1   // Id of the sensor child
    
    boolean previousTripped = LOW;
    
    // Initialize motion message
    MyMessage msg(CHILD_ID, V_TRIPPED);
    
    void setup() {
      pinMode(DIGITAL_INPUT_SENSOR, INPUT);      // sets the motion sensor digital pin as input  
    }
    
    void presentation()  
    {  
      //Send the sensor node sketch version information to the gateway
      sendSketchInfo("Motion and Repeater Node", "1.0");
    
      // Register all sensors to gw (they will be created as child devices)
      present(CHILD_ID, S_MOTION);
    }
    
    void loop() 
    {
      boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH;
      //Serial.println(tripped);
      // Sensor must be HIGH and not yet sent the status of the sensor
      if ((tripped == HIGH) && (tripped != previousTripped) ) {     
        send(msg.set(tripped ? "1" : "0")); // Send tripped value to gw
        previousTripped = tripped;   
      }  
      
      // Is sensor low and not sent? Then send LOW to gateway
      if ((tripped == LOW) && (tripped != previousTripped)) {    
          send(msg.set(tripped ? "1" : "0")); // Send tripped value to gw
          previousTripped = tripped;
      }
    }
    
    Troubleshooting

  • What is wrong with this sketch?
    corbinC corbin

    @nielsokker
    That wait at the end of the loop won't wake up on interrupt, for the motion sensor.

    @Cliff-Karlsson
    Is this node intended to be a repeater as well?

    Troubleshooting

  • Sensor doesn´t reconnect after connecting lost!?
    corbinC corbin

    @tekka well after making the post above, it has started working :)

    Knowing that the Sensebenders operated perfectly as temp and humidity sensors with the sketch they were shipped with, I modified the Sensebender sketch (https://github.com/mysensors/SensebenderMicro/blob/master/Arduino/SensebenderMicro/SensebenderMicro.ino) to include motion , and added "#define MY_PARENT_NODE_ID 0". Previously I had been using the default MySensors Motion Sensor sketch.

    I'm hoping it keeps working, so far, so good!

    Troubleshooting

  • Sensor doesn´t reconnect after connecting lost!?
    corbinC corbin

    @vga
    I'm having a similar problem, my battery powered motion sensors do not reconnect after going out of range, or when the controller is restarted. Restarting the sensor will allow it to reconnect to the controller.

    My mains powered motion sensors will reconnect automatically after the controller is restarted (I haven't tried taking them out of range whilst powered up). One battery powered motion sensor that is connected through a repeater node will stay connected/reconnect after the controller is restarted.

    I've cleared eeprom using the sketch on https://www.mysensors.org/build/debug, for the controller and all nodes.

    I've tried with and without a capacitor on the radios.

    I've started with the 1.5 API and also the new 2.0 API.

    The battery powered nodes are all running a Sensebender Micro with 2 x 1.2v NiMH batteries, nRF24L01+ (from Itead), and a HC-SR501 PIR (running on the 3.3v input as on http://techgurka.blogspot.com.au/2013/05/cheap-pyroelectric-infrared-pir-motion.html).

    My next ideas are to try normal 1.5v batteries, powering the PIR from 5v on a separate power supply, and Arduino mini pros instead of Sensebenders.

    Regards,
    Corbin

    Troubleshooting

  • MySensors 2.0.0 Released
    corbinC corbin

    Great work, thank you!

    Announcements
  • Login

  • Don't have an account? Register

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