jziolkowski / tdm

GUI application to discover and monitor devices flashed with https://github.com/arendst/tasmota
GNU General Public License v3.0
666 stars 84 forks source link

Column "IP address" shows "0.0.0.0" in case of ETH connection #266

Open Noschvie opened 4 months ago

Noschvie commented 4 months ago

Hello using a Shelly Pro 4PM connected over ETH and Wifi is disabled.

17:20:22.813 CMD: ipaddress1
17:20:22.816 MQT: stat/tasmota_68FF94/RESULT = {"IPAddress1":"0.0.0.0 (0.0.0.0)"}
17:20:26.313 CMD: ipaddress2
17:20:26.316 MQT: stat/tasmota_68FF94/RESULT = {"IPAddress2":"192.168.7.1"}
17:20:42.264 CMD: wifi
17:20:42.267 MQT: stat/tasmota_68FF94/RESULT = {"Wifi":"OFF","Mode":"low rate"}

In case of {"IPAddress1":"0.0.0.0 (0.0.0.0)"} the alternative IP address {"IPAddress2":"192.168.7.1"} shall be used for this column and for calling the "WebUI". Thanks!

jziolkowski commented 4 months ago

Good one. I'll fix that later this week. (And hopefully release that thing :D )

jziolkowski commented 4 months ago

Also, can you pls paste here the result of status 5

Noschvie commented 4 months ago

19:26:37.923 CMD: Status 5 19:26:37.928 MQT: stat/tasmota_68FF94/STATUS5 ={"StatusNET":{"Hostname":"tasmota-68FF94-8084","IPAddress":"0.0.0.0","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"34:98:7A:68:FF:94","IP6Global":"","IP6Local":"", "Ethernet"{"Hostname":"tasmota-68FF94-8084eth","IPAddress":"192.168.7.187","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"34:98:7A:68:FF:97","IP6Global":"","IP6Local":"fe80::3698:7aff:fe68:ff97%en1"},"Webserver":2,"HTTP_API":1,"WifiConfig":0,"WifiPower":17.0}}

jziolkowski commented 2 months ago

i'm working on it right now. what tasmota version are you using with this?

Noschvie commented 2 months ago

The "Shelly Pro 4PM" is running Tasmota v14.1.0 and another device "WT32_ETH01" with v14.2.0 Thanks!

Noschvie commented 2 months ago

Hello @jziolkowski , is there a Windows exe file available for tests? Thanks

jziolkowski commented 2 months ago

I'll prepare a pre-release later today

Noschvie commented 2 months ago

Please have a look to the screenshot from version tdmgr_2024.9.3_x64:

.) Both devices connected by ETH doesn't show the IP address (DHCP used) .) Sorting by IP Address seems to be broken #281

grafik

Which logs are you needed? Thanks!

jziolkowski commented 2 months ago

Pls send me status 5 for both devices again, I'll try to inject this data into one of my devices

that sorting issue is weird, it works on my side. Tho I don't have any 0.0.0.0 address present. I'll have a look.

Noschvie commented 2 months ago

Shelly Pro 4PM

12:51:00.273 CMD: status 5
12:51:00.278 MQT: stat/tasmota_68FF94/STATUS5 = {"StatusNET":{"Hostname":"tasmota-68FF94-8084","IPAddress":"0.0.0.0","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"34:98:7A:68:FF:94","IP6Global":"","IP6Local":"","Ethernet":{"Hostname":"tasmota-68FF94-8084-eth","IPAddress":"192.168.7.187","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"34:98:7A:68:FF:97","IP6Global":"","IP6Local":"fe80::3698:7aff:fe68:ff97%en1"},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}}

WT32_ETH01

11:51:57.680 CMD: status 5
11:51:57.685 MQT: stat/tasmota_C7F738/STATUS5 = {"StatusNET":{"Hostname":"tasmota-C7F738-5944","IPAddress":"0.0.0.0","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"24:DC:C3:C7:F7:38","IP6Global":"","IP6Local":"","Ethernet":{"Hostname":"tasmota-C7F738-5944-eth","IPAddress":"192.168.7.178","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"24:DC:C3:C7:F7:3B","IP6Global":"","IP6Local":"fe80::26dc:c3ff:fec7:f73b%en1"},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":16.0}}
jziolkowski commented 2 months ago

check this build:

https://github.com/jziolkowski/tdm/releases/tag/pre2024.9.4.dev10

Noschvie commented 2 months ago

Hi @jziolkowski please have a look to "Gateway", in case of an ETH connection this column should be taken from "StatusNET"."Ethernet"."Gateway"

grafik

And in the case of an ETH connection, the symbol in the “Device” column should be suppressed or replaced with another one.

grafik

Thanks again!

jziolkowski commented 2 months ago

Ah fair point. Sigh. Seems I'll have to get some eth esp32 devices.

Noschvie commented 2 months ago

For example, a WT32 ETH01 would indeed be helpful.

Noschvie commented 1 month ago

@jziolkowski please reopen this ticket, thanks.

jziolkowski commented 1 month ago

pls try https://github.com/jziolkowski/tdm/releases/tag/2024.10.2.1

Noschvie commented 1 month ago

pls try https://github.com/jziolkowski/tdm/releases/tag/2024.10.2.1

...by the end of this week at the latest.

jziolkowski commented 1 month ago

No problem at all, just letting know ;)

Noschvie commented 1 month ago

@jziolkowski both devices are connected to 192.168.7.x/24 Both fields "IP address" and "Gateway" shall be taken from "Ethernet" the icon looks quite good :-)

12:15:57.189 MQT: stat/tasmota_68FF94/STATUS5 = {"StatusNET":{"Hostname":"tasmota-68FF94-8084","IPAddress":"0.0.0.0","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"34:98:7A:68:FF:94","IP6Global":"","IP6Local":"","Ethernet":{"Hostname":"tasmota-68FF94-8084-eth","IPAddress":"192.168.7.187","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"34:98:7A:68:FF:97","IP6Global":"","IP6Local":"fe80::3698:7aff:fe68:ff97%en1"},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}}

12:17:49.520 MQT: stat/tasmota_C7F738/STATUS5 = {"StatusNET":{"Hostname":"tasmota-C7F738-5944","IPAddress":"0.0.0.0","Gateway":"192.168.1.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"24:DC:C3:C7:F7:38","IP6Global":"","IP6Local":"","Ethernet":{"Hostname":"tasmota-C7F738-5944-eth","IPAddress":"192.168.7.178","Gateway":"192.168.7.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.7.1","DNSServer2":"0.0.0.0","Mac":"24:DC:C3:C7:F7:3B","IP6Global":"","IP6Local":"fe80::26dc:c3ff:fec7:f73b%en1"},"Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":16.0}}

grafik

jziolkowski commented 1 month ago

Ok this is weird. I have unit test for that and based on the example payloads you provided it should be working.

jziolkowski commented 1 month ago

Another issue is that tasmota remembers the gateway IP of the wifi interface. So even if you're disconnected from wifi then this address matches the value check I'm using and returns the set value. In tasmota WiFi is the main interface, so I think I need to follow the same approach in TDM.

Maaaaybe the gateway check should check if the wifi IP address is 0.0.0.0 and then decide which GW value to use.

However, I still have no idea why it insists on the 0.0.0.0 address in your example.

Can you tell me which version are these devices of yours?

Noschvie commented 1 month ago

Both devices are running version 14.2.0, thanks.