-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to add ethernet support ? #11
Comments
I don't have an ESP32 on me to test this right now, nor do I have an Ethernet module for it. But if you feel up to it, you can try to add a condition to check Ethernet connectivity in this file: https://github.com/TheStaticTurtle/esphome_syslog/blob/main/syslog_component.cpp#L57 I'm not certain how it would work on the esp32 idf platform, though, maybe it's as simple as including the As an ugly patch just to test that syslog/udp even works (because I'm using Samuel |
Thanks for a quick repply ! After looking at the source code on https://github.com/arcao/Syslog, I think this your code is not going to work because it uses the WIFI components. I don't have time today to look into this and read the code and understand it :-) Greetings ! |
Actually, no it doesn't, while you can give it an instance of Samuel |
Hi Samuel, I did some testing and found out that it works with your code. I removed the "if(WiFi.status() != WL_CONNECTED)" part of your code and it works. I was reading the source code and searching the internet but I can't find out how to check if ethernet is connected. Thanks for support ! |
I can confirm on my ESP32 WT32-ETH01 this hack works. I commented out the WiFi connection check and now I get rsyslog messages on my server. Nice to have if this were implemented in a way so that both Ethernet and WiFi work without having to modify the code and pull it locally :) But nevertheless, great work, love it!! |
Hi, Nice to know 😀! I basically need to do two things:
The tricky thing is using both Wi-Fi and Ethernet since, especially since the esp32 ip stack is apparently not always stable 😅 Would you mind describing how the module behaves if there is no cable plugged in or if the driver didn't initialize for some reason? My experience with WifiUDP is that it will probably fail silently. One thing, I'm not clear about the docs is that it states that But it's of course doable. The thing is, as I said, I don't have the capabilities to do it right now. One thing that could work in the meantime is a secondary branch (or even PR) and users could use the experimental branch/pr-id on the Thanks for the update! |
On a side note, esphome evolved a lot since I last looked at how it works internally, I'm amazed that this module still works "fine" after going through so many updates 😀! If I get my hands on an Ethernet board, I'll probably redo of most of the module. Syslog isn't complicated and ditching the I need to tinker with the esp32 and |
You know what, I'll order a board of AliExpress so that I will at least have it, and I'll work on it when I'll have a bit more time (my month is about to get crazy 😪). |
Yeah no worries, it's not urgent for me since it works :) I just tested it, but only OTA since otherwise, I have to solder again and no time for that :). While I was connected with "esp logs" it worked. Then I pulled the cable, it said "Connection reset by pear", replugged the cable, it didn't work again. Then I CTRL-C, then re-issued the command esphome logs, but still it didn't connect OTA. I had to unplug the power from the ESP32 before it restarted. I guess more info will be visible if I connect via serial, but as I said, I'm having a hard time finding time for the project I'm using your custom module in. With regards to recommendations? I don't know, I just bought an ESP32 WT32-eth01 for around 15$/15eur. I guess most of them are the same but not sure :)
|
This should now work (for Ethernet, esp-idf, IPv6) with #17 |
Hi, I have an ESP32 bord that is connected via Ethernet instead of WIFI. So NO WIFI is configured, only Ehternet.
First part of my esphome config is:
I was troubleshooting this because I did not get any syslog message on my syslog server. I used "tcpdump" to see if any syslog packet was received by the syslog server -> the answer was NO :-( (I'm an IT specialist so I know what I"m doing)
Then I added the action "syslog.log" to send explicit a syslog message. Then I received this:
[syslog:058]: Tried to send "custom_action"@"My log message" with level 7 but Wifi isn't connected yet
So my question is: as I'm not using WIFI to connect the ESP32, would it be possible to add support for Ethernet ?
Thanks for reponse and support !
The text was updated successfully, but these errors were encountered: