robertoostenveld / esp8266_artnet_dmx512

49 stars 11 forks source link

Static IP setting #11

Closed maximbeliveau closed 1 year ago

maximbeliveau commented 1 year ago

it would be usefull if we can set a static ip for networks without DHCP servers.

robertoostenveld commented 1 year ago

That could indeed be useful. For that the code on line https://github.com/robertoostenveld/esp8266_artnet_dmx512/blob/57212159923df2f84f8e9a81104d06b9ad493831/esp8266_artnet_dmx512.ino#L419 and all other lines relating to the WiFimanager would have to be modified into something like this https://randomnerdtutorials.com/esp32-static-fixed-ip-address-arduino-ide/. It would make the code much simpler.

Making it user-friendly and configurable from the web interface however would better be implemented in the https://github.com/tzapu/WiFiManager package. You can check over there whether it is on the wish-list, or make an issue at https://github.com/tzapu/WiFiManager/issues to suggest this.

I have no plans to implement this myself, so I will close this issue. Feel free to fork my repo and make the change yourself.

meowde commented 1 year ago

Following up, @robertoostenveld just letting you know that it was indeed already implemented in the WiFiManager package. We added, where you pointed :

wifiManager.setSTAStaticIPConfig(IPAddress(192, 168, 0, 101), IPAddress(192, 168, 0, 1), IPAddress(255, 255, 255, 0)); wifiManager.setShowStaticFields(true);

to have a built-in static IP, and also be able to modify that IP in the Manager afterwards. Thank you!

robertoostenveld commented 1 year ago

Thanks for sharing back, that is useful information for others that want to assign a static IP address.