homieiot / homie-esp8266

💡 ESP8266 framework for Homie, a lightweight MQTT convention for the IoT
http://homieiot.github.io/homie-esp8266
MIT License
1.36k stars 308 forks source link

Hostnames are not working correctly #486

Closed JorinL closed 6 years ago

JorinL commented 6 years ago

Hey there :-) I use five devices actually with homie-esp8266-2.0.0-beta.3.

The Wemos D1 works fine and the hostname "Roombot-T-1000" is working. On the SonOffS20 every device has a number the rest ist identical "SonOffS2-1", "SonOffS2-2", "SonOffS2-3" and "SonOffS2-4".

Currently if i look into my Wifinetwork and I see: one SonOff named "u" and two "s" and the last is not showing a hostname.

grafik grafik

Config of all 4 is the same beside the number in the name:

{
  "name": "SonOffS20-2",
  "device_id": "sonoffs20-2",
  "wifi": {
    "ssid": "Wifi-Name",
    "password": "XXXXXXXXXXXXXXX"
  },
  "mqtt": {
    "host": "192.168.XXX.XXX",
    "port": XXXX,
    "base_topic": "homeland/haushalt/elektrik/sonoff/",
    "auth": true,
    "username": "XXXXXXXXXXXXXX",
    "password": "XXXXXXXXXXXXXXXXXXX"
  },
  "ota": {
    "enabled": true
  }

}

The Roombot-T-1000's config looks like:

{
  "name": "Roombot-T-1000",
  "device_id": "Roombot-T-1000",
  "wifi": {
    "ssid": "Homeland_Security",
    "password": "6887612432920345"
  },
  "mqtt": {
    "host": "192.168.0.8",
    "port": 1883,
    "base_topic": "homeland/haushalt/roomba/",
    "auth": true,
    "username": "roomba",
    "password": ";kDr-U[5mj&p6BrX#Rn5"
  },
  "ota": {
    "enabled": true
  }

}

Do I have an error like - "#define BRAND "sonoff-s20"" is on all 4 the same? Or what could it be - a bug? Config on all 5 devices applied by curl.

Thank you!

JorinL commented 6 years ago

I got it now that way, that no one of the four SonOffs exposes a hostname - did that by taking them all offline and deleting the leases. But normally I would expect the same way like it works with de Wemos D1 and Homie. Something seems to be not working correctly.

JorinL commented 6 years ago

Okay -closed-

Always trust linux and not all this crap :-)

timpur commented 6 years ago

tbh never understood the issue :P

JorinL commented 6 years ago

Somehow I had crap in my wifi network and the hostnames did not show correctly. But I could proof them by using cmd "host sonoff-s20-1" and voilà suddenly the rest of the network knows the right name.....

So nothing with homie... :-)