Closed altserg closed 2 years ago
You're seeing different issues.
1) IP address 0.0.0.0 means DHCP is providing the correct IP address. 2) IP address 192.168.4.1 is the AP's IP address and not the ethernet IP address. The ethernet IP address won't be shown in the GUI when wifi is ON.
Hi Theo,
I disagree.
When Wifi is on, then, the IP address in MQTT message and GUI is correct. When Wifi is Off, Eth IP address is incorrect. See the image below showing 2 similar devices with the same FW and one Wifi enabled, another Wifi disabled
However, the 1st board has fixed IP (not DHCP) via EthIP command. But I would expect the IP address to show correctly everywhere, regardless whether it's obtained from DHCP or fixed. In HASS, in Tasmota integration wrong IP is shown as well, the link to device does not work because of that.
Addition: I have checked on one of my boards with older 9.X Tasmota, the issue is the same also for IP address that is obtained via DHCP, see the last picture
My AP has different address, I use 192.168.2.XXX network
Getting both (DHCP) IP addresses shown with status 5
MQT: stat/sonoff-D09CA8/STATUS5 = {"StatusNET":{"Hostname":"sonoff-D09CA8-7336","IPAddress":"192.168.2.179","Gateway":"192.168.2.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.2.1","DNSServer2":"0.0.0.0","Mac":"94:B9:7E:D0:9C:A8","Ethernet":{"Hostname":"sonoff-D09CA8-7336-eth","IPAddress":"192.168.2.176","Gateway":"192.168.2.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.2.1","DNSServer2":"0.0.0.0","Mac":"94:B9:7E:D0:9C:AB"},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}}
eth is xxx.176. So this is not correct
How about this:
15:46:17.360 MQT: tasmota/discovery/4C11AED6D31C/config = {"ip":"192.168.2.117","dn":"Olimex ESP32-PoE-Iso","fn":["Tasmota",null,null,null,null,null,null,null],"hn":"esp32f-eth","mac":"4C11AED6D31C","md":"Olimex ESP32-PoE","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"11.0.0.2","t":"esp32f","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"ver":1} (retained)
15:46:17.444 MQT: tasmota/discovery/4C11AED6D31C/sensors = {"sn":{"Time":"2022-02-22T15:46:17","ESP32":{"Temperature":53.3},"TempUnit":"C"},"ver":1} (retained)
With latest git pull I cannot compile the FW anymore. I have cleaned the cache, etc. Is there anything special that I need to do ?
c:/users/stkachen/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\stkachen\AppData\Local\Temp\ccolNs1L.ltrans13.ltrans.o:(.literal+0x49c): undefined reference to be_load_ccronexpr_class' c:/users/stkachen/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch2/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\stkachen\AppData\Local\Temp\ccolNs1L.ltrans13.ltrans.o: in function
setup()':
Nothing special to do. There is no issue, since the automated builds compile all successfully.
Try a complete fresh git clone and delete hidden folder .platformio
still the same error, deleted everything...
I have found the problem: I use #undef USE_LIGHT, and missing class is guarded by #ifdef USE_LIGHT. The fix is to move one line of code: diff --git a/lib/libesp32/berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c index 684174821..4628e2afb 100644 --- a/lib/libesp32/berry/default/be_modtab.c +++ b/lib/libesp32/berry/default/be_modtab.c @@ -208,8 +208,8 @@ BERRY_API void be_load_custom_libs(bvm *vm) be_load_md5_lib(vm); be_load_serial_lib(vm); be_load_ctypes_lib(vm);
in /lib/libesp32/berry/default/be_modtab.c b/lib/libesp32/berry/default/be_modtab.c but I do not know if it's right maybe someone who has more knowledge about the tasmota berry infra can look at it
With latest fix I confirm that correct IP address is displayed when DHCP is not used
Correct IP is also shown in MQTT:
{"ip":"192.168.2.96","dn":"GF HVAC","fn":["GF_CV_Switch","GF_Reserve_1","GF_Reserve_2","GF_Reserve_3","GF_Reserve_4","GF_HVAC_MAX","GF_HVAC_MEDIUM","GF_HVAC_STANDBY"],"hn":"ESP32-GF-HVAC-eth","mac":"C8C9A3DC2E10","md":"KC868-A8","ty":0,"if":0,"ofln":"Offline","onln":"Online","state":["OFF","ON","TOGGLE","HOLD"],"sw":"11.0.0.2","t":"GFHVAC","ft":"%prefix%/%topic%/","tp":["cmnd","stat","tele"],"rl":[1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"swc":[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],"swn":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"btn":[0,0,0,0,0,0,0,0],"so":{"4":0,"11":0,"13":0,"17":0,"20":0,"30":0,"68":0,"73":0,"82":0,"114":0,"117":0},"lk":0,"lt_st":0,"sho":[0,0,0,0],"ver":1}
Status 5 output shows first IP as 0.0.0.0 but this is probably correct, maybe refers to WiFi
status 5 16:54:56.262 MQT: stat/GFHVAC/STATUS5 = {"StatusNET":{"Hostname":"ESP32-GF-HVAC","IPAddress":"0.0.0.0","Gateway":"192.168.2.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.2.1","DNSServer2":"0.0.0.0","Mac":"C8:C9:A3:DC:2E:10","Ethernet":{"Hostname":"ESP32-GF-HVAC-eth","IPAddress":"192.168.2.96","Gateway":"192.168.2.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.2.1","DNSServer2":"8.8.8.8","Mac":"C8:C9:A3:DC:2E:13"},"Webserver":2,"HTTP_API":0,"WifiConfig":0,"WifiPower":17.0}}
I will close the issue, but maybe someone can still have a look at the compilation issue
Berry error should be solved with https://github.com/arendst/Tasmota/pull/14993
PROBLEM DESCRIPTION
ESP32 does not show correct Ethernet IP address in GUI and in HASS autodiscovery MQTT messages. The problem exists on Tasmota at least since version 9, and was seen on multiple different HW boards
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Status 0
:TO REPRODUCE
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen. Correct Eth IP address is displayed in the GUI and in HASS MQTT discovery messages
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
![image](https://user-images.githubusercontent.com/79573763/154920065-efe1f46f-0961-497a-b697-3db0d65a1a93.png)
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)