Device detection - notification just for unknown devices?


I am receiving notification - “New device appeared on your network”. It is annoying because notification are not for new devices, but for know devices (e.g. listed in DHCP clients in foris/config/main/lan/ like raspberry pi or HP network printer).

Is there way how configure notification so I get notification only for unknown devices?

This functionality (called “Device detection”) is marked as “EXPERIMENTAL”

Take it with a pinch of salt, please :slight_smile:

Ok. But it there a way to configure it?

Who knows … maybe Turris team

I once found that there is interval somewhere in configs after a device is marked as unknown again.

As far as I remember it was set to 1month by default. So you can just increase that to lets say 6months or so and should do the work you need.

I think its here:

config archive 'archive'
option keep '4w'

But TurrisOS is switching to the new monitoring tool (suricata? was it called?) so I guess it will be different for the TOS4.x-up then.

I have there 4w (4 weeks?) . But network printer is online once week at least.
Is there way how to find reason my devices are forgotten?

Pakon and device detection are different matters. Latter settings are located in /etc/config/dev-detect and are likely self-explanatory

config storage 'storage'
    option persistent 0
    option persistent_db_path '/srv/dev-detect.db'
    option volatile_db_path   '/tmp/dev-detect.db'

I can not find them (I have foris version: 100.4, Turris OS version 3.11.7):

# ls /etc/config/dev-detect
ls: /etc/config/dev-detect: No such file or directory

# ls /srv/dev-detect.db
ls: /srv/dev-detect.db: No such file or directory

# ls /tmp/dev-detect.db
ls: /tmp/dev-detect.db: No such file or directory

# find / -iname "*.db"

# find / -iname "*dev-detect*"

BTW: /etc/rc.d/S95pakon-dev-detect is symlink to /etc/init.d/pakon-dev-detect that does not exist on my router.

Ok. I reinstalled dev-detect and pakon-dev-detect. Now configuration is found.

Hi, just to clear up any confusion: Device detection in TOS 3.x differs from TOS 4.x, so it really depends on what major TOS version do you have installed.

TOS 3 ships two device detection packages - pakon-dev-detect (default; in user lists) and dev-detect (experimental; you have to install it manually). Config pointed by @anon50890781 is config file of new dev-detect. Unless you manually installed the newer one, look into /etc/config/pakon config instead.

TOS 4 ships only dev-detect as replacement for pakon-dev-detect and you can install it the usual way through user lists. As @anon50890781 stated, in this case Pakon and device detection are two different things.


In that case devices should be known and should not trigger additional notifications.
Is it just printer or any other devices?

However there are few possible causes, why devices might be forgotten.

  1. Did any unexpected reboots (power outage, force reboot, etc) happened?

pakon-dev-detect depends on data that are partially stored in RAM and then saved to persistent storage once per day. If your router was hard rebooted before that, data and new-known devices from that period are lost.

On the other hand data should be saved during regular reboot or system service restart, so that shouldn’t be a problem.

  1. Perhaps there is a bug and data aren’t stored properly.

We are currently investigating that and you can track progress here

Unfortunately, it is not possible right now.

Thank. I am not aware about any not expect reboot.

I recognized this behavior is only for printer (connected by lan) and raspberry-pi (connected via wifi), but raspberry I do not use often (e.g. one month).
Other topic is report: New device appeared on your network (MAC address 04:f1:28:2a:d7:99, hostname *) - I have no clue which device it is…

Is it ok to have installed pakon-dev-detect and dev-detect at the same time?

I wouldn’t recommend it, however they could be installed and should work alongside. Then you would get notifications twice for same devices and in case some device reappears (like what this thread is about), you couldn’t easily tell which device detection is responsible for that.

Recognition of unknown devices can be difficult at times. Hostname is optional and some devices don’t send any. Device detection try to guess device vendor by MAC address, but it also won’t recognize every device accurately.

According to various OUI databases MAC prefix 04:f1:28 match HMD Global Oy. Do you have any Nokia phone around?