Device has been inactive message


#1

Hi,

We have observed below mentioned log in webUI
"The node has not been activated yet or device has been inactive for long time"

Is this an expected behavior if we are not using the Node or target board which runs lora server more than 2 months?

Is this applicable for OTAA and ABP methods?


#2

Got the same question over here.
Is there an option to disable this feature / issue?


#3

This is already configurable using the loraserver.toml configuration https://www.loraserver.io/loraserver/install/config/

# Device session expiration.
#
# The TTL value defines the time after which a device-session expires
# after no activity. Valid units are 'ms', 's', 'm', 'h'. Note that these
# values can be combined, e.g. '24h30m15s'.
device_session_ttl="744h0m0s"

#4

Thank you.
How can I disable this feature?
With a 0s?


#5

You can’t, but you can set the TTL to a really high value.


#6

OK. Thanks. :slightly_smiling_face:


#7

Please note that the reason behind expiring these sessions is that Redis is a key / value store and there are no queries like with SQL to cleanup this storage. Therefore I think it is better to always have a TTL so eventually this store is “garbage collected” :slight_smile:

E.g. on PostgreSQL you could do something like:

delete from device_session where last_seen < $SOME_TIMESTAMP;

#8

Hello everyone!

I posted a different topic about a problem that appeared to my assigned (in Loraserver) devices, but if you tried this and find a solution:

Device Session Expiration has to do with “no activity” devices,as below, right?

If i set device_session_ttl=“0h30m0s”, these devices will be expired, and i may create them (Again) using the same EUI’s?

May all this problem is “garbage collection” as @brocaar mentioned yesterday?

Thanks,
Nikos.


#9

Hi,
I am passing the parameters like through the command arguments not through the configuration file.
Example loraserver --net-id ----band IN_865_867 …
In that case,if we are not passing the “device_session_ttl” parameter,what can be the expected device-session expiring timeout.


#10

CLI arguments are not supported anymore, you must use a configuration file.


#11

What are the minimum, maximum value allowed for “device_session_ttl”?
What is the default value taken by LoRa server if this parameter is not defined in configuration file?


#12

The defaults are documented here: https://www.loraserver.io/loraserver/install/config/. The max value is the max value that is supported by Redis to set the expiration using this command: https://redis.io/commands/pexpire. I’m not sure if there is a maximum.


#13

Thanks for the reply.
According to https://www.loraserver.io/loraserver/install/config/, default value is 744 hours.
We are running brocaar LoRa server on ARM device and passing the parameter through command line arguments. We could not implement configuration file support.
In this case, what value will be used by LoRa server?
What is LoRa server behavior when “device_session_ttl” is not set?
Whether LoRa server will use default value 744 hours?


#14

You should not use cli arguments to pass these values. They have been deprecated and still work to support the migration from env. vars to config values. In one of the next releases, this will be removed completely.