Can't connect to ESP unit with static IP

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Can't connect to ESP unit with static IP

#1 Post by DomoticaRob » 26 Feb 2018, 12:06

I do have a ESP8266 dev board with ESPEasy on it, a DHT22 temperature sensor and a relay on a GPIO.
That works fine with Domoticz and was also reachable in my Google Chrome browser. So:

192.168.2.8/control?cmd=GPIO.5.1

worked fine.

Then I gave the ESP unit a static IP . Since that moment I can’t reach it anymore in my browser. So:

192.168.2.8/control?cmd=GPIO.5.1

is not working anymore.

However, in Domoticz I still get the temperature and I also can control the GPIO with:

http://192.168.2.8/control?cmd=GPIO,5,1

Because I can’t reach the ESP unit with my browser I can’t change the IP settings in ESPEasy dashboard.

How can I reach the ESP unit again with my browser?

danmero
Normal user
Posts: 64
Joined: 11 May 2017, 01:19

Re: Can't connect to ESP unit with static IP

#2 Post by danmero » 26 Feb 2018, 15:07

What firmware version?
Did you set the gateway and netmask?

I never encounter any problem and my devices are on static IP.

Regards,

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Can't connect to ESP unit with static IP

#3 Post by vader » 26 Feb 2018, 15:58

That has never worked (or is it a typo?): 192.168.2.8/control?cmd=GPIO.5.1

. is not a valid delimiter. Only <space> or , is allowed. So try 192.168.2.8/control?cmd=GPIO,5,1 like in your link.

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#4 Post by DomoticaRob » 26 Feb 2018, 16:32

The firmware version is:

ESP_Easy_mega-20180104_normal_ESP8266_4096.bin

Yes, I did set the gateway and netmask.

Yes, it's a typo.

In the good days:

192.168.2.8/log

did work, and now not anymore.

Ofcourse I can start all over again. But I want to have a static IP so that if my AP is powered off and on again, the ESP unit will keep the same IP.

User avatar
ManS-H
Normal user
Posts: 234
Joined: 27 Dec 2015, 11:26
Location: the Netherlands

Re: Can't connect to ESP unit with static IP

#5 Post by ManS-H » 26 Feb 2018, 17:14

It's what Vader said, change the "." in "," and then it will work.

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#6 Post by DomoticaRob » 26 Feb 2018, 21:59

No, that's not the problem. It was only a misstype in this topic.
In my browser I use "," comma's.

In the past I could type:

http://192.168.2.8/log

and I got the log.

Now it's not working anymore, and it's since I changed to static IP.

Because I can't come into the ESPEasy interface anymore, I can't change back to DHCP.

I think I have to start all over again.

TD-er
Core team member
Posts: 1932
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Can't connect to ESP unit with static IP

#7 Post by TD-er » 26 Feb 2018, 22:11

Can you change the "firewall" setting in the node?
The problem is this IP filtering is using the netmask to see if you're allowed to access.
Default is "local subnet only".
But if your subnetmask is wrong, you are not allowed access.
You can disable the IP filtering using a command (via serial, since WLAN is not working for you now).
This will disable it until the next reboot, but that's enough to set it to "allow all".
The command is "clearaccessblock"

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#8 Post by DomoticaRob » 26 Feb 2018, 22:34

Hallo TD-er,

Ik doe het even in het Nederlands in de hoop dat ik ga begrijpen wat jij bedoelt.

Ik heb mijn firewall (Windows Defender Firewall) uitgeschakeld. Geen resultaat
Mogelijk dat dit niet is wat jij bedoelt.

Wat bedoel jij met 'via serial'?

TD-er
Core team member
Posts: 1932
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Can't connect to ESP unit with static IP

#9 Post by TD-er » 26 Feb 2018, 23:03

Het gaat mij om de setting "IP filtering" in de ESPeasy settings.
Je kunt commando's sturen via de seriële poort (waarover je ook de firmware flasht) en via een HTTP-url.
Dat laatste gaat niet lukken als je er niet bij kunt met je browser.
Dus dan zal je even met de seriële poort moeten verbinden en een terminal sessie, via Arduino IDE, of PlatformIO, of wat je dan ook gebruikt.
In dat venster kun je allerlei commando's geven, waaronder dus "clearaccessblock", om de IP-filtering tijdelijk uit te schakelen.

Wellicht moet ik nog een andere vorm van uitschakelen erbij maken, want ik snap dat dit een prima manier is om je buiten te sluiten ;)

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#10 Post by DomoticaRob » 26 Feb 2018, 23:22

Dank voor jouw reactie. Ik begrijp wat jij bedoelt.
Morgen ga ik het uitproberen, ik kan de unit nu niet loskoppelen, en ik laat weten of het gelukt is.

TD-er
Core team member
Posts: 1932
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Can't connect to ESP unit with static IP

#11 Post by TD-er » 26 Feb 2018, 23:24

Beetje te koud buiten zeker ;)
Laat maar weten als het gelukt is.

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#12 Post by DomoticaRob » 27 Feb 2018, 12:41

Hallo TD-er,

Ik mijn ESP8266 dev board met ESPEasy aan mijn PC gehangen en nog voordat ik de Arduino IDE opstartte dacht ik, eens even kijken hoe het nu is. En whola, het werkte. The unit weer losgekoppeld, eigen PSU eraan, en nog steeds werken. Hoe kan dat?

Nu blijkt het volgende:

Ik heb drie PC's in mijn netwerk:

1. Windows XP (ja, dat is oud, maar draait nog steeds AutoCAD op, dus zo laten), Google Chrome, ESPEasy webinterface werkt prima.
2. Windows 8.1, Google Chrome, ESPEasy webinterface werkt prima.
3. Windows 10, Google Chrome, ESPEasy webinterface werkt niet.

Ik heb geprobeerd te kijken naar de verschillende instellingen van de drie systemen en kan zo snel niet vinden waar de verschillen zitten. Ook heb ik de browsergeschiedenis en cache geleegd, geen resultaat.

Enig idee waar het probleem zit?

TD-er
Core team member
Posts: 1932
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Can't connect to ESP unit with static IP

#13 Post by TD-er » 27 Feb 2018, 21:21

Vergelijk de IP-adressen van die 3 PC's eens en dan vooral ook de gebruikte subnetmask.
Wat me namelijk opviel was dat je 192.168.2.x gaf als link.
Het kan heel goed zijn dat je 192.168.2.0/24 al netwerk hebt thuis, maar .2 is niet heel gebruikelijk.
Als je bijvoorbeeld 192.168.1.x en 192.168.2.x gebruikt, dan moet je als subnetmask 255.255.252.0 gebruiken.

Kijk dus maar even welk subnetmask je gebruikt en welke IP-adressen.

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#14 Post by DomoticaRob » 27 Feb 2018, 22:29

Ik heb van KPN een Experia Box v10 met de volgende installingen:

The attachment DHCP server.png is no longer available
The attachment LAN Instellingen.png is no longer available
The attachment WIFI Instellingen.png is no longer available
Mijn ESPEasy instellingen zijn:

DHCP server.png
DHCP server.png (11.44 KiB) Viewed 4031 times
Die 192.168.2.x heb ik niet bepaald, ik heb het zo gekregen.

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#15 Post by DomoticaRob » 27 Feb 2018, 22:31

The attachment LAN Instellingen.png is no longer available
The attachment WIFI Instellingen.png is no longer available
LAN Instellingen.png
LAN Instellingen.png (22.55 KiB) Viewed 4029 times

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#16 Post by DomoticaRob » 27 Feb 2018, 22:31

WIFI Instellingen.png
WIFI Instellingen.png (21.4 KiB) Viewed 4028 times

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#17 Post by DomoticaRob » 27 Feb 2018, 22:32

ESP.PNG
ESP.PNG (22.09 KiB) Viewed 4026 times

Domosapiens
Normal user
Posts: 291
Joined: 06 Nov 2016, 13:45

Re: Can't connect to ESP unit with static IP

#18 Post by Domosapiens » 27 Feb 2018, 23:38

3. Windows 10, Google Chrome, ESPEasy webinterface werkt niet.
Lijkt dus een WIN10 probleem.
Probeer eens een ping vanaf die WIN10 computer.
Zijn 192.168.2.5 en 192.168.2.6 wel ping-able vanaf die WIN10 computer?
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

DomoticaRob
Normal user
Posts: 38
Joined: 17 Jan 2018, 18:43

Re: Can't connect to ESP unit with static IP

#19 Post by DomoticaRob » 28 Feb 2018, 12:40

Alles is ping-able, zie onderstaande. Wat mij opvalt is dat het ESP8266 dev board met ESPEasy (192.168.2.8) als enige geen Hostname heeft. Zou dat het probleem kunnen zijn? Hoe geef ik dit board een Hostname?

Overzicht IP adressen en Ping resultaten:
====================================
====================================

Samsung S5 telefoon
192.168.2.12; e0:99:71:07:e0:25; android-3cc12f8a8b1bcc4f
---------------------------------------------------------
C:\>ping 192.168.2.12

Pinging 192.168.2.12 with 32 bytes of data:
Reply from 192.168.2.12: bytes=32 time=509ms TTL=64
Reply from 192.168.2.12: bytes=32 time=3ms TTL=64
Reply from 192.168.2.12: bytes=32 time=90ms TTL=64
Reply from 192.168.2.12: bytes=32 time=616ms TTL=64

Ping statistics for 192.168.2.12:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 616ms, Average = 304ms
=========================================================

IP camera
192.168.2.73; 7c:dd:90:2c:cf:6e; ipcam_006E060A688C_1
---------------------------------------------------------
C:\>ping 192.168.2.73

Pinging 192.168.2.73 with 32 bytes of data:
Reply from 192.168.2.73: bytes=32 time=9ms TTL=64
Reply from 192.168.2.73: bytes=32 time=4ms TTL=64
Reply from 192.168.2.73: bytes=32 time=4ms TTL=64
Reply from 192.168.2.73: bytes=32 time=4ms TTL=64

Ping statistics for 192.168.2.73:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 9ms, Average = 5ms
=========================================================

IP camera
192.168.2.78; 7c:dd:90:43:98:bd; ipcam_006E061CEC9A_1
---------------------------------------------------------
C:\>ping 192.168.2.78

Pinging 192.168.2.78 with 32 bytes of data:
Reply from 192.168.2.78: bytes=32 time=34ms TTL=64
Reply from 192.168.2.78: bytes=32 time=4ms TTL=64
Reply from 192.168.2.78: bytes=32 time=4ms TTL=64
Reply from 192.168.2.78: bytes=32 time=4ms TTL=64

Ping statistics for 192.168.2.78:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 34ms, Average = 11ms
=========================================================

IP camera
192.168.2.79; 7c:dd:90:32:01:b7; ipcam_006E060865B2_1
---------------------------------------------------------
C:\>ping 192.168.2.79

Pinging 192.168.2.79 with 32 bytes of data:
Reply from 192.168.2.79: bytes=32 time=65ms TTL=64
Reply from 192.168.2.79: bytes=32 time=4ms TTL=64
Reply from 192.168.2.79: bytes=32 time=5ms TTL=64
Reply from 192.168.2.79: bytes=32 time=4ms TTL=64

Ping statistics for 192.168.2.79:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 65ms, Average = 19ms
=========================================================

Raspberry PI 3B Domticz
192.168.2.20; 00:0b:81:9c:36:38; DomoticzPI1
---------------------------------------------------------
C:\>ping 192.168.2.20

Pinging 192.168.2.20 with 32 bytes of data:
Reply from 192.168.2.20: bytes=32 time=11ms TTL=64
Reply from 192.168.2.20: bytes=32 time=3ms TTL=64
Reply from 192.168.2.20: bytes=32 time=2ms TTL=64
Reply from 192.168.2.20: bytes=32 time=2ms TTL=64

Ping statistics for 192.168.2.20:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 11ms, Average = 4ms
=========================================================

Sonoff S20 switch
192.168.2.6; 5c:cf:7f:66:cf:1d; ESP_66CF1D
---------------------------------------------------------
C:\>ping 192.168.2.6

Pinging 192.168.2.6 with 32 bytes of data:
Reply from 192.168.2.6: bytes=32 time=2ms TTL=128
Reply from 192.168.2.6: bytes=32 time=2ms TTL=128
Reply from 192.168.2.6: bytes=32 time=2ms TTL=128
Reply from 192.168.2.6: bytes=32 time=3ms TTL=128

Ping statistics for 192.168.2.6:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 3ms, Average = 2ms
=========================================================

Sonoff S20 switch
192.168.2.5; 5c:cf:7f:66:c7:36; ESP_66C736
---------------------------------------------------------
C:\>ping 192.168.2.5

Pinging 192.168.2.5 with 32 bytes of data:
Reply from 192.168.2.5: bytes=32 time=16ms TTL=128
Reply from 192.168.2.5: bytes=32 time=2ms TTL=128
Reply from 192.168.2.5: bytes=32 time=2ms TTL=128
Reply from 192.168.2.5: bytes=32 time=41ms TTL=128

Ping statistics for 192.168.2.5:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 41ms, Average = 15ms
=========================================================

ESP8266 development board ESPEasy, dit board geeft de problemen
192.168.2.8; 68:c6:3a:8b:dc:51;

C:\>ping 192.168.2.8
---------------------------------------------------------
Pinging 192.168.2.8 with 32 bytes of data:
Reply from 192.168.2.8: bytes=32 time=99ms TTL=127
Reply from 192.168.2.8: bytes=32 time=3ms TTL=127
Reply from 192.168.2.8: bytes=32 time=110ms TTL=127
Reply from 192.168.2.8: bytes=32 time=6ms TTL=127

Ping statistics for 192.168.2.8:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 3ms, Maximum = 110ms, Average = 54ms

=========================================================

ESP32 development board geen ESPEasy
192.168.2.17; 30:ae:a4:07:4a:a4; espressif
---------------------------------------------------------
C:\>ping 192.168.2.17

Pinging 192.168.2.17 with 32 bytes of data:
Reply from 192.168.2.17: bytes=32 time=3ms TTL=255
Reply from 192.168.2.17: bytes=32 time=7ms TTL=255
Reply from 192.168.2.17: bytes=32 time=3ms TTL=255
Reply from 192.168.2.17: bytes=32 time=2ms TTL=255

Ping statistics for 192.168.2.17:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 7ms, Average = 3ms
=========================================================

Domosapiens
Normal user
Posts: 291
Joined: 06 Nov 2016, 13:45

Re: Can't connect to ESP unit with static IP

#20 Post by Domosapiens » 28 Feb 2018, 13:20

I see a lot of different observations:
- can reach / can not reach
- some computers can reach / others can not reach
- ping time long-short-long-short

Wifi transmission is power hungry!
Are you sure about your powersupply and cable?
ESP8266 development board
Is this a Wemos D1 mini?
Without branding?
I have experienced intermittent problems with 2 non-branded "Wemos D1 mini's"
Very power hungry and USB cable problems resulting in intermittent Wifi problems.
Where a branded Wemos D1 mini had no problem with that specific Power&USB combination.
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests