syssi / homeassistant-goecharger-mqtt

go-eCharger integration for Home Assistant using the MQTT API
Apache License 2.0
88 stars 18 forks source link

Connection Problem #176

Open golaso7 opened 5 days ago

golaso7 commented 5 days ago

Hello friends, iam a newbie and iam totaly lost. I tried it now for hours but cant find the problem:

The protocol in the Mosquitto broker always shows this:

2024-11-07 21:20:04: New connection from 192.168.178.75:64867 on port 1883. error: received null username or password for unpwd check 2024-11-07 21:20:04: Client go-echarger_215559 disconnected, not authorised.

syssi commented 5 days ago

Your go-e charger tries to connect to your MQTT broker without providing an username and password for authorization. You have to allow unauthorized connections or add a username and a passwort to your MQTT connection setting.

golaso7 commented 5 days ago

Thank you, but i have no idea how to do that. In the app of goe-charger there is no option to set a username or something and in the Mosquitto broker in HA i cant find the option to allow unauthorized connections. Actually I googled that the Mosquitto broker didnt allow that anymore???

syssi commented 5 days ago

Do you know how to create a user including the password at the broker? Username and password can be encoded into the URL at the Android app:

mqtt://username:password@ipaddress:port
golaso7 commented 1 day ago

Awesome, it works. Thank you :-)

Aquithor commented 1 day ago

Hi guys, I also have the problem that I can't get a connection from the go-e charger. I have connection errors : error_type=TCP_TRANSPORT and connect_return_code=ACCEPTED. This seems contradictory to me. My URL is: mqtt://homeassistant.192.16x.xxx.xxx:1883, prefix: go-eCharger/xxxxx/, MQTT Homeassistant activated, MQTT Homeassistant prefix activated: homeassistant/. Can anyone help me? I am new to this and have no experience. Thank you in advance.

syssi commented 1 day ago

Your MQTT URL doesn't look well formed. The @ between the credentials and the hostname is important and the : between the username and the password.

Aquithor commented 2 hours ago

Hi syssi, thank you for your help. Unfortunately, I forgot the @ when writing. I now have the problem that it does not allow me to enter a password in the configuration of the MQTT broker. It always says “Connection not established”. Without this entry, however, I cannot enter the correct data in the go-e charger either.

syssi commented 1 hour ago

I cannot help here. How do you manage your MQTT broker? Could you provide some screenshots? I've installed my mosquitto broker manually (apt-get install mosquitto) on a linux host and can manage credentials using mosquitto_passwd.