I'm sorry if this is the wrong place to post/ask. I have followed every link here including the 'Bravo working in minutes post' and the 'Docker step by step guide' but I must be an idiot or there's some super obvious step missing...
I am trying to get TeslaMate running on a Synology DS918+ via Docker. I already have other Docker apps working (sab, sonarr).
I first tried to easy option - searched Synology's Docker Registry and found teslamate/teslamate. Installed it. Launched to get to Settings and then tried both the Auto port and forcing port 4000. Tried using a browser to put in my IP:4000 and got a can't connect error in Safari. I saw no way to alter any files when using that downloaded image and it never created a directory in the /docker folder on the Synology.
I then followed the 'step by step guide' though that was aimed at a server. I tried to download a zip file of the files on the opening Github page here, uploaded those to docker/teslamate-master and then ftp'ed in my docker-compose.yml file that I created in Mac TextEdit and then changed the filename once on the Synology from docker-compose.yml.rtf by remove the second extension. I then used Terminal to SSH into the Synology and tried the docker-compose up -d command in the docker/teslamate-master directory but got an error on line 1, column 1 about expecting a ' or { but seeing a } (at least I think that was the error).
Anyway, any help would be greatly appreciated.
Thanks in advance and sorry if this is the wrong location for this.
@eoren1
Hi! Glad you see you're giving this a shot.
I did something similar by getting the grafana stuff from the Synology registry. This isn't the way to go though. I'd delete those and start fresh. I'd also delete the teslamate-master directory you say you have created as you won't need to pull down anything.
I'm comfortable using vi or vim while logged into the Synology server via SSH/terminal so I created my docker-comopse.yml file that way. Do what your comfortable with. Let's say you have already created the .yml file on your Mac. You'll just need a way to get that to the right directory on your Synology NAS
Try this:
sudo -icd /volume1/@dockerdocker-compose up -dWhen you issue the docker-compose up -d command it creates the docker containers and everything for you. Awesome, right?! :)
Let's start with that and let me know how that goes.
Thanks for the quick reply!
Okay - here goes another dumb question - when I am copying the file to volume1/@docker, if I do that using the Synology or CyberDuck FTP, that's just the base docker folder - right?
Nevermind. Not sure how I missed it but this is a step-by-step (with handholding) tutorial for installing. It answered my question above about the method of moving. Post #22:
I spoke too soon. Followed all the steps including using Terminal to move the file to @docker but got this when I typed docker-compose up -d:
ERROR: yaml.parser.ParserError: while parsing a flow mapping
in "./docker-compose.yml", line 1, column 1
expected ',' or '}', but got '{'
in "./docker-compose.yml", line 2, column 1
Can you post the contents (redact any sensitive data) of your docker-compose file?
While logged on, you can run cat docker-compose.yml to see it how the "system" sees it. There may be some weird special characters in there.
Here's a copy/paste. I added XX for last two digits of my internal NAS IP (not that it matters)
version: '3'
services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=db
- MQTT_HOST=mosquitto
- VIRTUAL_HOST=192.168.1.XX
- TZ=America/New_York
ports:
- 4000:4000
cap_drop:
- all
db:
image: postgres:11
restart: always
environment:
- POSTGRES_USER=teslamate
- POSTGRES_PASSWORD=secret
volumes:
- teslamate-db:/var/lib/postgresql/data
grafana:
image: teslamate/grafana:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=secret
- DATABASE_NAME=teslamate
- DATABASE_HOST=db
ports:
- 3000:3000
volumes:
- teslamate-grafana-data:/var/lib/grafana
mosquitto:
image: eclipse-mosquitto:1.6
restart: always
ports:
- 1883:1883
volumes:
- mosquitto-conf:/mosquitto/config
- mosquitto-data:/mosquitto/data
volumes:
teslamate-db:
teslamate-grafana-data:
mosquitto-conf:
mosquitto-data:
And here is the result of that cat command
/volume1/@docker# cat docker-compose.yml
{\rtf1\ansi\ansicpg1252cocoartf1671cocoasubrtf600
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{colortbl;\red255\green255\blue255;}
{*\expandedcolortbl;;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
\f0\fs24 cf0 version: '3'\
\
services:\
teslamate:\
image: teslamate/teslamate:latest\
restart: always\
environment:\
- DATABASE_USER=teslamate\
- DATABASE_PASS=secret\
- DATABASE_NAME=teslamate\
- DATABASE_HOST=db\
- MQTT_HOST=mosquitto\
- VIRTUAL_HOST=192.168.1.XX\
- TZ=America/New_York\
ports:\
- 4000:4000\
cap_drop:\
- all\
\
db:\
image: postgres:11\
restart: always\
environment:\
- POSTGRES_USER=teslamate\
- POSTGRES_PASSWORD=secret\
volumes:\
- teslamate-db:/var/lib/postgresql/data\
\
grafana:\
image: teslamate/grafana:latest\
restart: always\
environment:\
- DATABASE_USER=teslamate\
- DATABASE_PASS=secret\
- DATABASE_NAME=teslamate\
- DATABASE_HOST=db\
ports:\
- 3000:3000\
volumes:\
- teslamate-grafana-data:/var/lib/grafana\
\
mosquitto:\
image: eclipse-mosquitto:1.6\
restart: always\
ports:\
- 1883:1883\
volumes:\
- mosquitto-conf:/mosquitto/config\
- mosquitto-data:/mosquitto/data\
\
volumes:\
teslamate-db:\
teslamate-grafana-data:\
mosquitto-conf:\
mosquitto-data:}
I'm guessing the top area is a result of using TextEdit and that is what is messing me up. Any other suggestions for a Mac user?
The top area is because you've saved it in Rich Text Format (RTF) rather than plain/ASCII format. I'm not a mac user so I can't help you there, but try looking for alternative formats to save the file in. In particular, you want plain text format.
Yes, that is definitely a problem. I'm going to assume you're not comfortable with using vi in the terminal? You have a bunch of extra stuff at the beginning of the file. Here are some steps to try:
1) Copy the text only (that you pasted above) to your clipboard.
2) Run in the terminal: mv docker-compose.yml docker-compose.old.yml
3) Run in the terminal: vi docker-compose.yml
4) Once vi opens, hit i on the keyboard (to put you into insert mode)
5) In your terminal, right click (this should paste the entire contents into your file). If it doesn't, whatever terminal you're using try to find out how to paste.
6) Once it's pasted, hit the ESC key, then type :wq
Try again
Thank you both and I figured it out. I have a web server so I logged into cPanel, File Manager, created the docker-compose.yml file and used that editor to copy/paste the text. Did the mv again and it is WORKING!
One minor issue - when I try to change from Km and C in the Settings, Safari hangs and has to be force-quit
Interestingly, no issues changing those settings when I switched to Chrome on Mac
One minor issue - when I try to change from Km and C in the Settings, Safari hangs and has to be force-quit
I thought this had to do with this setting:
VIRTUAL_HOST=192.168.1.XX
Is this how you're accessing it (using the IP address)? Or are you accessing it via name (in which case I think you should change that setting to whatever name you're using)
No - I'm using the correct IP address. Someone said to remove any private info before pasting my yml file so I changed the last two digits of the internal IP (not that it matters)
And I access with IP address (numbers):4000
Chrome worked fine. Safari hung twice with the attempt to change units in Settings