IotWebConf
IotWebConf copied to clipboard
Static IP or DHCP
It seems no one has asked this before.
Could do with an option for static IP or DHCP. Would be nice to be part of the default options, otherwise, you have allow the WiFi.begin call in connectWifi to be overloaded with static IP details.
Use case, I have sensor nodes that I want to set up easily since I will have a ton of them and not all sensor types are the same (so I use custom parameters). This node will take a reading then go into a deepSleep. As power usage is important, I want to set a static ip as it dramatically reduces the on time. However, I initially will need dhcp support so i don't have to worry about assignments till much later in the installation.
The sample in Conf09 has exactly what I need but one of my original points still stands. Having it as part of the default config page would be great. A checkbox to enable/disable DHCP which then hides or shows a default listing of ip, subnet, gateway, dns, hostname would be great.
Optional DHCP and Static IP would be a really good solution! How is this development?
It is doable, as shown in example IotWebConf09CustomConnection. I keep this thread open to provide a more complete example with all the GUI items.
I have compiled a version that meets the wishes of a fusionstream in which the Static IP or DHCP check box can be selected. It works for me...
Below is a screenshot of the Config page and "IotWebConf09CustomConnection_reworked.ino" in TXT format.

Sounds great, thanks! Would be nice to set up some javascipt dynamism on OptionalParameterGroup.
I do that too.
