Thanks for the reply @Anaisdg, article is useful thanks. Also found this one:
Seems WiFi shield is the way to go. Still wonder if its possible to get data into InfulxDB via USB. I suppose the benefit might be lower cost than an additional WiFi module, and possibly simpler code, just Serial.print()…
When you talk about getting the data over USB, are you using a Serial → USB convertor? More specifically, is the serial port available to a Linux box as a tty serial device?
If yes, then I sort of solved this and left some notes on this issue:
If the serial port can be read as a file, then you can use the “tail” plugin in Telegraf to read the file device directly and read the data.
Using Python is certainly an option, and the Python client library will make that easier.
But… I think Telegraf adds a lot of value here. It will handle the batching for you, and it will handle network unreliability and automatically cache and retry. You can also use Telegraf to do some basic processing of the data as read from the serial device.
It’s personal preference of course, but in my limited experience investing a bit of time in getting Telegraf to do what you want will make life easier for you in the future.