esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
420 stars 26 forks source link

esphomeyaml dashboard - upload to IP address #7

Closed jladefoged closed 5 years ago

jladefoged commented 5 years ago

When using the command line its possible to use --upload-port x.x.x.x to overcome DNS issues when uploading. This feature could be nice to have in the dashboard.

OttoWinter commented 5 years ago

Two reason why this doesn't exist:

jladefoged commented 5 years ago

I only have one esp module that I have to use --upload-port with and it's only the docker container that can't find it for some reason. It works fine with the other 8 esp modules I currently have. I can ping the esp module from everything else using the dns name without issues.

OttoWinter commented 5 years ago

Let's not fight symptoms, but the root issue.

Can you try running the docker container with the --net=host option and see if that helps? The Hass.io add-on will switch to that networking mode in the next version and that seems to fix all the mDNS troubles.

jladefoged commented 5 years ago

Yes I use host network and it does not solve the issue. I have a hunch (not verified) it's my Ubiquiti setup that does something wierd, but I have no idea why. The setup is pretty standard.

RaveGun commented 5 years ago

Not that I have any idea how this mDNS works but on my setup OTA does not work either. Is maybe a possibility to add some ota: configuration item, like fallback_IP in case the dslookup does not work?

OttoWinter commented 5 years ago

@ladefoged81 @RaveGun I mean it's all possible, but I want to keep the configuration as clean as possible. And by the way, what speaks against just giving the ESP a static IP (like the error message suggests)? If you're not using static IP addresses, a fallback_ip option or similar will never be accurate, because the ESP might have received a new DHCP lease.

RaveGun commented 5 years ago

@OttoWinter I am sorry to answer this so late.

My nodes are somehow production nodes and once configured and up and running I try not to change them just maybe add more nodes. There are some development nodes that I update just so but are not vital.

If a plan on updating a node I will, for sure, have edit the configuration yaml. So I could search the IP and change the fallback value. I have only an couple of fixed ip on my network, usually only the one with an SSH connection.

All my WiFi IOTs run on a separate VLAN that right now have a specific pool. If one day I would change the DHCP pool to something else, I would have a lot of OTA to do.

It is nothing wrong with static IPs. But is still another option to be used in the configuration as it would be a OTA_Fallback_IP value. Still, the static IP configuration option already exist.

If you focus your efforts onto the HA add-on as stated some place else, than this should work without a static IP or a working mDNS limitation.

Otherwise thank you for this great project.

miikkajo commented 5 years ago

i also would like to have this feature, for different reason.

  1. flashed device got ip from dhcp
  2. could not connect with name so i made manual_ip setting for device current ip
  3. i want to change ip out of my dhcp reserved scope
  4. unable to configure new ip because it's also used in OTA

Maybe there is a away to change device ip, but i did not figure it out ?

How about configuring ota_ipaddress in yaml config ? If exists then overrides manually configured ip ?