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
K

kskud

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

Posts

Recent Best Controversial

  • How to disable default node registration to the GW?
    K kskud

    Probably it will help someone. I found how to do what I want without big changes. So you have to:

    1. commented out in MyConfig.h this line:
      #define MY_REGISTRATION_FEATURE

    2. add changes to MyTransport.cpp (add marked lines of code)
      bool transportCheckUplink(bool force) {
      #if !defined(MY_PARENT_NODE_IS_STATIC) and !defined(MY_REGISTRATION_FEATURE)
      if (!force && (hwMillis() - _transportSM.lastUplinkCheck) < CHKUPL_INTERVAL) {
      TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:OK,FCTRL\n")); // flood control
      return true;
      }
      // ping GW
      uint8_t hopsCount = transportPingNode(GATEWAY_ADDRESS);
      // verify hops
      if (hopsCount != INVALID_HOPS) {
      // update
      _transportSM.lastUplinkCheck = hwMillis();
      TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:OK\n"));
      // did distance to GW change upstream, eg. re-routing of uplink nodes
      if (hopsCount != _nc.distance) {
      TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:DGWC,O=%d,N=%d\n"), _nc.distance, hopsCount); // distance to GW changed
      _nc.distance = hopsCount;
      }
      return true;
      }
      else {
      TRANSPORT_DEBUG(PSTR("TSF:CHKUPL:FAIL\n"));
      return false;
      }
      #else
      return true;
      #endif
      }

    3. add to your node's sketch:
      #define MY_NODE_ID 7
      #define MY_PARENT_NODE_ID 0
      #define MY_PARENT_NODE_IS_STATIC

    After that you will be able to start your device, send data even if the parent node is disabled (the request just fail). Once you enable GW you will be able to get presentation, heartbeat status, do standard requests to the node.

    Troubleshooting

  • How to disable default node registration to the GW?
    K kskud

    @martinhjelmare

    Yes. You are right.
    0_1470064751331_upload-d1a03bcb-9b27-4594-a1fb-e3374784d0f4

    And it's strange that disabling registration (MY_REGISTRATION_FEATURE) still process another kind of "registration"

    Troubleshooting

  • How to disable default node registration to the GW?
    K kskud

    @martinhjelmare
    So I added to my node sketch:
    #define MY_NODE_ID 7
    #define MY_PARENT_NODE_ID 0
    #define MY_PARENT_NODE_IS_STATIC

    and commented out line in MyConfig.h file:
    //#define MY_REGISTRATION_FEATURE

    but it still tries to connect to the parent node (

    Starting sensor (RNNNA-, 2.0.1-beta)
    TSM:INIT
    TSM:INIT:TSP OK
    TSM:INIT:STATID,ID=10
    TSF:ASID:OK,ID=10
    TSM:FPAR
    TSM:FPAR:STATP=0
    TSM:ID
    TSM:ID:OK,ID=10
    TSM:UPL
    TSF:PING:SEND,TO=0
    !TSF:MSG:SEND,10-10-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=NACK:1
    TSF:CHKUPL:FAIL
    !TSM:UPL:FAIL

    Troubleshooting

  • How to disable default node registration to the GW?
    K kskud

    As for me it can be achieved by these parameters:
    #define MY_NODE_ID 7
    #define MY_PARENT_NODE_ID 0
    #define MY_PARENT_NODE_IS_STATIC

    In this case we have all what we need to initialize any node. But it doesn't work for me.

    Troubleshooting

  • How to disable default node registration to the GW?
    K kskud

    For example, there is a wall switch which connected to a device which actually switch the light. Using MySensor library we can add additional functionality (some kind of wrapper around the device) which allows us remotely control the light. If something went wrong with my GW my device will not work.

    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