jasonacox / pypowerwall

Python API for Tesla Powerwall and Solar Power Data
MIT License
132 stars 23 forks source link

pypowerwall container for arm64 and arm/v7 #4

Closed jasonacox closed 1 year ago

jasonacox commented 2 years ago

Open issue for Greg Rhan - See https://github.com/jasonacox/Powerwall-Dashboard/issues/1

Thanks for putting together your [Powerwall Monitor] - looks great! I'm trying to get it set up and it looks like your pypowerwall container may not be built for arm (I'm on a M1 Mac and Raspberry Pi v3b+). Any chance you could update the docker image to support linux/arm64 & linux/arm/v7 in addition to amd64? Thanks in advance.

From my Pi $ docker logs pypowerwall standard_init_linux.go:228: exec user process caused: exec format error standard_init_linux.go:228: exec user process caused: exec format error standard_init_linux.go:228: exec user process caused: exec format error

From my M1 Mac

image

jasonacox commented 2 years ago

Corrected! Pushed pypowerwall container for linux/amd64, linux/arm64, and linux/arm/v7. Updated proxy README.

 docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --push -t jasonacox/pypowerwall:latest 

image

jasonacox commented 2 years ago

Discovery:

Thanks, that worked!

I hit another issue related to a bug in the libseccomp2 library for 32-bit Debian Buster, so including the error msg and resolution in case it comes up in the project issues.

pi:~/powerwall_monitor $ docker logs -f pypowerwall Fatal Python error: _Py_InitializeMainInterpreter: can't initialize time PermissionError: [Errno 1] Operation not permitted


# Resolved by [from https://docs.linuxserver.io/faq#option-2]

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list sudo apt update sudo apt install -t buster-backports libseccomp2