Fabian-Schmidt / esphome-victron_ble

Use official Victron BLE endpoint for fetching data from Victron devices via Bluetooth LE via ESPHome.
GNU General Public License v3.0
152 stars 15 forks source link

MAC Address Lookup (OSX) #10

Closed chuyskywalker closed 1 year ago

chuyskywalker commented 1 year ago

I had a devil of a time setting this up because the commands on the linked victron python page (which interact with the sqlite database) on OSX return some weird uuid like looking code for "mac address". This code, however, is NOT a mac address and the esphome yaml rejects it.

Instead, based on this insight i found you could run the command:

system_profiler SPBluetoothDataType

Which does list the right style mac address. It would be useful to mention this in the instructions.

Fabian-Schmidt commented 1 year ago

I don't have access to any Macintosh OS devices.

Can you provide a quick guide/steps so I can add them?

chuyskywalker commented 1 year ago

After installing the Victron app so that I could extract the key (as per the instructions), I just opened the terminal.app program and ran the command above. In the output from that command the Victron Bluetooth item shows up along with it's (legitimate) mac address.

whatdoesthatdo commented 1 year ago

I had the same issue on OSX when trying to get the mac address but the following command when run in the Terminal will give you the mac address and bindkey.

sqlite3 ~/Library/Containers/com.victronenergy.victronconnect.mac/Data/Library/Application\ Support/Victron\ Energy/Victron\ Connect/d25b6546b47ebb21a04ff86a2c4fbb76.sqlite 'select macAddress, advertisementKey from advertisementKeys'
ErikThiart commented 1 year ago

+1 wasted hours on this.

Wish I knew about system_profiler SPBluetoothDataType sooner

Fabian-Schmidt commented 1 year ago

Readme updated with more details for obtaining mac and key.