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

MQTT setup with Home Assistant #730

Closed
jun3280net opened this issue May 19, 2020 · 4 comments
Closed

MQTT setup with Home Assistant #730

jun3280net opened this issue May 19, 2020 · 4 comments

Comments

@jun3280net
Copy link

A couple days ago, I was forced to migrate from my existing home automation hardware (Wink). I spun up a new VM to run Home Assistant, and was pleasantly surprised with all the capabilities. Rather than run 2 separate VMs (Teslamate and Home Assistant), I migrated my Teslamate setup to the Home Assistant VM. So far everything is working well. Home Assistant already runs an MQTT server, so I ended up disabling the MQTT container from the docker-compose file. I am hoping to share the Teslamate MQTT data with Home Assistant, but I don't even know if I'm setting up my docker-compose file properly.

In searching through the Issues, list, I can see a number of the members are leveraging the MQTT and Home Assistant. I was wondering if someone would gracious enough to share their docker-compose / Home Assistant configuration - please and thanks. How can I get the Tesla data to show up as an Entity in Home Assistant?

My docker-compose looks like the following :
image
image
image

Home Assistant MQTT Configuration
image

I'm getting the following error from Teslamate
image

@jun3280net
Copy link
Author

To clarify - Home Assistant is running its own docker with MQTT running inside. Teslamate is running in its own docker instance. They both reside on the same VM so they share the same IP. However, it appears Teslamate is unable to "bind" to the other Home Assistant network. Portainer shows all the containers running as follows :

image

@Dulanic
Copy link
Collaborator

Dulanic commented May 22, 2020

Feel free to close since you got it worked out as per discord.

@jun3280net
Copy link
Author

Turns out a fresh install of Teslamate fixed the issue. I honestly, don't know what the issue was - but maybe it was formatting/syntax.

To debug my issue, first I tried the basic installation of Teslamate with the MQTT container removed from the docker-compose and the MQTT_Host pointed to the IP Address of Home Assistant. This worked as hoped. It should be noted though - you are not able to retrieve the Teslamate MQTT data using an MQTT Client. However, your MQTT Server logs should show a connection from Teslamate.

image

For reference, my docker-compose looks like this (MQTT_USERNAME and MQTT_PASSWORD are optional and dependent on how you setup your server) :

image
image
image

Assuming all goes well, you won't be seeing the MQTT publishing errors I was getting.

You can copy the the awesome Home Assistant guide verbatim here to see the Teslamate MQTT data :
https://docs.teslamate.org/docs/integrations/home_assistant

@RonSpawnson
Copy link

FYI I think your initial issue was you named the env variable "MQTT_PASS" rather than "MQTT_PASSWORD".

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

No branches or pull requests

4 participants