IotWebConf icon indicating copy to clipboard operation
IotWebConf copied to clipboard

Static IP or DHCP

Open fusionstream opened this issue 4 years ago • 8 comments

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.

fusionstream avatar Feb 17 '21 10:02 fusionstream

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.

fusionstream avatar Feb 17 '21 11:02 fusionstream

Optional DHCP and Static IP would be a really good solution! How is this development?

PilotIoTSystems avatar Jun 07 '21 10:06 PilotIoTSystems

It is doable, as shown in example IotWebConf09CustomConnection. I keep this thread open to provide a more complete example with all the GUI items.

prampec avatar Jun 08 '21 09:06 prampec

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.

PilotIoTSystems avatar Jun 10 '21 10:06 PilotIoTSystems

image

PilotIoTSystems avatar Jun 10 '21 14:06 PilotIoTSystems

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

prampec avatar Jun 10 '21 15:06 prampec

I do that too. 1

puyiot avatar Jun 12 '21 06:06 puyiot