Composite Device Tracker Platform

Ok, thanks :slight_smile:

HI Phil,

after having updated to the new composite release, I see a lot of these:

2020-03-15 21:40:54 ERROR (MainThread) [homeassistant.config] Platform error: device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config.py", line 752, in async_process_component_config
    platform = p_integration.get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 277, in get_platform
    f"{self.pkg_path}.{platform_name}"
  File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/composite/device_tracker.py", line 26, in <module>
    from .const import (
ModuleNotFoundError: No module named 'custom_components.composite.const'

Is this a bug, or do we need to set extra config settings, which I obviously missed?

thanks for having a look

update

Ive filed an issue on your repo, but maybe it is a HA update issue? After reverting to the previous 2.1.0 release, I still see this on config check:

Ill await your analysis, before filing this in the HA repo.
just so you know, taking the Composite integration out removes the config check error, so it definitely is an incompatibility between HA 106.6 and Composite

See my response in: https://github.com/pnbruckner/ha-composite-tracker/issues/16

yes, thanks, it made me see I missed the const.py (all along). Don’t understand why it didn’t error out before, but it didn’t.

Check gave a valid config so, restarting now …
thanks

please let me ask another question. I now notice my time_zone sensors stopped showing a useful state, while I havent changed anything to the setup config of the trackers.

using

        value_template: >
          {% set state = states.device_tracker.me %}
          {% if state.attributes is defined and
                state.attributes.time_zone is defined and
                state.attributes.time_zone != 'unknown' %}
            {% set n = now() %}
            {{ (n.astimezone(state.attributes.last_seen.tzinfo).utcoffset() -
                n.utcoffset()).total_seconds()/3600 }}
          {% else %}
            unknown
          {% endif %}

give me unknown on all tracked devices. I did read it apparently can’t determine the time_zone, but see no issues logged anywhere.

I don’t have the integration config set:

composite:
  tz_finder: timezonefinderL==2.0.1

which wasn’t there before was it? Since I would probably use a default value, do I still need to set that?
thanks for having a look.

Please communicate in one forum instead of duplicating in two.

I believe you forgot to update __init__.py.

you’re right, I missed that too. I think at the time, I only checked the new device_tracker.py because of the new timestamp. really sorry for that, and sorry for the confusion in both fora. All working very nicely again, thank you very much. beautiful integration.

I’ll close the GitHub issue (again).

1 Like

Hi there,

Thanks for this great integration. I now finally can have a group of all_automations!
Maybe you already know but in case you don’t, I have the following warning in HA 0.160.3:

2020-03-23 19:41:15 WARNING (MainThread) [homeassistant.components.device_tracker] The 'hide_if_away' option (with value 'False') is deprecated, please remove it from your configuration. This option will become invalid in version 0.107.0

I have deleted the entry hide_if_away in known_devices.yaml created by your integration but the message still keeps coming. I also checked my configurations and found no entry using that option. I don’t know if it is related to your integration…

Just want to let you know this… thanks for the great work! :wink:

Hi. You’re welcome!

known_devices.yaml is created/managed by the component level device tracker code. Nothing that any device tracker platform, including mine, can do about it.

Thank you for your quick reply. Yes, I know that. Do you also know why HA generated this warning when I can’t find it anywhere in my configuration? Thank you in advance!

What version of HA are you using?

I am on 0.106.3

I don’t know why 0.106.3 keeps generating that warning if you’ve removed all occurrences of hide_if_away from your known_devices.yaml file, but you might want to upgrade to the latest version. I believe they had some issues when trying to remove this feature in the 0.106.x releases.

Okay thank you! I will try to update to the latest version and report back if the warning still persists. I can’t do it now as I am waiting for an integration to be ready for HA 0.107.

If it makes you feel better I’ve been seeing this as well for awhile and I’m still on 0.106.4. Hoping it goes away when I upgrade because it’s not in the configuration anymore.

Hi all, is anyone using this on 0.111? I just added it via hacs and put the following in my config. It appears to be running because I can see it detecting the devices in the log but it doesn’t create any device_trackers… Did I miss a step?

device_tracker:
  - platform: iphonedetect
    consider_home: 60
    interval_seconds: 6
    new_device_defaults:
      track_new_devices: true
    hosts:
      my_iphone_x_ping: 192.168.2.12
      wife_iphone_6_ping: 192.168.2.20
      daughter_iphone_6_ping: 192.168.2.24

here’s a log snippet of it apparently working:

2020-06-30 23:35:20 DEBUG (SyncWorker_5) [custom_components.iphonedetect.device_tracker] ip n output for my_iphone_x_ping is: 192.168.2.12 dev enp4s0f0 lladdr 74:1b:b2:74:73:c2 ref 1 used 0/0/0 probes 1 REACHABLE
2020-06-30 23:35:20 DEBUG (SyncWorker_5) [custom_components.iphonedetect.device_tracker] Device my_iphone_x_ping (192.168.2.12) is HOME
2020-06-30 23:35:20 DEBUG (SyncWorker_5) [custom_components.iphonedetect.device_tracker] ip n output for wife_iphone_6_ping is: 192.168.2.20 dev enp4s0f0 lladdr c8:3c:85:54:9d:81 ref 1 used 0/0/0 probes 1 DELAY
2020-06-30 23:35:20 DEBUG (SyncWorker_5) [custom_components.iphonedetect.device_tracker] Device wife_iphone_6_ping (192.168.2.20) is HOME
2020-06-30 23:35:20 DEBUG (SyncWorker_5) [custom_components.iphonedetect.device_tracker] ip n output for daughter_iphone_6_ping is: 192.168.2.24 dev enp4s0f0  ref 1 used 0/0/0 probes 4 INCOMPLETE
2020-06-30 23:35:20 DEBUG (SyncWorker_5) [custom_components.iphonedetect.device_tracker] Device daughter_iphone_6_ping (192.168.2.24) is AWAY

This topic is about the composite device tracker integration. I have no idea what the iphonedetect device tracker integration is.

Sorry, I saw a lot of mentions of it in this thread, so I thought this was the right place.

No problem. I’d suggest starting a new topic, or check the github repo for that custom integration.

1 Like

With the latest updates to entity_id, are there any problems with this still working as before? I am hesitant to move to 0.115.1 until I can verify each of the configurations I implemented don’t break.