-
Notifications
You must be signed in to change notification settings - Fork 694
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
Idiot's guide to getting this working on a Synology NAS #113
Comments
Awesome. Thanks for the detailed instructions! I'll pin this issue so others can find it easily. |
My pleasure and thanks for making it.
One question- it has yet to show my car in anything but online, driving, or charging state. What settings do I need on the car do it will sleep?
All the best,
Dave
Sent from my iThingy - Sorry for any typos.
… On Aug 25, 2019, at 08:40, Adrian Kumpf ***@***.***> wrote:
Awesome. Thanks for the detailed instructions! I'll pin this issue so others can find it easily.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Does your car have the MCU1 which has the "old" energy management system? If so make sure to disable "Always connected" in the energy saving settings. Additionally this article could be helpful to identify the problem. |
Yes it is mcu1. Will try that.
Sent from my iThingy - Sorry for any typos.
… On Aug 25, 2019, at 08:50, Adrian Kumpf ***@***.***> wrote:
Does your car have the MCU1 which has the "old" energy management system? If so make sure to disable "Always connected" in the energy saving settings. Additionally this article could be helpful to identify the problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Just a small suggestion. A large portion of this guide seems to be creating the docker compose file and getting it on your synology. Instead of creating it windows, transferring it to your NAS and then moving it to the appropriate directory, either just create it on your synology via the command line. It is quite simple.
|
This isn't working for me. I create the docker file and when the Teslamate instance comes up, it complains saying the Postgres role "teslamate" doesn't exist. Is teslamate instance supposed to do that for us? The instance keeps restarting, by the time I open a console.. the instance dies and I can't even try to create the db myself. |
Thanks all for those detailled instructions ! Is it safe to change ownership on the @docker folder ? As you instructed to install using root, my admin account has no access, so no way to run a backup or a snapshot.. |
I'm having issues after a few failed installs. Now I'm getting everything to work, but the existing database fell out of sync. I'm getting a password failed error in the teslamate docker container. What's odd is that I attempt to delete the teslamate_db volume, but i'm still getting errors after a new compose. I've tried to locate the DB on my NAS and can't find it to delete the old DB or password config file, or anything. Can I get some assistance? 15:13:58.024 [error] Postgrex.Protocol (#PID<0.231.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "teslamate" |
I struggled with these for a while and found out the configuration above is a bit off... Here is what I used that worked for me. version: '3' db: grafana: mosquitto: volumes: |
I finally got it working after digging through various sections of the github and doing some research on various commands and the synology (it's been a few years since I did any heavy linux programming, so some of the issues were me tracking down commands). Below are my "idiot proof" instructions for how to get this running on a home LAN with a synology and a Windows10 PC.
Login to your Synology, go to the package center and install Docker
Open your windows notepad and create your docker-compose.yml file. It should look like:
REMOVED (find latest version here: https://docs.teslamate.org/docs/installation/docker)
Now edit the file as follows:
a. change localhost in the VIRTUAL_HOST line to whatever the local LAN IP address is for your synology (hopefully you have set your router to make that a static IP address). Should be something like 192.168.1.XXX
b. change the TZ to equal the timezone where your synology resides. A list of the time zone codes that work can be found at List of tz database time zones - Wikipedia.
Now save the file to your computer. It may be that Windows saves it as docker-compose.yml.txt. I had to go in and manually rename it, deleting the .txt part. It asked me if I wanted to change the file type and I said yes. No impact on it after that and I could still open it up with notepad.
Now you need to transfer the file to Synology. If you can FTP to your synology, it's easy. If not, do the following:
a. Open "File Station" in the Synology desktop.
b. Navigate to a folder that is easy to get to (say a top level folder like "files"
c Right click your mouse, select upload to and upload your file from your windows pc. It should now be sitting in your "files" directory (or wherever you put it).
Next you need to set up your synology so you can SSH to it. If you have already done this, skip this step. Otherwise, go to Control Panel->Terminal & SNMP and in the Terminal tap, check the box to enable SSH Service, leave the default port of 22 selected.
Now go back to your Windows box and open up an SSH terminal. In my box I did it by clicking the Windows and the X keys and then selecting Windows Powershell
In the command prompt, I typed ssh admin@synologylocal address (I used
ssh admin@servername.local
but you should also be able to typessh admin@192.168.1.XXX
(whatever your synology ip address is)).You will then get a prompt to enter the admin password. Type in the admin password for your synology and hit enter.
10.You should get a display showing something like "admin@servername:/$" -- this is the synology SSH prompt.
Type
sudo -i
(this changes you to root access to the synology box)You will get a password prompt...type in your admin password again
You will now get a prompt that looks like root@servername:
Now change directories to your docker directory. Type
cd /volume1/@docker
(note the @ before docker)Your prompt will now show
root@servername:/volume1/@docker#
Now it gets fun....you need to move your docker-compose.yml file to the @docker directory (which you can't access or see from the File Station synology app), so you need to move it via linux commands. The command to type is
mv /volume1/files/docker-compose.yml /volume1/@docker/docker-compose.yml
Note there is a space between mv and the first file location and between that location and the destination file location. In linux, everything is case-sensitive, so if your files directory is named "Files" then you need to write it that way.Type dir and, if you are successful, you will see docker-compose.yml in the current (@docker) directory.
You've now done the hard stuff. Next you type the command to download and install the packages. The command is
docker-compose up -d
(note the space after compose and up and the space between up and -d. You DO NOT type .yml after docker-compose. If you did everything right, things will run and scroll for several minutes as it downloads multiple packages and installs them. At the very end you will get some "dones" and be back to your root@servername: prompt.Go back to your synology web interface and open the Docker app. In the overview tab you should see 4 containers running: docker_db_1, docker_grafana_1, docker_mosquito_1, and docker_teslamate_1.
Now in your PC web browser, you want to type: synologyIP address:4000 (should be something like 192.168.0.123:4000). The TeslaMate interface will open. Type in your TESLA email address and password (just like when you login to the car app). It will open up a page which shows you the current status of your car. Note it defaults to kilometers and degrees C but you can change that on the settings page.
Now in your PC web browser, type in synologyIP address:3000 (should be something like 192.168.0.123:3000. This will open up Grafana which is where you can see all the charts. Various charts are on the left. Most are blank until you do something with your car/time goes by, but it will start populating. If you click on the "position" chart, it should open a map with a red dot where your car currently is. If you can see that, it is getting data from the car!
Realize this is a long post but figured these instructions would be helpful to those with a Synology who have never done this kind of thing before. @adriankumpf - This is really a great piece of work. If desired, you can post these instructions somewhere on your github page as well (I didn't want to assume anything and post them there).
The text was updated successfully, but these errors were encountered: