{"id":1133,"date":"2026-01-06T18:27:12","date_gmt":"2026-01-06T18:27:12","guid":{"rendered":"https:\/\/thomas.w-p.me.uk\/blog\/?p=1133"},"modified":"2026-01-06T18:27:12","modified_gmt":"2026-01-06T18:27:12","slug":"esphome-esp8266-connection-issues-with-asus-xt8-and-xt9-wifi-routers","status":"publish","type":"post","link":"https:\/\/thomas.w-p.me.uk\/blog\/2026\/01\/esphome-esp8266-connection-issues-with-asus-xt8-and-xt9-wifi-routers\/","title":{"rendered":"ESPHome ESP8266 connection issues with ASUS (XT8 and XT9) WiFi routers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This caused me a lot of pain with the ESPHome devices continually throwing up their own access points and refusing to join the wifi. I had full control of the devices when I could get them connected using Home Assistant &#8211; ESPHome Builder. The steps along the way that I took were:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Separate my WiFi in to an IoT 2.4G network and a 5.0G network for the house. This allows me to simplify the WiFi as much as possible and I think stops the Smart Connect from causing issues.<\/li>\n\n\n\n<li>Turned off everything I could in the 2G network to keep it as simple as possible. I am not sure how much was neccessary but it is working perfectly now and I don&#8217;t want to backtrack.<\/li>\n\n\n\n<li>Set wireless mode on the ASUS to &#8220;<strong>Auto<\/strong>&#8221; and tick the &#8220;<strong>Disable 11b<\/strong>&#8220;. <\/li>\n\n\n\n<li>Add this section to esphome > on_boot in the ESPHome builds for ESP8266 devices (I have many smart sockets). I could always get them to connect straight away if I rebooted my WiFi:<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#FAFAFA\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#90A4AE;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>esphome:\n  on_boot:\n    - priority: -100  # Use negative priority to run AFTER WiFi initializes\n      then:\n        - lambda: |-\n            #ifdef ESP8266\n              wifi_set_phy_mode(PHY_MODE_11G);\n            #endif<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki material-theme-lighter\" style=\"background-color: #FAFAFA\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #E53935\">esphome<\/span><span style=\"color: #39ADB5\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE\">  <\/span><span style=\"color: #E53935\">on_boot<\/span><span style=\"color: #39ADB5\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE\">    <\/span><span style=\"color: #39ADB5\">-<\/span><span style=\"color: #90A4AE\"> <\/span><span style=\"color: #E53935\">priority<\/span><span style=\"color: #39ADB5\">:<\/span><span style=\"color: #90A4AE\"> <\/span><span style=\"color: #F76D47\">-100<\/span><span style=\"color: #90A4AE\">  <\/span><span style=\"color: #90A4AE; font-style: italic\"># Use negative priority to run AFTER WiFi initializes<\/span><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE\">      <\/span><span style=\"color: #E53935\">then<\/span><span style=\"color: #39ADB5\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #90A4AE\">        <\/span><span style=\"color: #39ADB5\">-<\/span><span style=\"color: #90A4AE\"> <\/span><span style=\"color: #E53935\">lambda<\/span><span style=\"color: #39ADB5\">:<\/span><span style=\"color: #90A4AE\"> <\/span><span style=\"color: #39ADB5; font-style: italic\">|<\/span><span style=\"color: #9C3EDA\">-<\/span><\/span>\n<span class=\"line\"><span style=\"color: #91B859\">            #ifdef ESP8266<\/span><\/span>\n<span class=\"line\"><span style=\"color: #91B859\">              wifi_set_phy_mode(PHY_MODE_11G);<\/span><\/span>\n<span class=\"line\"><span style=\"color: #91B859\">            #endif<\/span><\/span><\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This caused me a lot of pain with the ESPHome devices continually throwing up their own access points and refusing to join the wifi. I had full control of the devices when I could get them connected using Home Assistant &#8211; ESPHome Builder. The steps along the way that I took were:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[126,27,108],"tags":[],"class_list":["post-1133","post","type-post","status-publish","format-standard","hentry","category-esphome","category-geekiness","category-home-assistant"],"_links":{"self":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/comments?post=1133"}],"version-history":[{"count":1,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1133\/revisions"}],"predecessor-version":[{"id":1134,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/posts\/1133\/revisions\/1134"}],"wp:attachment":[{"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/media?parent=1133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/categories?post=1133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thomas.w-p.me.uk\/blog\/wp-json\/wp\/v2\/tags?post=1133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}