You are reading a single comment by @jfox and its replies. Click here to read the full conversation.
  • I tried two other things to get Mosquitto to use totally unique client_ids.
    First I tried setting a different host name for each esp8266 with wifi.setHostname(hostname)
    This made no difference.
    Then I tried setting the time with wifi.setSNTP(server, tz_offset)
    This made no difference.

    Then I took out the code that set the hostname and time and uploaded to the sonoff again.
    Now I get a different client_id for each device. I have no idea why. I LOVE Heisenbugs!

    1477452360: New connection from 192.168.2.11 on port 1883.
    1477452360: New client connected from 192.168.2.11 as b0a38163976b (c1, k60).
    1477452386: New connection from 192.168.2.12 on port 1883.
    1477452386: New client connected from 192.168.2.12 as 8e0660e041fa (c1, k60).
    1477452398: New connection from 192.168.2.16 on port 1883.
    1477452398: New client connected from 192.168.2.16 as e14751c9fb06 (c1, k60).
    
About

Avatar for jfox @jfox started