InfluxDB-Client-for-Arduino icon indicating copy to clipboard operation
InfluxDB-Client-for-Arduino copied to clipboard

Any way to use TinyGSM as a Fallback to ESP8266WiFi Library

Open pxlfrk opened this issue 4 years ago • 9 comments

Proposal: Use a GSM librabry like TinyGSM as a Fallback when no WiFi-Connection could be established.

Current behavior: only supports WiFi

Desired behavior: Opportunity to specify the client to be used?

Alternatives considered: nothing

Use case: Fallback connection client

pxlfrk avatar Mar 05 '21 18:03 pxlfrk

? :)

pxlfrk avatar Apr 10 '21 21:04 pxlfrk

This is an interesting idea. However, this library heavily relies on the HTTPClient and WiFiClient from ESP devices Arduino SDK. Supporting other network libraries requires a large refactor, not planned now.

Any PR is welcome :)

vlastahajek avatar Apr 13 '21 13:04 vlastahajek

This is an interesting idea. However, this library heavily relies on the HTTPClient and WiFiClient from ESP devices Arduino SDK. Supporting other network libraries requires a large refactor, not planned now.

Any PR is welcome :)

If this only works with WiFi because it's hard-coded then please make that clearer on the Readme! InfluxDB is designed to work with IoT applications, and most of these will leverage cellular or other clients, not WiFi. Not including this detail clearly in the Readme results in people like me incorporating your library and then realizing that there's no way to hook up your Influx client to our own Web client (like TinyGSM). And don't hard code that 😡

Matthew-Sparkmate avatar Feb 22 '22 13:02 Matthew-Sparkmate

I agree with @Matthew-Sparkmate. WiFi should never be a requirement for such libraries. I designed a whole system for a couple of days, presuming that I can use this library with TinyGSM just to find out that's not quite possible. I am still hoping to design my own library to write data to influxDB with TinyGSM, but a library featured in the influxDB docs is expected to work with multiple network modules or at least some mention in the docs that it only works with Wi-Fi.

nsssayom avatar Mar 13 '22 08:03 nsssayom

I had the same issue, I developed a remote device, thinking I could use TinyGSM (No WiFi available in the locations) but it does not appear possible.

chinswain avatar Mar 21 '22 16:03 chinswain

Its a great library and I have used it successfully with great satisfaction. I too though now need to move some of my projects to GSM as the data transport. It would be great to be able to support that with TinyGSM or other GSM library.

peteDDD avatar Mar 11 '23 20:03 peteDDD

I have done a rewrite of this library so you can use Client abstract instead. In that way you can use TinyGSM, WiFi and ethernetclients. I currently use it for ethernet.

But instead of a pullrequest I am thinking of doing a fork because the change is not a minor one... It completely changes how to handle certificates for example and I have no way of testing it on esp8266. There might be a possibility to do it so that the current functionality will remain with the addition to be able to use other clients but then with the completely different certificate handling and the unknown compability with esp8266.

Any thoughts?

dlyckelid avatar Feb 27 '24 10:02 dlyckelid

I already started updating of client to support external TCP clients. Branch feat/allow-extending has almost fully working code, tested with WiFiNINA (Arduino MKR WiFi 1010). There was an issue with Arduino HTTP client timeouts. Unfortunately, I didn't find a time to complete it yet, but maybe in a few months

vlastahajek avatar Feb 28 '24 14:02 vlastahajek