reserve85 / HoymilesZeroExport

Zero Export Script for Hoymiles Inverters using AhoyDTU / OpenDTU and Tasmota Smart Meter inferface / Shelly 3EM / SHRDZM / Emlog / ioBroker
GNU General Public License v3.0
135 stars 31 forks source link

mqtt not authorised error... #193

Closed MavenCH closed 4 months ago

MavenCH commented 4 months ago

Hello everyone. I hope someone can help me here.

The script works very well as far as I can see and I am very satisfied. Many thanks already :) Unfortunately, however, the MQTT service does not work. I think I have at least filled in everything in the config but it does not work.

Uncomment the following section if you want to use MQTT to dynamically reconfigure some settings while the script is running

[MQTT_CONFIG] MQTT_BROKER = 192.168.1.9 MQTT_PORT = 1883 MQTT_CLIENT_ID = HoymilesZeroExport MQTT_USERNAME = mqtt_zero MQTT_PASSWORD = Am0mqttZ

The script subscribes to the following topics:

- zeropower/set/powermeter_target_point: To change the target point of the powermeter

- zeropower/set/powermeter_max_point: To change the max point of the powermeter

- zeropower/set/powermeter_tolerance: To change the tolerance of the powermeter

- zeropower/set/on_grid_usage_jump_to_limit_percent: To change the on grid usage jump to limit percent

- zeropower/set/inverter/0/min_watt_in_percent: To change the min watt in percent of the first inverter

- zeropower/set/inverter/0/normal_watt: To change the battery normal watt of the first inverter

- zeropower/set/inverter/0/reduce_watt: To change the battery reduce watt of the first inverter

- zeropower/set/inverter/0/battery_priority: To change the battery priority of the first inverter

MQTT_SET_TOPIC = zeropower/set MQTT_RESET_TOPIC = zeropower/reset

I have also tried to remove the # from the areas that are currently still marked with #, but this has also had no effect. But I believe that these are needed.

Even when I run "sudo journalctl -u HoymilesZeroExport.service -n 20000 -e -f" I get no error message. The only error message I get is from the MQTT server in Home Assistant.

2024-05-03 17:27:04: New connection from 192.168.1.228:35253 on port 1883. 2024-05-03 17:27:04: Client HoymilesZeroExport disconnected, not authorised.

My Home Asisstant version is: 2024.4.4 My Mosquitto broker version is: 6.4.0

I am 100% sure that the password is correct because this data is also used for the Ahoy and it works there.

I would be grateful for any help.

Many thanks

MavenCH commented 4 months ago

I have now understood that the MQTT interface is not for capturing the change to the script it is making but for making changes.

But I was looking for a solution that shows me e.g. in Home Assistant when the power limit was adjusted and to what. Actually the output you get from the script with the command "sudo journalctl -u HoymilesZeroExport.service -n 20000 -e -f".