OnlineHumidifier icon indicating copy to clipboard operation
OnlineHumidifier copied to clipboard

OTA works great, but Hostname not resolved

Open consolacion opened this issue 9 years ago • 3 comments

As in the title, the OTA works great, but the hostname in the network/OTA ports in the IDE does not say "OTA-humidifier" as it should be, but it just says "esp8266 at 192.168.1.100" which is the correct ip and the upload goes fine. When I try the "Basic-OTA" example sketch, I get the proper Hostname in my network ports in the IDE. Not a huge problem, just kinda nagging my brain 'Why'

consolacion avatar Nov 22 '16 11:11 consolacion

Hi @consolacion,

If it works for BasicOTA.ino and not in another sketch, then likely something basis is missing or misplaced. I assume you were testing OnlineHumidifier-Maintain.ino sketch. If so, then I would double check if the following lines are present and placed like in original OnlineHumidifier-Maintain.ino sketch:

const char* host = "OTA-Humidifier";

...

ArduinoOTA.setHostname(host);

krzychb avatar Nov 22 '16 12:11 krzychb

Thanks. No it is in the A1-MQTT sketch but I guess that has the same functionality. I took the sketch directly from github and I did check that those 2 lines are present. I will try the 'maintain sketch' couldnt test OTA on that one earlier coz didnt have Python installed yet. Will let you know.

(on a side note OTA only working on Windows, not Linux but that is not the issue here :-) )

consolacion avatar Nov 22 '16 13:11 consolacion

I tried. took the Maintain sketch directly from github, only added' credentials and same effect. The Basic OTA sketch signs in with that name and the maintainsketch with "esp8266 at 192.168.1.xxx" very odd, more of an intriguing nuisance than a real problem. Tried the password setting... that just works.

consolacion avatar Nov 22 '16 14:11 consolacion