# Static IP for the ESP8266

**URL:** https://forum.sensor.community/t/static-ip-for-the-esp8266/1694
**Category:** Feature Requests
**Created:** [November 27, 2022, 4:34pm UTC](https://forum.sensor.community/t/static-ip-for-the-esp8266/1694 "2022-11-27T16:34:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![lagerschaden](https://forum.sensor.community/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@lagerschaden](https://forum.sensor.community/u/lagerschaden)
#### Post date: [November 27, 2022, 4:34pm UTC](https://forum.sensor.community/t/static-ip-for-the-esp8266/1694/1 "2022-11-27T16:34:08Z")

</div>

It would be nice if the user could enter a static IP number in the configuration menu

---

<div class="post-metadata">

### Author: ![fredvduin](https://forum.sensor.community/user_avatar/forum.sensor.community/fredvduin/32/1262_2.png) [@fredvduin](https://forum.sensor.community/u/fredvduin)
#### Post date: [November 8, 2023, 11:42am UTC](https://forum.sensor.community/t/static-ip-for-the-esp8266/1694/2 "2023-11-08T11:42:52Z")

</div>

We made a new branch

> **[GitHub - FijnStofGroep/sensors-software-Leusden](https://github.com/FijnStofGroep/sensors-software-Leusden/tree/master)**
>
> master

Binary

> <https://github.com/FijnStofGroep/sensors-software-Leusden/tree/master/bin>
>
> //github.com/FijnStofGroep/sensors-software-Leusden/tree/master/bin

This branch has included (new)

- Sen5x
- Static IP
- MQTT
- Power save

---

<div class="post-metadata">

### Author: ![harlowhenry](https://forum.sensor.community/letter_avatar_proxy/v4/letter/h/f0a364/32.png) [@harlowhenry](https://forum.sensor.community/u/harlowhenry)
#### Post date: [November 29, 2023, 9:29am UTC](https://forum.sensor.community/t/static-ip-for-the-esp8266/1694/3 "2023-11-29T09:29:51Z")

</div>

Below is a generic example in Python to illustrate how you might achieve this:

# Sample configuration menu function

def configure\_application():  
print(“Configuration Menu:”)

```
# Other configuration options...

# Prompt user for static IP
static_ip = input("Enter static IP address: ")

# Save the static IP to configuration
save_configuration(static_ip)

print("Configuration saved successfully.")

```

# Sample function to save configuration

def save\_configuration(static\_ip):  
# You can save the static IP to a configuration file, database, or any storage mechanism  
# Here, we’ll just print it for demonstration purposes  
print(f"Static IP saved: {static\_ip}")

# Example usage

configure\_application()
