0.107.6 broke Device Tracker

re-trying asuswrt myself here, but a bit puzzled by the lack of configuration options for track_new_devices, exclude, consider_home, and interval_seconds…

cant believe these device_trackers are so neglected and immature all over tbh. Aren’t we missing some fundamentals elsewhere ?

I have some good news and bad.

Good news I’ve resolved it - The only problem is I had to reinstall HA from scratch. Haven’t had a single error.

Using:

  - platform: nmap_tracker
    hosts: 
      - !secret include_subnets1
      - !secret include_subnets2
    exclude:
      - !secret exclude
    scan_options: " --privileged -sn "
    interval_seconds: 30
    home_interval: 120
    consider_home: 0:01:00

What was interesting from the loading a new HA was that a lot of the configuration in Yaml such as that within addons such as DuckDNS and Samba and MQTT had all changed. Again I no expert in Software code but thought might help.

Bad news is 0.108.3 has a massive problem with an error that is being displayed all over the logs and doesn’t appear to have definte pattern “Event is not JSON serializable” and was the reason for having to reinstall from scratch because it crashed my SD Card.

https://github.com/home-assistant/core/issues/34134

I found the only way to stop the messages was to hash out the sensors its a bit of nightmare. Patiently awaiting a fix

# binary_sensor: !include binary_sensor.yaml

It does appear to be a Bayesian sensor problem

I’m using Home Assistant (HassOS / Hassio) so what does that mean?
Do I need to re-flash HassOS and restore? Or just a full restore from a snapshot will do it?

Well I am too and still not seeing any of the errors and concerning the Bayes problem I rewrote the Bayes sensors without the use of Value Templates and works fine and now running the current latest version 0.108.4. I wasn’t happy about having to do a rebuild but as mentioned previously in this issue it appears there have been some fundamental changes to the code concerning the direction of Yaml. I may be wrong but I now have a fresh build.

Fingers crossed that 0.108.7 will fix device tracker after this issue with Modbus was resolved.

I don’t understand the relation between nmap device tracker and modbus.
I have updated and I already have lots of logs (took more than 20s). Will wait but I don’t think it is solved for nmap

I found closed issue here that mentioned Modbus affecting NMAP.

that would be surprising, since not using Modbus at all, people are still affected by Nmap being broken.

I can confirm that it is not solved with 108.7

Damn, that is annoying :rage:

confirm issue remain on 108.9
known_device.yaml is not being updated by nmap.
configuration :

 - platform: nmap_tracker
   hosts: 192.168.1.1-250
   interval_seconds: 15
   track_new_devices: true
   consider_home: 300

Since adding the scan options line mine has been stable for over 3 days. Currently running 0.108.8 as I don’t want to restart HA since I added this line.

image

1 Like

Thanks for the suggestion, still seeing issues though:
2020-04-27 15:30:00 WARNING (MainThread) [homeassistant.components.device_tracker] Updating device list from legacy took longer than the scheduled scan interval 0:00:15

Any luck with 109?

Had the same issue and I also tried to fix it by finding the right scan intervals.
To identify the right interval, I downloaded an nmap scanner from nmap.org and started a scan with the parameters nmap -oX - 192.168.1.0/24.
These parameters can be found on Home Assistants Nmap Tracker page. I run the scan several times and it always took more than 200 seconds to complete.
Which explains, to my understanding, the issues we are having.
In a next step, I checked the used nmap parameters and I learned that the way home-assistant is calling nmap, it runs a full scan including port scan everytime called.
By accident, I found at the bottom of the Nmap Tracker Integration page under LINUX Capabilities that the nmap_tracker can also be called with the parameter -sn (Ping Scan - disable port scan).
Running again the scan using the nmap windows client with parameter -sn takes in average less than 15s.

My nmap device tracker yaml file looks now as follows:

  platform: nmap_tracker
  hosts: 192.168.1.0/24
  interval_seconds: 30
  consider_home: 180
  scan_options: " --privileged -sn "

Currently it runs for more than 12 hours on two home-assistant instances (rpi3, Home Assistant 0.110.0) with no logged errors. I am not sure if it solves your issues too but at least it solved mine for the time beeing.

3 Likes