How to write to InfluxDB2 using hivemq-influxdb-extension

Hi all,
I just set up a fresh InfluxDB2 (current version 2.2) and created a bucket to collect some hivemq metrics.
As far as I understood, writing to my bucket involves usage of the token, which was created during database setup …
The only way to do so I found out in hivemq-influxdb-extension configuration is to use

mode:cloud

and properly configure the token and organization to use.

When trying to write to the bucket I get following error:

c.i.m.influxdb.InfluxDbReporter:258      - Unable to report to InfluxDB with error 'Unsupported or unrecognized SSL message'. Discarding data.

Taking a brief glance to hivemq-influxdb-extension source code, I realized that hivemq-influxdb-extension uses https to write data (which makes somehow sense if writing to a cloud via internet …).
Now, my database is local, why i haven’t enabled https.

Hm …, so I tried the other way and configured:

mode:http
auth:my-username:my-secret-password

Doesn’t work either, this time I get the following error:

c.i.m.influxdb.InfluxDbReporter:258      - Unable to report to InfluxDB with error 'Server returned HTTP response code: 401 for URL: http://influxdb:8086/write?db=spotcontrol&precision=s with content :'Unauthorized''. Discarding data.

I guess, because InfluxDB does not support this kind of writing since version 2.0 …?

What would be your suggestion for this case?

Best regards,
janosch

Everything works fine with influxdb 2.6, set mode to cloud