Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. kskud
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    kskud

    @kskud

    3
    Reputation
    5
    Posts
    470
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    kskud Follow

    Best posts made by kskud

    • RE: How to disable default node registration to the GW?

      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.

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      @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"

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      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.

      posted in Troubleshooting
      kskud
      kskud

    Latest posts made by kskud

    • RE: How to disable default node registration to the GW?

      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.

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      @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"

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      @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

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      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.

      posted in Troubleshooting
      kskud
      kskud
    • RE: How to disable default node registration to the GW?

      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.

      posted in Troubleshooting
      kskud
      kskud