yoziru / esphome-tesla-ble

Interact with Tesla vehicles over BLE using ESPHome and Home Assistant
GNU Affero General Public License v3.0
88 stars 17 forks source link

ESPHome in HA not resolving correct mDNS name #70

Closed pvmil closed 2 months ago

pvmil commented 2 months ago

-- thanks a lot for this software! in a first test I was able to set the charge level --

Description

When updating the software on my M5Stack NanoC6 in the Home Assistant ESPHome dashboard it tries to connect to the wrong device name.

What did I try

Error situation

While uploading software (after compile) it tries to resolve the IP address using tesla-ble.local instead of tesla-ble-xxxxxx.local. Is this a problem on my end, or does can the config as supplied on GitHub be improved?

Error message: ERROR Error resolving IP address of tesla-ble.local. Is it connected to WiFi?

My configuration:

`external_components: source: github://yoziru/esphome-tesla-ble/packages/external_components.yml@main

packages: base: url: https://github.com/yoziru/esphome-tesla-ble/ ref: main files: packages/base.yml refresh: 0s device_base: url: https://github.com/yoziru/esphome-tesla-ble/ ref: main files: boards/m5stack-nanoc6.yml refresh: 0s client: url: https://github.com/yoziru/esphome-tesla-ble/ ref: main files: packages/client.yml refresh: 0s

---- listener: !include packages/listener.yml # Uncomment this to scan find your VIN BLE MAC address

what is this?

dashboard_import:

package_import_url: https://raw.githubusercontent.com/yoziru/esphome-tesla-ble/main/tesla-ble-m5stack-nanoc6.dashboard.yml`

edit: cleaned-up comments

pvmil commented 2 months ago

Mmmm, I've been reading more in this repo. I guess I have to use the .dashboard.yml version.

I will give that a try Wednesday and report back results.

pvmil commented 2 months ago

I got it compiled using tesla-ble-m5stack-nanoc6.dashboard.yml instructions, not yet able to adopt it now. More experimenting coming weekend

pvmil commented 2 months ago

It did not adopt to conflicting naming (identical to the manually configured instance, that has been fixed by removing the old instance. My problem is solved

If I check my config now it shows:

`substitutions: name: tesla-ble-1e53f4 friendly_name: Tesla BLE 1e53f4 packages: yoziru.esphome-tesla-ble: github://yoziru/esphome-tesla-ble/tesla-ble-m5stack-nanoc6.dashboard.yml esphome: name: ${name} name_add_mac_suffix: false friendly_name: ${friendly_name} api: encryption: key: abcdefghijklmnop

wifi: ssid: !secret wifi_ssid password: !secret wifi_password `

While I started of by configuring a new device like you can see below,, before it showed up for adoption: `external_components: source: github://yoziru/esphome-tesla-ble/packages/external_components.dashboard.yml@main

packages: base: url: https://github.com/yoziru/esphome-tesla-ble/ ref: main files: packages/base.yml refresh: 0s # This seems to not have affect device_base: url: https://github.com/yoziru/esphome-tesla-ble/ ref: main files: boards/m5stack-nanoc6.yml refresh: 0s # This seems to not have affect; client: url: https://github.com/yoziru/esphome-tesla-ble/ ref: main files: packages/client.yml refresh: 0s # This seems to not have affect;

wifi:

use_address: 192.168.1.123

dashboard_import: package_import_url: github://yoziru/esphome-tesla-ble/tesla-ble-m5stack-nanoc6.dashboard.yml `

and I filled the secrets file with the required fields:

wifi_hotspot_password: "123456789" ota_password: "123456789" api_encryption_key: "abcdefghijkl" ble_mac_address: "xx:xx:xx:xx:xx:xx" #TESLA tesla_vin: "5Y1234567890abcde" # TESLA VIN