MickMake / GoSungrow

GoLang implementation to access the iSolarCloud API updated by SunGrow inverters.
https://mickmake.com/
GNU General Public License v2.0
148 stars 42 forks source link

MQTT-password with special character # doesn't work #85

Open khkissel opened 9 months ago

khkissel commented 9 months ago

If the mqtt-password contains hashes, like #Go#Sungrow1-8883 or Go#Sungrow1-8883, the connect to the mqtt-broker won't work and the resulting error message is misleading.

| --mqtt-password   |            | GOSUNGROW_MQTT_PASSWORD   | HASSIO: mqtt password.         | #Go#Sungrow1-8883                  |
| --mqtt-host       |            | GOSUNGROW_MQTT_HOST       | HASSIO: mqtt host.             | 192.168.1.22                       |
| --mqtt-port       |            | GOSUNGROW_MQTT_PORT       | HASSIO: mqtt port.             |                               8883 |

./GoSungrow mqtt run
ERROR: network Error : dial tcp: lookup GoSungrow1 on 192.168.1.1:53: no such host
| --mqtt-user       |            | GOSUNGROW_MQTT_USER       | HASSIO: mqtt username.         | GoSungrow1                         |
| --mqtt-password   |            | GOSUNGROW_MQTT_PASSWORD   | HASSIO: mqtt password.         | Go#Sungrow1-8883                   |
| --mqtt-host       |            | GOSUNGROW_MQTT_HOST       | HASSIO: mqtt host.             | 192.168.1.22                       |
| --mqtt-port       |            | GOSUNGROW_MQTT_PORT       | HASSIO: mqtt port.             |                               8883 |

/GoSungrow mqtt run
ERROR: parse "tcp://GoSungrow1:Go": invalid port ":Go" after host
clintebbesen commented 1 month ago

oh thank you! can confirm special characters do not work and the error is very misleading. I created a new mqtt user with a basic password and it worked fine