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.
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.
Yes. You are right.
And it's strange that disabling registration (MY_REGISTRATION_FEATURE) still process another kind of "registration"
Probably it will help someone. I found how to do what I want without big changes. So you have to:
commented out in MyConfig.h this line:
#define MY_REGISTRATION_FEATURE
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
}
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.
Probably it will help someone. I found how to do what I want without big changes. So you have to:
commented out in MyConfig.h this line:
#define MY_REGISTRATION_FEATURE
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
}
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.
Yes. You are right.
And it's strange that disabling registration (MY_REGISTRATION_FEATURE) still process another kind of "registration"
@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
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.
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.