Create a stand alone device

You set the wifi up in ap (access point) mode and connect to that. The default ip address is 192.168.4.1 (or maybe 2, I can’t remember), but you can set the address to be anything from the private ranges of ip addresses you want.

The WiFi component has an enable_on_boot: option. I’m assuming that setting this to False will disable the component completely.

As the AP config is part of the WiFi component, how can I disable the WiFi network connection whilst keeping the AP alive?

EDIT:

I’ve taken out the SSID and the wifi password which forced the AP at next restart.

However, all I see is the WiFi connection page on 192.168.4.1. with no access to the web server on port 80.

I have the webserver configured as below:

web_server:
  port: 80
  local: True
  auth:
    username: xxxxxxxxxx
    password: !secret password
  version: 3 

Remove captive portal (if you had).
Try simple:

wifi:
  ap:
    ssid: "esptest"

web_server:
  local: true

Brilliant!

Works a treat.

Thank you.

Oddly, however, using the webserver like this, the binary sensor state icons don’t show up whereas they do in normal WiFi mode.

Any idea why that should be?

Like how? What’s the difference?

When accessing the web server without a network connection, the items arrowed don’t show up.

The entity names do but not the icons.

Very strange.

It only seems to affect binary sensors. All other entities are fine.

You can post your yaml…

Is the sensors internal?
There is a setting for the webserver to show internal sensors also

Since it’s standalone AP setup, internal doesn’t make a sense…

Yes it does.
Internal can be hidden even from the webserver

It is hidden,
I mean it doesn’t make sense to set something internal in this use case.

I know but let’s allow Ash to answer.
He can tell us what his yaml says

1 Like

None of the binary sensors are internal.

The entity name shows up but not the icon which means I can’t see the state changes of the binary sensors.

Here are the binary sensors:

binary_sensor:
  - id: box_button
    name: Button
    platform: gpio
    device_class: door
    pin:
      number: ${button_gpio}
      mode:
        input: true
        # pullup: true
    filters:
      - invert:
      - delayed_on: 100ms  # Debounce filter before registering a press
      - delayed_off: 100ms
    on_press:
      then:
        - script.execute: button_counter_and_beep

  - id: atom_push_button
    name: Atom push Button
    platform: gpio
    device_class: door
    pin:
      number: ${atom_button_gpio}
      mode:
        input: true
        # pullup: true
    filters:
      - invert:
      - delayed_on: 100ms  # Debounce filter before registering a press
      - delayed_off: 100ms
    on_press:
      then:
        - binary_sensor.template.publish: # for testing
                  id: box_button
                  state: ON
    on_release:
      then:
        - binary_sensor.template.publish: # for testing
                  id: box_button
                  state: OFF
     
  - id: wifi_control
    name: WiFi Control
    platform: template
    device_class: connectivity
    on_press: 
      then:
        - number.set:
            id: button_hold_counter
            value: 0
        # - wifi.enable: # Uncomment when comissioning
        - script.execute: exhaust_or_wifi_on_alert
    on_release: 
      then:
        - number.set:
            id: button_hold_counter
            value: 0
        # - wifi.disable: # Uncomment when comissioning
        - script.execute: exhaust_or_wifi_off_alert

Everything is working fine, it’s just this anomaly that’s vexing.

Here’s a thought. Could this be a problem with Webserver 3?

I’ll give it a try with Webserver 2 tomorrow.

EDIT:

I couldn’t wait. I have to know!

I changed to Web server version 2 and all is fine. I can see the states of the binary sensors with no network connection and accessing it via 192.168.4.1:80, as before.

It looks like webserver 3 is the issue. But why?

Could it be a browser issue? I’m using Chromium via Arc.

This is the same screenshot as above, showing the missing icons:

That’s why I gave you minimal setup which defaults to web server 2.
3. is development version, I haven’t even tried yet.

Yes, it’s just odd that it doesn’t show the icons. It’s not a big deal as I can always use V2.

I’m pleased it’s not me!

Thanks for your help.