Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated goalchemy2 version? #40

Closed
Drazhar opened this issue Jan 12, 2023 · 2 comments
Closed

Outdated goalchemy2 version? #40

Drazhar opened this issue Jan 12, 2023 · 2 comments

Comments

@Drazhar
Copy link

Drazhar commented Jan 12, 2023

Hello

I'm quite new to Home Assistant and was using InfluxDB since now for my long term storage. But I dislike the "new" version of Influx 2.x with the Flux part. Also it would be great to just have one database running, which can store the normal home assistant data in Postgres and the long term sensor data in Timescale.

Now onto my issue :-)
If I try to use the LTSS extension, I get the following error: Setup failed for custom integration ltss: Requirements for ltss not found: ['geoalchemy2>=0.8,<0.9'].

I checked the goalchemy2 version in the Home Assistant repository and it's sqlalchemy==1.4.45. link

I never used sqlalchemy, but are there huge breaking changes between the two versions? Do you think we/you could just upgrade to ´>=1.4.45´?

I also have no idea how to develop an integration for Home Assistant. But it seems that's not possible to have an own "venv" for each integration?

edit: I just digged a bit deeper and it seems that requirements should be installed by default. The more detailed logs show, that the c compiler gcc ist not installed in the docker container which is running home assistant. Therefor pip fails installing sqlalchemy! I will try to fit it tomorrow and close this issue if this solved it.

@Drazhar
Copy link
Author

Drazhar commented Jan 13, 2023

Adding gcc and g++ to the docker image fixed the issue!

If the error occurs in the future, here is the solution:

  1. Instead of running the docker image homeassistant/home-assistant directly, create a Dockerfile and declare build in the docker-compose.yml with the path to the build directory. In my case, the Dockerfile is at build/Dockerfile, so the yml should contain build: ./build
  2. The Dockerfile ist quite simple. It just contains the following:
    FROM homeassistant/home-assistant
    
    RUN apk add gcc g++
    
  3. Use docker-compose up -d --build to build the image

@Drazhar Drazhar closed this as completed Jan 13, 2023
@freol35241
Copy link
Owner

@Drazhar Interesting, I have not seen this problem previously and I have always believed home assistant "just sorts these things out". Well, good you found a solution and thanks for reporting back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants