Comments (17)
I released v2.0.5 with this fix and also added support for setting static IP, which should further reduced the reaction time.
from homebuttons.
@hilsonp Sure, I'll add static IP in the future.
from homebuttons.
I guess it's taking that long to obtain the IP from you router... What router setup do you have? EAP610 is just an access point if I'm correct?
Would be really helpful if you could provide logs. There's a debug "connector" next to reset button. You can connect a USB to UART adapter to the TX and RX pins and then use a serial monitor. The baud is 115200. But please flash (with OTA) the attached debug build first so the log will be more verbose.
homebuttons_fw_v2.0.4_debug.bin.zip
(extract the zip first)
from homebuttons.
The EAP610 is just an AP, thats correct. The fritzbox is the DHCP server and is set to always give the same IP to the homebutton esp. Can I set a static IP? With WPA+WPA2 the connection time is under 2 seconds, I would says ~1,5
I flashed the debug firmware, but I don't get any output on serial (with screen /dev/ttyUSB0 115200, even tried switching RX/TX pins). I checked with an ESP8266 and that one worked with my FTD1232.
from homebuttons.
Sorry, gave you wrong instructions.... You should connect TX pin of Home Buttons to RX pin of UART adapter and GND to GND.
I think you should also move the jumper on you adapter. It should be set to 3.3v.
Please try again.
from homebuttons.
GND and TX/RX worked flawlessly :) I attached each a reset and button press from my fritzbox IOT WiFi with WPA+WPA2 and one from my EAP Skynet WiFi with WPA2+WPA3 (two button presses for good measure)
homebutton_iot.log
homebutton_skynet.log
from homebuttons.
Would it be an advantage if we provided a static IP configuration?
from homebuttons.
@PaulRitzkat Thanks for the logs. It seems to me that your access point has a certain timeout before a device can connect again if it has tried to connect recently. The timeout seems to be around 20 seconds. Could you check in the configuration if there's a setting like that?
Home Buttons is trying to connect twice shortly one after another.
- The first try is only using ssid and password - this is successful and takes the expected time
- Then it saves the bssid and channel info and tries to connect again to confirm the settings - this fails due to 4way handshake timeout
- Then it is retrying in a loop and finally succedes after around 20s
Try this please:
- Press a button
- Wait until it connects (20 seconds), sends mqtt message and goes to sleep
- Wait 60s
- Press the button again and observe what happens
And paste here the log.
@NicoDreamzZ Based on logs this seems to be an authorization issue, not a DHCP issue so I don't think it would make any difference.
from homebuttons.
Thank you for your time! I don't have any "security" settings regarding reconnect times or similar, but I've got logs in the omada controller regarding the ESP connects:
Mar 15, 2023 23:21:59 esp32s2-A44230 is disconnected from SSID "Skynet" on AP Flur (1m connected, 2.70KB).
Mar 15, 2023 23:15:58 [Failed]esp32s2-A44230 failed to connected to AP Flur with SSID "Skynet" on channel 11 because WPA Authentication times out/failed.(1 time in a minute)
Mar 15, 2023 23:15:08 esp32s2-A44230 is connected to AP Flur with SSID "Skynet" on channel 11.
Logfile with a couple button presses with >60s wait (second/third time didn't take 20s, more ~8s): homebutton.log
Logfile with failure, auto wakup from sleep to send data: homebutton_sleep.log
from homebuttons.
The first log looks fine. At first press it does the normal slow connect because it was reset prior to that. On the next two presses it uses quick connect (with bssid and channel) which succeed normally. It does take a bit longer than it should because of two reasons: 1. this is debug build which boots slower, 2. due to WPA3 (I'm looking into if this could be improved)
In the second log the quick connect fails due to AUTH_EXPIRE
which I'm not sure what it means. But then it connects using normal slow mode as expected.
Did you try rebooting your router and access point?
Also I randomly found this: https://community.home-assistant.io/t/esphome-wifi-auth-expired/443790/28
The poster has basically the same situation: using channel 11 and is getting both AUTH_EXPIRE
and 4WAY_HANDSHAKE_TIMEOUT
exactly like in your case.
Please try changing the channel to see what happens.
from homebuttons.
from homebuttons.
Interesting with CH11, I rebootet the AP and switched to CH6 (20MHz width), but sadly no luck with quicker logins.
all slow connects: homebutton.log: reset; button press; ~60s wait; button press (~20s); ~80s wait; button press (~30s); 20s wait; button press (~34s); wake up from sleep
and one log from a quick connect: homebutton_quick.log
Same errors in the AP logs: [Failed]esp32s2-A44230 failed to connected to AP Flur with SSID "Skynet" on channel 6 because WPA Authentication times out/failed.(4 times in a minute)
Most of the time its slow (>10s) and sometimes its quicker and immediately after its another slow connect. Channel utilization is between 30% and 40% and the area here has lots of other 2.4GHz networks. If I move the homebutton directly under the AP the chance of quicker connect gets better.
Can I solder an antenna somewhere to see if that helps? I can run a separate IOT WiFi directly from my fritzbox and can use it, but fast WPA3 connects would be nice :)
from homebuttons.
Are those two different networks in the last two logs or did you edit the ssid and bssid in one of them to hide it?
There's nowhere to connect an external antenna unfortunately.
If you can use another network that's the best option right now. I'm looking into it but I don't have a solution yet.
from homebuttons.
Oh, yeah those are the same networks, I forgot to hide it :D
No worries, I'll use a dedicated IOT network in the meantime. If you need someone to test something, just ping me :)
from homebuttons.
Please try this build. I'm not sure if it will solve your issue, but it reduces the connection time by about 40% for both WPA2 and WPA3.
In testing I get the average connection times:
- WPA2: 980 ms
- WPA3-SAE: 2665 ms
homebuttons_fw_v2.0.5-beta.bin.zip
(extract the zip first)
from homebuttons.
I also just tried it, and there's indeed a serious difference in the connection speed. Great job !!
Next thing that will make a real difference is setting a fixed IP in the device. (which is a feat. that was already req'd in another post)
from homebuttons.
Thats better :) I still sometimes get longer delays, but that might be the wall the box is mounted to (or other 2.4GHz networks interfering).
from homebuttons.
Related Issues (20)
- Request: Add ability to change URL MDIs are downloaded from HOT 2
- Mqqt Error: Mqtt Password Truncated HOT 6
- Download the binary directly from GitHub
- Update from v2.3.0 to v2.4.0 on original HomeButtons does not work using Online Flasher HOT 1
- Feat. request : export/import settings
- Update failed HOT 9
- Update case files HOT 1
- Icons not displaying HOT 2
- special chars limitations? HOT 2
- Show value from HA on Label6 HOT 1
- [Bug] Using '{% ... %}' syntax in label bricks device HOT 2
- Need support for recovering my bricked Home Buttons after update HOT 1
- Automatic WiFi reconnection HOT 2
- After Update v2.4.1: single button pressed automatisation are not executed anymore / reliably transmitted (?) HOT 5
- Feature request: display a custom message with an optional timeout
- home button controls do not show up in home assistant HOT 3
- Single press does not work anymore with Home Assistant HOT 3
- Please reset IP-Configuration after WiFi-Setup ? HOT 2
- Icons not downloading HOT 2
- Flickering while updating HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebuttons.