Flodu31 / HomeAssistant-PeugeotIntegration

Integration between Peugeot API and Home Assistant
102 stars 16 forks source link

Config of AddOn #34

Closed Gabriele-tomai00 closed 1 year ago

Gabriele-tomai00 commented 1 year ago

Hi, where is the config of PSA in Home Assistant OS? I need to change config like energy price and weather (using openweathermap key). Thank

Flodu31 commented 1 year ago

Hello, You need to connect in SSH, and navigate to the folder. Get the path to the volume: docker inspect -f '{{ .Mounts }}' $(docker ps -aqf "name=acc") In the folder you will have files you are looking for Florent

Gabriele-tomai00 commented 1 year ago

I have not Docker, I use HA in virtual machine. I don't find PSA in addons folder (it's empty). I show you the folders: image

Flodu31 commented 1 year ago

So you are running the tool where? if it is not in docker? in another VM?

Gabriele-tomai00 commented 1 year ago

I have HA in a VM and PSA as addons from add-on store (I add it as add-on repositories). So, when HA recognized it, I installed it as a normal add on.

Flodu31 commented 1 year ago

Ok no idea so. I don't have this setup... Check on this repo: https://github.com/flobz/psa_car_controller

Gabriele-tomai00 commented 1 year ago

ok thanks

dreimer1986 commented 1 year ago

Add On Store IS Docker.

Gabriele-tomai00 commented 1 year ago

so?

Flodu31 commented 1 year ago

Follow what I said... connect with SSH, on port 22222

dreimer1986 commented 1 year ago

I already saw that you made a issue over at flobz' repo. That was the best idea as here the repo is for the configuation.yaml editing you need to address the Add-On in HA and not much more tbh. The parameters are not easily configurable when in a Docker.

https://github.com/flobz/psa_car_controller/issues/482 (just to link it ^^)

Lahim26 commented 1 year ago

+1 I need to set the country code: "ERROR :: Can't find country for None None"

Ilpo55 commented 1 year ago

Hi. In which file in the docker is the "energy price"?

flobz commented 1 year ago

@Flodu31 can you give me the result of the command 'docker inspect -f '{{ .Mounts }}' $(docker ps -aqf "name=acc")' please ? I will add a documentation for editing config file.

Flodu31 commented 1 year ago

Hello,

Here it is:

[{bind  /dev /dev  ro false rprivate} {bind  /mnt/data/supervisor/addons/data/b9f12d83_psacc /data  rw true rprivate}]
flobz commented 1 year ago

and the result of 'ls /mnt/data/supervisor/addons/data/b9f12d83_psacc' ? :)

Flodu31 commented 1 year ago
# ls /mnt/data/supervisor/addons/data/b9f12d83_psacc
activity.log                               info.db
activity.log.1                             info.db.bck
cars.json                                  info_backup_2021-07-02 18_39_17.715803.db
certs                                      mypeugeot.apk
charge_config.json                         options.json
config.ini                                 otp.bin
config.json
#
flobz commented 1 year ago

thanks for your help ! :)

flobz commented 1 year ago

Doc is done: https://github.com/flobz/psacc-ha/blob/main/psacc-ha/README.md#modify-config-file

Ilpo55 commented 1 year ago

Why do I get "no such file or directory"?

➜  ~ docker inspect -f '{{ .Mounts }}' $(docker ps -aqf "name=acc") | grep -o '/mnt/data[^ ]*psacc'
/mnt/data/supervisor/addons/data/b9f12d83_psacc
➜  ~ cd /mnt/data/supervisor/addons/data/b9f12d83_psacc
cd: no such file or directory: /mnt/data/supervisor/addons/data/b9f12d83_psacc
➜  ~
Ilpo55 commented 1 year ago

Doc is done: https://github.com/flobz/psacc-ha/blob/main/psacc-ha/README.md#modify-config-file

Looks that this is not working with HA-addon (Home Assistant Generic x86-64).

Alfagek commented 1 year ago

Same problem over here as @Ilpo55 is saying. Working with the HA Addon. Using the SSH addon, showing working directory. But when you want to go to it, it doesn't exist.

Working with HA as a VM in Proxmox.

Anyother sollution to get to the files @flobz ?

========================UPDATE ================================================ Maybe @Flodu31 / @flobz can update the documentation about the SSH part.

SSH in HA with the "Advanced SSH & Web Terminal" Addon (https://github.com/hassio-addons/addon-ssh) Type in commandline: "docker exec -it addon_b9f12d83_psacc bash" Now you are in the Docker container of PSA. Type: "cd .." Then "cd data" image Type the next command: "apt-get update" Then: "apt-get install nano" Then "nano config.ini" image

Ilpo55 commented 1 year ago

Before ssh disable protection mode in SSH & Web Terminal and restart it.

Alfagek commented 1 year ago

Before ssh disable protection mode in SSH & Web Terminal and restart it.

did forgot that part (always running here ;-).

But its working for you @Ilpo55 ?

Ilpo55 commented 1 year ago

But its working for you @Ilpo55 ?

Yes, I have used it since Feb-22. Look at https://github.com/flobz/psa_car_controller/discussions/249#discussioncomment-5074356

:-)

Alfagek commented 1 year ago

But its working for you @Ilpo55 ?

Yes, I have used it since Feb-22. Look at flobz/psa_car_controller#249 (reply in thread)

:-) Damn, didn’t found that. It had saved me 45 minutes 🤣