Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
127 stars 25 forks source link

Allow configuration of mqtt client name to allow for multiple instances #93

Closed kevinanderson1 closed 10 months ago

kevinanderson1 commented 10 months ago

Is your feature request related to a problem? Please describe.

My family has two Volvo C40's that I would like to integrate in with Home Assistant. Ideally I would be able to run two instances (containers) of volvo2mqtt so that both C40's can be integrated in to Home Assistant. This currently fails because the volvo2mqtt instance hardcodes the mqtt client name in src/mqtt.py to be volvoAAOS2mqtt and mqtt client names must be unique.

Describe the solution you'd like

Accept a configuration parameter for the mqtt client name.

Describe alternatives you've considered

None.

Additional context

I've manually built a second container with the name hardcoded to something else and have been running it without any issues.

Dielee commented 10 months ago

Are your C40s running with different Volvo accounts?

kevinanderson1 commented 10 months ago

Yes each car is tied to a different Volvo account.

On Mon, Aug 28, 2023, 1:05 AM Linus Dietz @.***> wrote:

Are your C40s running with different Volvo accounts?

— Reply to this email directly, view it on GitHub https://github.com/Dielee/volvo2mqtt/issues/93#issuecomment-1695015574, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGE37U5IGBSHSOYEGS6IPTXXQRKLANCNFSM6AAAAAA4ATFF5U . You are receiving this because you authored the thread.Message ID: @.***>

Dielee commented 10 months ago

Okay. I will implement an auto generating unique ID for each instance. So there will be no user input required.

kevinanderson1 commented 10 months ago

Thank you! I took a quick attempt at implementing a user configurable option in a PR but I can close that out later today.

On Mon, Aug 28, 2023 at 6:59 AM Linus Dietz @.***> wrote:

Okay. I will implement an auto generating unique ID for each instance. So there will be no user input required.

— Reply to this email directly, view it on GitHub https://github.com/Dielee/volvo2mqtt/issues/93#issuecomment-1695490154, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGE37SXDN7KEWZVSFF6KWDXXR2ZXANCNFSM6AAAAAA4ATFF5U . You are receiving this because you authored the thread.Message ID: @.***>

Dielee commented 10 months ago

Yes, thanks a lot, but the configuration is already a mess. I try to avoid any addition...

Dielee commented 10 months ago

One more question: If you are using different volvo accounts, your login username differs, right ?

kevinanderson1 commented 10 months ago

Yes they are different login email addresses.

On Mon, Aug 28, 2023 at 8:50 AM Linus Dietz @.***> wrote:

One more question: If you are using different volvo accounts, your login mail differs, right ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Dielee commented 10 months ago

You are not using the HA Addon, right ?

kevinanderson1 commented 10 months ago

No I am not. I have the instances deployed in containers and managed under systemd units.

On Mon, Aug 28, 2023 at 9:05 AM Linus Dietz @.***> wrote:

You are not using the HA Addon, right ?

— Reply to this email directly, view it on GitHub https://github.com/Dielee/volvo2mqtt/issues/93#issuecomment-1695666666, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGE37S22KUCV2K35M3VTALXXSJRVANCNFSM6AAAAAA4ATFF5U . You are receiving this because you authored the thread.Message ID: @.***>

Dielee commented 10 months ago

v1.8.6 is building :)

kevinanderson1 commented 10 months ago

Thank you! I'll update this evening and report back.

On Mon, Aug 28, 2023 at 9:10 AM Linus Dietz @.***> wrote:

v1.8.6 is building :)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Dielee commented 10 months ago

Build is done. Feel free to test later today!

kevinanderson1 commented 10 months ago

I can confirm that the testing was successful! Thank you for the quick response and for your work!