Hi,
I’d like to point out that some of the links you provide in the tutorial for Grafana integration (https://www.bigclown.com/doc/integrations/grafana-for-visualization/) aren’t working anymore, specifically in the “Connect Mosquitto and InfluxDB” part.
Nonetheless, I’ve been thinking about the problem and came to the conclusion that the solution you provide is little too cumbersome (installing a Python script as a service with a InfluxDB as a dependency), since you can do the same thing trivially with Node-RED which anyone following your tutorials already has up and running.
Here is a simple flow you can use, all you have to do is change the database name in the HTTP node’s URL:
[{"id":"2e2be1c.86ee19e","type":"tab","label":"Air Quality","disabled":false,"info":""},{"id":"71ea288b.339e98","type":"mqtt in","z":"2e2be1c.86ee19e","name":"Air quality","topic":"node/kit-co2-monitor:0/#","qos":"2","broker":"c9395d0f.8a4a7","x":320,"y":420,"wires":[["d809390.f48a2c8","8a9e2e0b.b089c"]]},{"id":"d809390.f48a2c8","type":"function","z":"2e2be1c.86ee19e","name":"MQTT to InfluxDB","func":"var tokens = msg.topic.split(\"/\");\nvar measurement = tokens[tokens.length - 1]\n\nmsg.payload = measurement + \" value=\" + msg.payload;\n\nreturn msg;","outputs":1,"noerr":0,"x":550,"y":420,"wires":[["5ebd3fed.e54a8","21703b2c.11257c"]]},{"id":"5ebd3fed.e54a8","type":"http request","z":"2e2be1c.86ee19e","name":"Post to InfluxDB","method":"POST","ret":"txt","url":"http://localhost:8086/write?db=air_quality","tls":"","x":800,"y":420,"wires":[["89a0644e.43217"]]},{"id":"89a0644e.43217","type":"debug","z":"2e2be1c.86ee19e","name":"","active":false,"console":"false","complete":"true","x":1010,"y":420,"wires":[]},{"id":"21703b2c.11257c","type":"debug","z":"2e2be1c.86ee19e","name":"","active":false,"console":"false","complete":"payload","x":790,"y":480,"wires":[]},{"id":"8a9e2e0b.b089c","type":"debug","z":"2e2be1c.86ee19e","name":"","active":false,"console":"false","complete":"true","x":510,"y":480,"wires":[]},{"id":"c9395d0f.8a4a7","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]