Composite Device Tracker Platform

Released 2.8.3

Changes timezonefinder defaults to use timezonefinder==6.2.0 instead of timezonefinderL==4.0.2 and TimezoneFinderL class instead of TimezoneFinder class. This fixes the startup problem caused by an import error due to timezonefinderL no longer working with the lates release of importlib-resources.

Note that if your composite configuration manually specifies the timezonefinderL package you will need to change the config accordingly (since you’re overriding the defaults.) E.g., change the tz_finder, and possibly tz_finder_class, options, or simply remove them.

I am still getting an error after Version 2.8.3 update.

First, it takes forever to start HA, it stays on Starting composite message. After HA reloads, composite is not loaded. I see this in the error logs:

Unable to install package timezonefinder==6.2.0: error: subprocess-exited-with-error × Building wheel for h3 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [11 lines of output] Traceback (most recent call last): File "/tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup cmkr = cmaker.CMaker(cmake_executable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__ self.cmake_version = get_cmake_version(self.cmake_executable) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version raise SKBuildError(msg) from err Problem with the CMake installation, aborting build. CMake executable is /tmp/pip-build-env-2cwysk5g/overlay/lib/python3.11/site-packages/cmake/data/bin/cmake [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for h3 ERROR: Could not build wheels for h3, which is required to install pyproject.toml-based projects [notice] A new release of pip is available: 23.1.2 -> 23.2 [notice] To update, run: pip install --upgrade pip

What version of HA are you using? And what is your composite config? Sorry, also, what type of install do you have (core, container, OS, etc.)?

Sorry. Running HA OS, version 2023.7.2

Maybe I misread, but went back from local to device_or_local. Do we still need to stick with just local?

Here is my config:

composite:
  trackers:
  - name: scott_composite
    time_as: local
    entity_id:
    - device_tracker.scott
    #- device_tracker.scott_s_pixel_7_pro

Scott

Thanks. device_or_utc or device_or_local should now work, and you must choose one of them if you want it to determine time zone from device location.

I can see by the error message that it’s trying to install v6.2.0 of timezonefinder, which is what I would expect given your configuration. I don’t know why that’s not working on your system. I tested this myself on HA OS, 2023.7.2 and it worked fine.

If you use device_or_local, does it fail on every HA restart? And by that, I mean a full restart, not just a config reload. I wonder if you’re experiencing some sort of temporary python package install issue.

It appears it fails on a full restart if I use device_or_local. If I change it to local only, it restarts and loads fine.

I’ll keep messing with it. May uninstall the integration and redownload it. I’ll keep you posted.

Scott

That’s because it only tries to install and import timezonefinder if device_or_utc or device_or_local is used.

I doubt that will have any effect. There is some reason why your system is having a problem trying to install the timezonefinder Python package which I can’t explain. I’ve never seen the type of error you’re seeing (i.e., error building wheel for h3 (pyproject.toml).) I have no idea why that is happening, or what to do about it.

The composite integration is different in the way it handles this sort of thing. Normally a required package is specified in the manifest.json file and HA takes care of installing it. But since I wanted to avoid having this package (and its required packages) installed if the user wasn’t using the time zone lookup feature, and because there are two different timezonefinder package options, the composite integration handles installing the desired package. But now that the timezonefinderL package is no longer usable, maybe I should just change the composite integration to use the standard method to have the timezonefinder package installed, whether or not it’s used. Hmm…

I’m going to completely uninstall and reinstall the package to see if that has anything to do with it. If I am the only one with the issue, then it has to be something unique to my setup I am guessing, although I would have no idea what or where to even start looking LOL.

Fair enough. Let me know how it goes, and feel free to private message me if you like.

If you can’t get it to work, I could try creating a beta release that installs the package the standard way. Then you could try that out and see if it helps.

OK.

I am not really sure what device_or_local or device really does anyway. Am I better off just leaving it as local and call it good, or is there another reason to use device_or_local?

Scott

Have you read the doc on the time_as option?

Yes, but never really gave it much thought though. However, I think after reading them again, in my use case, local only should be sufficient.

FWIW, at least two other people have reported the same errors trying to install timezonefinder. Can you tell me, what is the hardware platform on which you are running HA?

Sure, it is an Odroid N2+

Scott

Ok, thanks. That’s another tick in the “doesn’t work on ARM” column.

I know you don’t need the time zone determination feature, but could you try an experiment for me, to hopefully help solve this for others that do? If so, could you temporarily add the following to your composite config, change the time_as option back to device_or_local, restart, and let me know how it works?

composite:
  tz_finder: timezonefinder==5.2.0
  tz_finder_class: TimezoneFinderL
  ...

For this test, it shouldn’t matter which version of this integration you’re using.

Released 2.8.4

timezonefinder>=6 changed its build infrastructure and started using the h3 package, which seems to break on ARM targets. Going back to version 5.2.0 of timezonefinder seems to avoid those problems.

It worked by adding your requested changes.

Scott

1 Like

I just came across this and TRIED it but didn’t have luck with what I was trying to achieve. I have two sets of keys and each one has their own BLE tracker which HA sees just fine as a device_tracker. I was trying to combine them into a single device and if ONE of the two is gone it would flag the whole composite device_tracker to not_home. Any thoughts?

Use a group? Edit: although that would probably tend to show home when either is home so maybe a template?