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

fix(mqtt): Simplify MQTT connect/subscribe #106

Closed mman closed 3 days ago

mman commented 1 month ago

This PR unifies Influx Loader MQTT connection logic in that it uses the same code path when connecting directly to Venus and when connecting to VRM.

When connecting to VRM it uses the recommended Token .... auth mechanism and mqtts protocol, instead of the old method of requesting temporary JWT token via /v2/auth/generatetoken API.

Closes https://github.com/victronenergy/venus-influx-loader/issues/95 Closes https://github.com/victronenergy/venus-influx-loader/issues/96 Closes https://github.com/victronenergy/venus-influx-loader/issues/107

Docker image with the changes published as: sodaengine/venus-influx-loader:develop

@wiebeytec, @dirkjanfaber If you could guys please take a look and do a review for me, I will appreciate...