grafana / arduino-prom-loki-transport

Apache License 2.0
1 stars 2 forks source link

Support for Ethernet wired devices? #3

Open pauljeffress opened 3 years ago

pauljeffress commented 3 years ago

Hi, Thanks for building this great library. I'm currently working on a project that pushes data to Grafana Cloud but requires a wired Ethernet connection from the Arduino to the network, not WiFi. I'm using an Adafruit Feather M4 CAN along with an Adafruit Ethernet FeatherWing. The Ethernet FeatherWing is based on a WIZNet 5500 chipset, and I'm using the recommended standard Ethernet library with it.

Would you be able to add support for this library and hence its underlying supported chipsets? I'd happily test it but I just don't have the skills to build it myself and submit it.

Thanks, Paul

slim-bean commented 2 years ago

Hey @pauljeffress apologies, I'm terrible with github notifications and didn't see this :(

I'm not sure since this was so long ago if you still need this? but I'll see if I can get my hands on that Adafruit part to add support in the future. I can't really guarantee much for timing.. but can do my best!

pauljeffress commented 2 years ago

Hi @slim-bean, all good, I actually switched over to an ESP32 board and did the connection over Wifi and it’s working well. No urgent need for the wired Ethernet connectivity. thanks, Paul

pauljeffress commented 2 years ago

Hi Fabrizio,

Can you be a bit more specific about what bit doesn't work? Anyway here are my notes from when I did it.

To get started on the ESP32 I followed in particular, this example https://github.com/ivanahuckova/room_comfort_monitoring_grafana I also leaned on stuff that the above required me to follow in

Then do all the customisation of config.h as per the https://github.com/grafana/diy-iot I only used the "Sending Metrics" part of that, not the "Sending Logs" bit.

I was then able to open my Grafana Cloud instance and use the EXPLORE bit to find the data my sketch was throwing at Grafana Cloud and show a crude graph.

I did all of the above using the Arduino IDE, but later moved onto PlatformIO . The full Arduino folder is attached. You need to insert your own wifi and Grafana Cloud details in config.h.

I've expanded on all of that a lot since and now have dozens of metrics and some nice dashboards in Grafana Cloud.

Let me know how you go!

Cheers, Paul

On Mon, 14 Feb 2022 at 20:07, Fabrizio Chiavari @.***> wrote:

Hi @slim-bean https://github.com/slim-bean, all good, I actually switched over to an ESP32 board and did the connection over Wifi and it’s working well. No urgent need for the wired Ethernet connectivity. thanks, Paul

Hi @pauljeffress https://github.com/pauljeffress I'm working on a project which involves ESP32 and Wifi connection, but on my board, it doesn't work. Could I ask you how you connected the board to Wifi for sending metrics? Thanks in advance.

— Reply to this email directly, view it on GitHub https://github.com/grafana/arduino-prom-loki-transport/issues/3#issuecomment-1038819906, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADR3BDLQARC2KQXZZWEOBVDU3C73DANCNFSM5DISO2CQ . You are receiving this because you were mentioned.Message ID: @.***>

pauljeffress commented 2 years ago

Pulsar_room_comfort_monitoring_grafana - secrets removed.zip

growly commented 2 years ago

I'd also like to use an ethernet connection for the transport instead of WiFi. I've got a LilyGO-T-ETH-POE board, which conveniently packs POE and Ethernet, so it would be nice to avoid using WiFi altogether. The OEM has a repo which demonstrates how to use the onboard Ethernet and it seems pretty straightforward.

I can tear the SNTP set up stuff out of this library and run it myself, but it will take a fair amount of refactoring to reproduce the work of the PrometheusArduino library without the transport.

Is there any plan to support Ethernet here, or should I try get something to work and send a PR?

/edit: If I'm to contribute, I'd appreciate hearing any of the thinking around how the library is intended to work: are all available underlying networks automatically tried until a connection succeeds, or is only one network explicitly in use at a given time, and should the user specify that? Can different networks be maintained simultaneously?