victronenergy / venus-influx-loader

NodeJS server that takes from MQTT into Influx, and config UI and still more
MIT License
12 stars 4 forks source link

Bug: Fix VRM connection logic #96

Closed mman closed 3 days ago

mman commented 1 month ago

Quoting @wiebeytec:

I also see an (unused?) hostname mqtt.victronenergy.com. This works currently by accident, but is not compatible with our server sharding. See Determining the broker URL for a given installation.

Also, it uses VRM tokens to request JWTs, but the auth scheme Token ${app.config.secrets.vrmToken} works with MQTT too nowadays. See Connecting to the VRM MQTT servers. This also helps in preventing expiring JWTs.

This needs to be addressed.

mman commented 1 month ago

So point 1 calculating proper VRM MQTT instance is actually addressed correctly, see here:

https://github.com/victronenergy/venus-influx-loader/blob/d18ce6ebd83f98422aeaf3bd8cc788cc22a2b8f6/src/server/loader.js#L273-L280

and it works as required...

mman commented 1 month ago

Point 2 addressed by: https://github.com/victronenergy/venus-influx-loader/pull/106

wiebeytec commented 1 month ago

I guess this mention of mqtt.victronenergy.com gave me the wrong impression. I guess it should be removed.