Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static IP support #29

Closed
marvinroger opened this issue Mar 17, 2016 · 16 comments
Closed

Static IP support #29

marvinroger opened this issue Mar 17, 2016 · 16 comments
Milestone

Comments

@marvinroger
Copy link
Member

No description provided.

@marvinroger marvinroger modified the milestone: 1.2.0 Mar 17, 2016
@marvinroger
Copy link
Member Author

Out of scope, DHCP is a better fit, and IP can be configured per device on router interface. Feel free to reopen with your use case if needed.

@CWempe
Copy link

CWempe commented Mar 20, 2016

I prefer DHCP, too.
Unfortunately I cannot change the IP of my devices on my dhcp server.

One of the few shortcomings of the biggest (and best) DSL-Router brands in germany (www.avm.de) does not allow you to change the IP address of dhcp clients on its web interface (or elsewhere). :(

While everything works well now, it would still be neat to change the IP on the device.
Maybe reopen this feature request wioth low prioroty? :)
Unless I am the only one how would benefit from this feature.

@marvinroger marvinroger reopened this Mar 20, 2016
@marvinroger
Copy link
Member Author

Alright, then. :)

@marvinroger marvinroger modified the milestones: v1.4.0, v2.0.0 Apr 2, 2016
@marvinroger marvinroger modified the milestones: v1.5.0, v2.0.0 Apr 19, 2016
@claybar
Copy link

claybar commented Sep 2, 2016

@CWempe:

One of the few shortcomings of the biggest (and best) DSL-Router brands in germany (www.avm.de) does not allow you to change the IP address of dhcp clients on its web interface (or elsewhere). :(

I think there is a way, although not the nicest. Once a device is connected to the router, it can be selected and the assigned IP can be reserved for future. This means subsequent connections will receive the same IP. Also, before a device is connected a IP can be reserved by pre-entering the MAC address and choosing an IP.

@CWempe
Copy link

CWempe commented Sep 2, 2016

@claybar

Also, before a device is connected a IP can be reserved by pre-entering the MAC address and choosing an IP.

I did not know this feature existed!
Maybe it is new or I never noticed it. :(

Nevertheless, that solves my problem. 👍
I just need to delete the "wrong" IP and enter the new entry.

Thanks!

@marvinroger
Copy link
Member Author

This was kind of surprising that you did not have this feature, well glad you found out how to use it.

@marvinroger
Copy link
Member Author

Reclosing it, then!

@euphi
Copy link
Member

euphi commented Sep 5, 2016

There are many routers where you can't set the IP for DHCP clients.

However, I still don't see a use case for a static IP for Nodes as long as MQTT is the only communication protocol.

@marvinroger
Copy link
Member Author

I agree, it could have been useful for some OTA implementations on the ESP8266, but as OTA is handled over MQTT, I don't see a use case either.

@shogsbro
Copy link

shogsbro commented Sep 6, 2016

I wonder how you guys do your firmware development.

I initially used Arduino with OTA, and progressed to platformio once I realised how much better it is. Both support OTA programming, and since I use OpenWrt on my router I don't have any problem doing a static IP reservation so I can easily specify the upload target.

Do you use a shim to send the uploading firmware via @jpmens python framework for uploading?

@marvinroger
Copy link
Member Author

I update via USB (512 000 bauds), it only takes like 3-4 seconds. And if I need to update over OTA, I do it over MQTT, as it is fastest in my opinion.

@shogsbro
Copy link

shogsbro commented Sep 6, 2016

OK, for MQTT upload do you use a custom uploader command-line, using mosquitto_pub? It would be helpful to include documentation on this for noobs.

@marvinroger
Copy link
Member Author

I don't this too often so I do use mosquitto_pub. I'll enhance the docs when everything else is done.

@johnjore
Copy link

I've just started tinkering with ESP8266's and came across this framework. Looks very good and timesaving, but I use static IP addresses for these items. I actually have DHCP setup in a HA configuration using VMs, but I want my sensors to be independant of the IT infrastructure. My other half would be less than impressed if I setup the ESP to control things like sockets and switches and the ESXi server, or its iSCSI storage, dies and the sockets/switches stopped working... (This has already happend, the storage controller died and it took 4 weeks to get it replaced under warranty. I now have a spare on a shelf...)

Yes, I could setup another DHCP on RaspPi or a spare WLAN box, but why add more infrastructure / components when I can just configure each device with a static IP and not rely on DHCP or DNS?

I've added

void onHomieEvent(HomieEvent event) {
  switch(event) {
    case HomieEvent::WIFI_CONNECTED:
      WiFi.config(ip, gw, netmask);
      Serial.print("IP Address: ");
      Serial.println(WiFi.localIP());
    break;

Having the IP as a configuration setting would be better and maybe one day I modify this to read the IP from a file on the SPIFFS, but best if Homie framework itself supported the use of static IPs.

Just my 2c and please keep up the good work.

JJ

@monster1025
Copy link

It will be great to have option to specify static IP - because in low-power mode (when powered on battery) - wake up with DHCP takes ~2sec, but with static ip is only 200ms (and it saves battery power).

@marvinroger
Copy link
Member Author

Implemented in #327 👍

@marvinroger marvinroger added this to the v2.0.0 milestone Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants