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

Add arm docker image for raspberry pi zero #32

Open
nriel opened this issue Jul 17, 2024 · 20 comments
Open

Add arm docker image for raspberry pi zero #32

nriel opened this issue Jul 17, 2024 · 20 comments
Labels
enhancement New feature or request

Comments

@nriel
Copy link

nriel commented Jul 17, 2024

I can't use the docker image due to wrong architecture

@dglaude
Copy link
Contributor

dglaude commented Jul 17, 2024

I think the image is arm64 and on 32 bit arm (armv6?) like PiZero, you would need armhf.
Not sure it will run or it is still possible/easy to run docker on a PiZero. It would be more easy on a PiZero 2W that would be able to run the arm64 container.

Maybe the topic could be enhanced a little bit and also have also a docker image that works on x86-64 to run on an Intel NUC or that kind of small size computer.

@nriel
Copy link
Author

nriel commented Jul 17, 2024

I see the following error:

 tesla-ble-http-proxy The requested image's platform (linux/arm64) does not match the detected host platform (linux/arm/v6) and no specific platform
 was requested 0.0s 
Attaching to tesla-ble-http-proxy
tesla-ble-http-proxy  | exec /teslaBleHttpProxy: exec format error
tesla-ble-http-proxy exited with code 0

Docker in general works fine, but only with supported images.

In order to get going, I installed the proxy as a go-application and it is running fine.
Only thing I can't get to work is to load it as a systemd service on boot. It always complains about the certificate not being found. I already tried to put it into /root/key/*cert, but that does not seem to be the path being searched for.
When building, I added the cert to the /key folder and while running with ./TeslaBleHttpProxy it also does start correctly with the certifcates found in the root folder of TeslaBleHttpProxy

**Edit:
moving the files from /root/key to /key worked like a charm :) Not the nicest way, but as the path is hard-coded into to go application, I don't see another solution with my limited knowledge.

@wimaha wimaha added the enhancement New feature or request label Jul 17, 2024
@little-penguin88
Copy link

little-penguin88 commented Jul 18, 2024

I made a start script which changes to the TeslaBleHttpProxy dir and then in there let ./TeslaBleHttpProxy start. so it works with the /key folder in that dir. And then I added that script to a @reboot cron job

@nriel
Copy link
Author

nriel commented Jul 18, 2024

Could you please share the script? Thanks!

@little-penguin88
Copy link

little-penguin88 commented Jul 18, 2024

Sure. I called it StartTeslaProxy.sh and it has the following content to start the application and is putting the output into a logfile. And it assumes you have TeslaBleHttpProxy dir in your home folder directly. If that is not the case you just need to specify the whole path to your TeslaBleHttpProxy dir to make it work

cd TeslaBleHttpProxy
./TeslaBleHttpProxy > TeslaProxy.log 2>&1 &

You then need to make it executable with

chmod +x StartTeslaProxy.sh

And then add it to crontab with

crontab -e

and in that file just paste @reboot ./StartTeslaProxy.sh

@lemocine
Copy link

lemocine commented Jul 19, 2024

got the same problem. i cant work around myself since im to dumb to install go and compile myself. is there a possiblity to make the docker container for armv7? only solution for me i got rn is to make a clean new install with 64bit raspberry pi os and start over with my whole setup.

nvm i upgraded my raspberry4 to 64 bit. worth it, needed to be done anyway :)!

@ugoetzen
Copy link

Same here. I got an PiZero 2W and cant get it running due to the wrong platform.

@wimaha
Copy link
Owner

wimaha commented Jul 20, 2024

I will try adding this binarys in the docker image. I come back here, when it‘s completed.

@wimaha
Copy link
Owner

wimaha commented Jul 22, 2024

Can you try via wimaha/tesla-ble-http-proxy:dev if it's working?

@ugoetzen
Copy link

Just gave it a try on a PiZero 2W:

root@raspible:/home/udo/TeslaBleHttpProxy# docker pull wimaha/tesla-ble-http-proxy:dev
dev: Pulling from wimaha/tesla-ble-http-proxy
be490e8d6aa6: Pull complete 
6be72e41f1a7: Pull complete 
017206a48663: Pull complete 
Digest: sha256:e910b36091c21b4c45b4b972cc143cce58251f028f45c8958f11fedce1cae296
Status: Downloaded newer image for wimaha/tesla-ble-http-proxy:dev
docker.io/wimaha/tesla-ble-http-proxy:dev
root@raspible:/home/udo/TeslaBleHttpProxy# docker compose up
[+] Running 2/1
 ✔ Container tesla-ble-http-proxy                                                                                                                                    Created                                                   0.5s 
 ! tesla-ble-http-proxy The requested image's platform (linux/arm64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested                                                           0.0s 
Attaching to tesla-ble-http-proxy
tesla-ble-http-proxy  | exec /teslaBleHttpProxy: exec format error
tesla-ble-http-proxy exited with code 0

seems the platform is still not the right one.

@swa72
Copy link

swa72 commented Jul 28, 2024

I'm a noob myself when it comes to docker, but ...

services:
  tesla-ble-http-proxy:
    image: wimaha/tesla-ble-http-proxy:dev
    container_name: tesla-ble-http-proxy
    volumes:
      - ~/TeslaBleHttpProxy/key:/key
      - /var/run/dbus:/var/run/dbus
    restart: always
    privileged: true
    network_mode: host
    cap_add:
      - NET_ADMIN

that got me going :-) Note the different image name.

@ugoetzen
Copy link

ugoetzen commented Jul 29, 2024

Ok, I was just pulling the Dev image, but obviously not calling it within the docker-compose.yml file. The dev image is working for me as well on a PiZero 2W as swa72 described above.

@nriel
Copy link
Author

nriel commented Aug 3, 2024

On Raspberry pi zero W still crashing with error 132

@wimaha
Copy link
Owner

wimaha commented Aug 10, 2024

Should be working with Version 1.2.2 now. If there are any other errors, please open new issue.

@wimaha wimaha closed this as completed Aug 10, 2024
@nriel
Copy link
Author

nriel commented Aug 11, 2024

With raspberry pi zero w still getting code error 132.

dpkg --print-architecture shows:
armhf

@wimaha wimaha reopened this Aug 11, 2024
@lits101
Copy link

lits101 commented Aug 15, 2024

With raspberry pi zero w still getting code error 132.

dpkg --print-architecture shows: armhf

I'm also getting error 132 on a Raspberry Pi Zero W.

@wimaha
Copy link
Owner

wimaha commented Sep 8, 2024

There is a new version on dev tag. Can some one test this with Raspberry Pi Zero W?

image: wimaha/tesla-ble-http-proxy:dev

@wimaha
Copy link
Owner

wimaha commented Sep 16, 2024

I've release the version with 1.2.5

@lits101
Copy link

lits101 commented Sep 17, 2024

I've just spun up a new instance of 1.2.5 in docker-compose on a Raspberry Pi 0 W and I can confirm I'm still getting the "Restarting (132)" error.

pi@teslaproxy2:~/teslableproxy $ docker ps
CONTAINER ID   IMAGE                         COMMAND                CREATED          STATUS                           PORTS     NAMES
e01a5844ad69   wimaha/tesla-ble-http-proxy   "/teslaBleHttpProxy"   59 seconds ago   Restarting (132) 9 seconds ago             tesla-ble-http-proxy

@sovathnahim
Copy link

sovathnahim commented Nov 3, 2024

How the program can communication to the car ?

Do you mean , we need to connect wifi to raspi which we have installed "TeslaBleHttpProxy"?
I still do not understand, the instruction to do it ? after input the Tesla Vin , we need to scanned the new Key card or just the known current tesla Keycard, basically tesla need to confirm by paired key card every time we set up any key card , phone or remote.
Actually , I am successfully installed it but not yet testing, So please kindly advice , thanks

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

No branches or pull requests

9 participants