1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.61k stars 795 forks source link

Add fixed IP option to Wifi Manager Portal #1363

Open michapr opened 1 year ago

michapr commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Would be great to have the possibility to set a fixed IP to the Gateway. So it could work in a defined IP range outside the DHCP range.

Describe the solution you'd like A clear and concise description of what you want to happen.

Add in interface fixed IP settings and save it to EEPROM in ESP (so that not will be overwritten while updating)

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Odyno commented 1 month ago

Hello @michapr, I'm using the build_flags to perform this action... all of my config is statics.

This is a chunk of my configuration and I configure many things via global variables (and I'm not sure if everything is documented... am I wrong @1technophile ? ) :

build_flags =
  [.... ...]
  '-DMQTT_USER="xxxxxx"'
  '-DMQTT_PASS="xxxxxx"'
  '-DMQTT_SERVER="xxxxxx"'
  '-DMQTT_PORT="xxxxxx"'
   '-DESPWifiManualSetup=true'
  '-Dwifi_ssid="xxxxxx"'
  '-Dwifi_password="xxxxxx"'
  '-DNetworkAdvancedSetup=true'
  '-DNET_IP="192.168.1.12"'                <--------------------
  '-DNET_MASK="255.255.255.0"'        <--------------------
  '-DNET_GW="192.168.1.1"'               <--------------------
  '-DNET_DNS="192.168.1.1"'              <--------------------